diff options
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) |