diff options
author | 2020-05-11 05:20:35 +0000 | |
---|---|---|
committer | 2020-05-11 05:20:35 +0000 | |
commit | 839f741573ad7c436e44facd03dbdcbee9e4f395 (patch) | |
tree | 5922dbd078d85930cc6849d832f53dcfee623d04 | |
parent | drm/amdgpu: Fix oops when pp_funcs is unset in ACPI event (diff) | |
download | wireguard-openbsd-839f741573ad7c436e44facd03dbdcbee9e4f395.tar.xz wireguard-openbsd-839f741573ad7c436e44facd03dbdcbee9e4f395.zip |
drm/atomic: Take the atomic toys away from X
From Daniel Vetter
7c9af5cd6a7df58f47eac607cc5ab770d808ba82 in linux 4.19.y/4.19.122
26b1d3b527e7bf3e24b814d617866ac5199ce68d in mainline linux
-rw-r--r-- | sys/dev/pci/drm/drm_ioctl.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/drm_ioctl.c b/sys/dev/pci/drm/drm_ioctl.c index 7f403ce47a5..2cb70c833d0 100644 --- a/sys/dev/pci/drm/drm_ioctl.c +++ b/sys/dev/pci/drm/drm_ioctl.c @@ -294,7 +294,16 @@ drm_setclientcap(struct drm_device *dev, void *data, struct drm_file *file_priv) case DRM_CLIENT_CAP_ATOMIC: if (!drm_core_check_feature(dev, DRIVER_ATOMIC)) return -EINVAL; - if (req->value > 1) + /* The modesetting DDX has a totally broken idea of atomic. */ +#ifdef __linux__ + if (current->comm[0] == 'X' && req->value == 1) { +#else + if (curproc->p_p->ps_comm[0] == 'X' && req->value == 1) { +#endif + pr_info("broken atomic modeset userspace detected, disabling atomic\n"); + return -EOPNOTSUPP; + } + if (req->value > 2) return -EINVAL; file_priv->atomic = req->value; file_priv->universal_planes = req->value; |