[RFC PATCH 3/3] drm: mxsfb: enforce framebuffer size matches plane size
Stefan Agner
stefan at agner.ch
Thu Sep 10 09:24:25 UTC 2020
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 at agner.ch>
---
drivers/gpu/drm/mxsfb/mxsfb_kms.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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,
--
2.28.0
More information about the dri-devel
mailing list