projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd2ef25
)
drm/atomic: Reject attempts to use multiple rotation angles at once
author
Ville Syrjälä
<ville.syrjala@linux.intel.com>
Mon, 26 Sep 2016 16:30:47 +0000
(19:30 +0300)
committer
Daniel Vetter
<daniel.vetter@ffwll.ch>
Fri, 21 Oct 2016 16:22:14 +0000
(18:22 +0200)
The rotation property should only accept exactly one rotation angle
at once. Let's reject attempts to set none or multiple angles.
Testcase: igt/kms_rotation_crc/bad-rotation
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link:
http://patchwork.freedesktop.org/patch/msgid/1474907460-10717-3-git-send-email-ville.syrjala@linux.intel.com
drivers/gpu/drm/drm_atomic.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/drm_atomic.c
b/drivers/gpu/drm/drm_atomic.c
index 5dd70540219c18fbd6114ed3addcec84dbefa133..13ce95ee458e2dc0b6dd819b9dc6f7540891ac95 100644
(file)
--- a/
drivers/gpu/drm/drm_atomic.c
+++ b/
drivers/gpu/drm/drm_atomic.c
@@
-706,6
+706,8
@@
int drm_atomic_plane_set_property(struct drm_plane *plane,
} else if (property == config->prop_src_h) {
state->src_h = val;
} else if (property == config->rotation_property) {
+ if (!is_power_of_2(val & DRM_ROTATE_MASK))
+ return -EINVAL;
state->rotation = val;
} else if (property == plane->zpos_property) {
state->zpos = val;