diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2019-04-30 01:39:20 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2019-04-30 01:39:20 +0000 |
commit | d27fac0ea6d8f135821a53cf35893d80de612921 (patch) | |
tree | f004386b33701bdc72e62c8d3333c328251b596e | |
parent | 8436fd1223c3f2ccd82029e2dc6d56e46b0592ae (diff) |
Add an equivalent test for master in drm_fb_helper_is_bound()
Prevents black screens on hotplugging a new display with Xorg running
which required a vt switch for screens to be useable.
Reported by various people on misc@. Tested by and ok sthen@
-rw-r--r-- | sys/dev/pci/drm/drm_fb_helper.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/drm_fb_helper.c b/sys/dev/pci/drm/drm_fb_helper.c index 237f274ebe1..785ed969911 100644 --- a/sys/dev/pci/drm/drm_fb_helper.c +++ b/sys/dev/pci/drm/drm_fb_helper.c @@ -575,6 +575,9 @@ static bool drm_fb_helper_is_bound(struct drm_fb_helper *fb_helper) #ifdef notyet if (READ_ONCE(dev->master)) return false; +#else + if (!SPLAY_EMPTY(&dev->files)) + return false; #endif drm_for_each_crtc(crtc, dev) { |