mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 18:09:57 +00:00
drm/simple_kms_helper: Use drm_plane_helper_check_state()
Replace the use of drm_plane_helper_check_update() with drm_plane_helper_check_state() since we have a plane state. I don't see any actual users of drm_simple_kms_helper yet, so no actual plane clipping bugs to fix. Cc: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/1469549224-1860-10-git-send-email-ville.syrjala@linux.intel.com
This commit is contained in:
parent
0e4faf679e
commit
4be12cc23d
1 changed files with 6 additions and 21 deletions
|
@ -73,22 +73,9 @@ static const struct drm_crtc_funcs drm_simple_kms_crtc_funcs = {
|
||||||
static int drm_simple_kms_plane_atomic_check(struct drm_plane *plane,
|
static int drm_simple_kms_plane_atomic_check(struct drm_plane *plane,
|
||||||
struct drm_plane_state *plane_state)
|
struct drm_plane_state *plane_state)
|
||||||
{
|
{
|
||||||
struct drm_rect src = {
|
|
||||||
.x1 = plane_state->src_x,
|
|
||||||
.y1 = plane_state->src_y,
|
|
||||||
.x2 = plane_state->src_x + plane_state->src_w,
|
|
||||||
.y2 = plane_state->src_y + plane_state->src_h,
|
|
||||||
};
|
|
||||||
struct drm_rect dest = {
|
|
||||||
.x1 = plane_state->crtc_x,
|
|
||||||
.y1 = plane_state->crtc_y,
|
|
||||||
.x2 = plane_state->crtc_x + plane_state->crtc_w,
|
|
||||||
.y2 = plane_state->crtc_y + plane_state->crtc_h,
|
|
||||||
};
|
|
||||||
struct drm_rect clip = { 0 };
|
struct drm_rect clip = { 0 };
|
||||||
struct drm_simple_display_pipe *pipe;
|
struct drm_simple_display_pipe *pipe;
|
||||||
struct drm_crtc_state *crtc_state;
|
struct drm_crtc_state *crtc_state;
|
||||||
bool visible;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
pipe = container_of(plane, struct drm_simple_display_pipe, plane);
|
pipe = container_of(plane, struct drm_simple_display_pipe, plane);
|
||||||
|
@ -102,17 +89,15 @@ static int drm_simple_kms_plane_atomic_check(struct drm_plane *plane,
|
||||||
|
|
||||||
clip.x2 = crtc_state->adjusted_mode.hdisplay;
|
clip.x2 = crtc_state->adjusted_mode.hdisplay;
|
||||||
clip.y2 = crtc_state->adjusted_mode.vdisplay;
|
clip.y2 = crtc_state->adjusted_mode.vdisplay;
|
||||||
ret = drm_plane_helper_check_update(plane, &pipe->crtc,
|
|
||||||
plane_state->fb,
|
ret = drm_plane_helper_check_state(plane_state, &clip,
|
||||||
&src, &dest, &clip,
|
DRM_PLANE_HELPER_NO_SCALING,
|
||||||
plane_state->rotation,
|
DRM_PLANE_HELPER_NO_SCALING,
|
||||||
DRM_PLANE_HELPER_NO_SCALING,
|
false, true);
|
||||||
DRM_PLANE_HELPER_NO_SCALING,
|
|
||||||
false, true, &visible);
|
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (!visible)
|
if (!plane_state->visible)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (!pipe->funcs || !pipe->funcs->check)
|
if (!pipe->funcs || !pipe->funcs->check)
|
||||||
|
|
Loading…
Reference in a new issue