diff mbox series

[RFC,3/3] drm: mxsfb: enforce framebuffer size matches plane size

Message ID 20200910092425.1016976-3-stefan@agner.ch (mailing list archive)
State New, archived
Headers show
Series [RFC,1/3] drm: use flags instead of boolean in plane check | expand

Commit Message

Stefan Agner Sept. 10, 2020, 9:24 a.m. UTC
The plane size must match the CRTC already (enforced by not setting
the CAN_POSTION flag). However, the controller also requires the
framebuffer to be exactly the CRTC size. Make use of the new flag
DRM_PLANE_REQUIRE_MATCHING_FB to match the plane size.

Signed-off-by: Stefan Agner <stefan@agner.ch>
---
 drivers/gpu/drm/mxsfb/mxsfb_kms.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/mxsfb/mxsfb_kms.c b/drivers/gpu/drm/mxsfb/mxsfb_kms.c
index c24ef330718e..7091da1c73cc 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_kms.c
+++ b/drivers/gpu/drm/mxsfb/mxsfb_kms.c
@@ -410,7 +410,8 @@  static int mxsfb_plane_atomic_check(struct drm_plane *plane,
 	return drm_atomic_helper_check_plane_state(plane_state, crtc_state,
 						   DRM_PLANE_HELPER_NO_SCALING,
 						   DRM_PLANE_HELPER_NO_SCALING,
-						   DRM_PLANE_CAN_UPDATE_DISABLED);
+						   DRM_PLANE_CAN_UPDATE_DISABLED |
+						   DRM_PLANE_REQUIRE_MATCHING_FB);
 }
 
 static void mxsfb_plane_primary_atomic_update(struct drm_plane *plane,