Message ID | 1418981825-4291-1-git-send-email-daniel.vetter@ffwll.ch (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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)
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@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> --- drivers/gpu/drm/drm_ioctl.c | 2 ++ 1 file changed, 2 insertions(+)