Commit 179f158c authored by Daniel Vetter's avatar Daniel Vetter

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 <robdclark@gmail.com>
Reviewed-by: default avatarRob Clark <robdclark@gmail.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
parent a97df1cc
...@@ -355,6 +355,7 @@ drm_setclientcap(struct drm_device *dev, void *data, struct drm_file *file_priv) ...@@ -355,6 +355,7 @@ drm_setclientcap(struct drm_device *dev, void *data, struct drm_file *file_priv)
if (req->value > 1) if (req->value > 1)
return -EINVAL; return -EINVAL;
file_priv->atomic = req->value; file_priv->atomic = req->value;
file_priv->universal_planes = req->value;
break; break;
default: default:
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment