[Intel-gfx] [PATCH] drm: Require universal_planes for atomic
Daniel Vetter
daniel.vetter at ffwll.ch
Fri Dec 19 01:37:05 PST 2014
Atomic doesn't really work without universal planes anyway. But make
sure that evil userspace doesn't pull the kernel over the table
because we didn't consider a cornercase that just doesn't make sense,
just for safety.
Only requirement imposed on userspace by this is that it asks for
universal planes before it asks for atomic.
Cc: Rob Clark <robdclark at gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
drivers/gpu/drm/drm_ioctl.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
index 5cb405812245..255bf5d45037 100644
--- a/drivers/gpu/drm/drm_ioctl.c
+++ b/drivers/gpu/drm/drm_ioctl.c
@@ -350,6 +350,8 @@ drm_setclientcap(struct drm_device *dev, void *data, struct drm_file *file_priv)
/* for now, hide behind experimental drm.atomic moduleparam */
if (!drm_atomic)
return -EINVAL;
+ if (!file_priv->universal_planes)
+ return -EINVAL;
if (!drm_core_check_feature(dev, DRIVER_ATOMIC))
return -EINVAL;
if (req->value > 1)
--
2.1.3
More information about the Intel-gfx
mailing list