summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2022-01-25 10:12:18 +0100
committerThomas Zimmermann <tzimmermann@suse.de>2022-01-27 09:19:40 +0100
commit27599aacbaefcbf2af7b06b0029459bbf682000d (patch)
tree9a4fdc11f64d107434e44255be2a40563cf856f0 /include
parent31b0488302c3f142f1e7f510b711ec40f625e493 (diff)
downloadlinux-27599aacbaefcbf2af7b06b0029459bbf682000d.tar.bz2
fbdev: Hot-unplug firmware fb devices on forced removal
Hot-unplug all firmware-framebuffer devices as part of removing them via remove_conflicting_framebuffers() et al. Releases all memory regions to be acquired by native drivers. Firmware, such as EFI, install a framebuffer while posting the computer. After removing the firmware-framebuffer device from fbdev, a native driver takes over the hardware and the firmware framebuffer becomes invalid. Firmware-framebuffer drivers, specifically simplefb, don't release their device from Linux' device hierarchy. It still owns the firmware framebuffer and blocks the native drivers from loading. This has been observed in the vmwgfx driver. [1] Initiating a device removal (i.e., hot unplug) as part of remove_conflicting_framebuffers() removes the underlying device and returns the memory range to the system. [1] https://lore.kernel.org/dri-devel/20220117180359.18114-1-zack@kde.org/ v2: * rename variable 'dev' to 'device' (Javier) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reported-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Reviewed-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> CC: stable@vger.kernel.org # v5.11+ Link: https://patchwork.freedesktop.org/patch/msgid/20220125091222.21457-2-tzimmermann@suse.de
Diffstat (limited to 'include')
-rw-r--r--include/linux/fb.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 6f3db99ab990..ac294fc4c07b 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -502,6 +502,7 @@ struct fb_info {
} *apertures;
bool skip_vt_switch; /* no VT switch on suspend/resume required */
+ bool forced_out; /* set when being removed by another driver */
};
static inline struct apertures_struct *alloc_apertures(unsigned int max_num) {