Skip to content

Commit 4a1b5d1

Browse files
committed
drm/vkms: allow the primary plane to be positioned
Before commit bc0d7fd ("drm: vkms: Supports to the case where primary plane doesn't match the CRTC"), the composition was executed on top of the primary plane. Therefore, the primary plane needed to cover the entire CRTC. After commit bc0d7fd, this is no longer necessary, as the composition is now executed on top of the CRTC. Then, allow the primary plane to be positioned in such a way that it doesn't cover the entire CRTC. This patch was tested with the vkms IGT testlist and all tests passed successfully. Moreover, the test igt@kms_universal_plane@universal-plane-pageflip-windowed-pipe-A used to fail and now is passing. Signed-off-by: Maíra Canal <mcanal@igalia.com> Reviewed-by: Melissa Wen <mwen@igalia.com> Signed-off-by: Maíra Canal <mairacanal@riseup.net> Link: https://patchwork.freedesktop.org/patch/msgid/20230324164226.256084-3-mcanal@igalia.com
1 parent 4dee3c4 commit 4a1b5d1

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

drivers/gpu/drm/vkms/vkms_plane.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ static int vkms_plane_atomic_check(struct drm_plane *plane,
132132
struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state,
133133
plane);
134134
struct drm_crtc_state *crtc_state;
135-
bool can_position = false;
136135
int ret;
137136

138137
if (!new_plane_state->fb || WARN_ON(!new_plane_state->crtc))
@@ -143,13 +142,10 @@ static int vkms_plane_atomic_check(struct drm_plane *plane,
143142
if (IS_ERR(crtc_state))
144143
return PTR_ERR(crtc_state);
145144

146-
if (plane->type != DRM_PLANE_TYPE_PRIMARY)
147-
can_position = true;
148-
149145
ret = drm_atomic_helper_check_plane_state(new_plane_state, crtc_state,
150146
DRM_PLANE_NO_SCALING,
151147
DRM_PLANE_NO_SCALING,
152-
can_position, true);
148+
true, true);
153149
if (ret != 0)
154150
return ret;
155151

0 commit comments

Comments
 (0)