diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-07-26 12:07:04 -0400 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2016-08-08 14:19:58 -0400 |
commit | 4be12cc23d5030dcf7dfe055e26c0ab6e79dbb38 (patch) | |
tree | 785456c82603146da0a38f0ee5210bcef827ecd9 /drivers/gpu/drm/drm_simple_kms_helper.c | |
parent | 0e4faf679e67b5ab55752d18fc82f3c7351b2f03 (diff) |
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
Diffstat (limited to 'drivers/gpu/drm/drm_simple_kms_helper.c')
-rw-r--r-- | drivers/gpu/drm/drm_simple_kms_helper.c | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/drivers/gpu/drm/drm_simple_kms_helper.c b/drivers/gpu/drm/drm_simple_kms_helper.c index 0db36d27e90b..0a02efe978ee 100644 --- a/drivers/gpu/drm/drm_simple_kms_helper.c +++ b/drivers/gpu/drm/drm_simple_kms_helper.c | |||
@@ -73,22 +73,9 @@ static const struct drm_crtc_funcs drm_simple_kms_crtc_funcs = { | |||
73 | static int drm_simple_kms_plane_atomic_check(struct drm_plane *plane, | 73 | static int drm_simple_kms_plane_atomic_check(struct drm_plane *plane, |
74 | struct drm_plane_state *plane_state) | 74 | struct drm_plane_state *plane_state) |
75 | { | 75 | { |
76 | struct drm_rect src = { | ||
77 | .x1 = plane_state->src_x, | ||
78 | .y1 = plane_state->src_y, | ||
79 | .x2 = plane_state->src_x + plane_state->src_w, | ||
80 | .y2 = plane_state->src_y + plane_state->src_h, | ||
81 | }; | ||
82 | struct drm_rect dest = { | ||
83 | .x1 = plane_state->crtc_x, | ||
84 | .y1 = plane_state->crtc_y, | ||
85 | .x2 = plane_state->crtc_x + plane_state->crtc_w, | ||
86 | .y2 = plane_state->crtc_y + plane_state->crtc_h, | ||
87 | }; | ||
88 | struct drm_rect clip = { 0 }; | 76 | struct drm_rect clip = { 0 }; |
89 | struct drm_simple_display_pipe *pipe; | 77 | struct drm_simple_display_pipe *pipe; |
90 | struct drm_crtc_state *crtc_state; | 78 | struct drm_crtc_state *crtc_state; |
91 | bool visible; | ||
92 | int ret; | 79 | int ret; |
93 | 80 | ||
94 | pipe = container_of(plane, struct drm_simple_display_pipe, plane); | 81 | 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, | |||
102 | 89 | ||
103 | clip.x2 = crtc_state->adjusted_mode.hdisplay; | 90 | clip.x2 = crtc_state->adjusted_mode.hdisplay; |
104 | clip.y2 = crtc_state->adjusted_mode.vdisplay; | 91 | clip.y2 = crtc_state->adjusted_mode.vdisplay; |
105 | ret = drm_plane_helper_check_update(plane, &pipe->crtc, | 92 | |
106 | plane_state->fb, | 93 | ret = drm_plane_helper_check_state(plane_state, &clip, |
107 | &src, &dest, &clip, | 94 | DRM_PLANE_HELPER_NO_SCALING, |
108 | plane_state->rotation, | 95 | DRM_PLANE_HELPER_NO_SCALING, |
109 | DRM_PLANE_HELPER_NO_SCALING, | 96 | false, true); |
110 | DRM_PLANE_HELPER_NO_SCALING, | ||
111 | false, true, &visible); | ||
112 | if (ret) | 97 | if (ret) |
113 | return ret; | 98 | return ret; |
114 | 99 | ||
115 | if (!visible) | 100 | if (!plane_state->visible) |
116 | return -EINVAL; | 101 | return -EINVAL; |
117 | 102 | ||
118 | if (!pipe->funcs || !pipe->funcs->check) | 103 | if (!pipe->funcs || !pipe->funcs->check) |