Thread (48 messages) 48 messages, 6 authors, 2017-04-06
STALE3383d

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

From: Liviu.Dudau@arm.com (Liviu Dudau)
Date: 2017-03-31 10:21:35
Also in: dri-devel

On Fri, Mar 31, 2017 at 01:11:23PM +0300, Ville Syrj?l? wrote:
On Fri, Mar 31, 2017 at 10:51:52AM +0100, Russell King wrote:
quoted
hdlcd does not support rotation - check for it and reject plane updates
that try to rotate a plane.

Signed-off-by: Russell King <redacted>
---
 drivers/gpu/drm/arm/hdlcd_crtc.c | 4 ++++
 1 file changed, 4 insertions(+)
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;
This can't happen unless you attach a rotation property with a bogus
set of supported rotations to the plane.
Which we don't. I did toy with the idea of adding it as one can hack support for 0? and 180?
rotation by playing with the line pitch, I've even created a patch but in the end I've
decided not to publish it. If there is anyone interested at some moment on this, I can dig it out.

Best regards,
Liviu
quoted
+
 	crtc_state = drm_atomic_get_existing_crtc_state(state->state, crtc);
 	if (!crtc_state->enable)
 		return -EINVAL;
-- 
2.7.4
-- 
Ville Syrj?l?
Intel OTC
-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ?\_(?)_/?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help