diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-05-11 05:20:36 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-05-11 05:20:36 +0000 |
commit | f343fbe56b7089e4340c469bda4b43785e4ec185 (patch) | |
tree | 219babb50e464f864923117c609943da131024dc /sys/dev/pci | |
parent | e20200c9fd37129beb8578aeed74bcdffdc34588 (diff) |
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
Diffstat (limited to 'sys/dev/pci')
-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; |