drm: Require universal_planes for atomic
Subsystems (2)
PATCH 1/1 drm: Require universal_planes for atomic
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 <[email protected]>
Signed-off-by Daniel Vetter <[email protected]>
--- drivers/gpu/drm/drm_ioctl.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/drm_ioctl.c +2 -0
@@ -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 )
Signature · 6 lines
2.1.3 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/1 drm: Ensure universal_planes is set for atomic
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.
v2: Just force ->universal_planes to the same value to avoid imposing restrictions on userspace.
Cc Rob Clark <[email protected]>
Reviewed-by Rob Clark <[email protected]>
Signed-off-by Daniel Vetter <[email protected]>
--- drivers/gpu/drm/drm_ioctl.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/drm_ioctl.c +1 -0
@@ -355,6 +355,7 @@ drm_setclientcap(struct drm_device *dev, void *data, struct drm_file *file_priv)if (req->value >1 )return -EINVAL ; file_priv->atomic = req->value; + file_priv->universal_planes = req->value;break ;default :return -EINVAL ;
Signature · 6 lines
2.1.3 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel