diff mbox

[3/3] drm/arm: hdlcd: check for rotation

Message ID E1cttDk-00067G-1b@rmk-PC.armlinux.org.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Russell King (Oracle) March 31, 2017, 9:51 a.m. UTC
hdlcd does not support rotation - check for it and reject plane updates
that try to rotate a plane.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 drivers/gpu/drm/arm/hdlcd_crtc.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

diff --git a/drivers/gpu/drm/arm/hdlcd_crtc.c b/drivers/gpu/drm/arm/hdlcd_crtc.c
index cf70184fd028..171acc842368 100644
--- a/drivers/gpu/drm/arm/hdlcd_crtc.c
+++ b/drivers/gpu/drm/arm/hdlcd_crtc.c
@@ -215,6 +215,10 @@  static int hdlcd_plane_atomic_check(struct drm_plane *plane,
 	if (!crtc)
 		return 0;
 
+	/* We do not support rotation */
+	if (state->rotation != DRM_ROTATE_0)
+		return -EINVAL;
+
 	crtc_state = drm_atomic_get_existing_crtc_state(state->state, crtc);
 	if (!crtc_state->enable)
 		return -EINVAL;