From: Daniel Vetter Date: Fri, 19 Dec 2014 09:33:52 +0000 (+0100) Subject: drm: Ensure universal_planes is set for atomic X-Git-Tag: MMI-PSA29.97-13-9~10619^2~44^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=179f158ccf15fb9425f53d589d1b48eab90449a6;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Reviewed-by: Rob Clark Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c index 5cb405812245..3785d66721f2 100644 --- a/drivers/gpu/drm/drm_ioctl.c +++ b/drivers/gpu/drm/drm_ioctl.c @@ -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;