mirror-linux/drivers
Thomas Zimmermann 27599aacba 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
2022-01-27 09:19:40 +01:00
..
accessibility
acpi Merge branch 'acpi-properties' 2021-11-26 19:45:31 +01:00
amba
android binder: use wake_up_pollfree() 2021-12-09 10:49:56 -08:00
ata libata: add horkage for ASMedia 1092 2021-12-09 11:20:47 +09:00
atm
auxdisplay
base
bcma
block block-5.16-2021-12-03 2021-12-04 08:38:25 -08:00
bluetooth
bus bus: mhi: core: Add support for forced PM resume 2021-12-09 18:47:05 +01:00
cdrom
char agp/via: Remove unused variable 'current_size' 2022-01-14 15:16:02 +01:00
clk Linux 5.16-rc5 2021-12-14 10:24:28 +01:00
clocksource clocksource/drivers/arm_arch_timer: Force inlining of erratum_set_next_event_generic() 2021-12-10 17:47:00 +01:00
comedi
connector
counter
cpufreq cpufreq: Fix a comment in cpufreq_policy_free 2021-12-01 20:02:11 +01:00
cpuidle
crypto
cxl
dax
dca
devfreq
dio
dma
dma-buf dma-buf: drop excl_fence parameter from dma_resv_get_fences 2022-01-19 10:03:56 +01:00
edac
eisa
extcon
firewire
firmware firmware: smccc: Fix check for ARCH_SOC_ID not implemented 2021-11-22 11:42:59 +01:00
fpga
fsi
gnss
gpio
gpu gpu: drm: panel-edp: Add panels planned for sc7180-trogdor-pazquel 2022-01-26 08:05:57 -08:00
greybus
hid HID: Ignore battery for Elan touchscreen on Asus UX550VE 2021-12-08 18:16:07 +01:00
hsi
hv
hwmon hwmon: (pwm-fan) Ensure the fan going on in .probe() 2021-11-30 06:44:18 -08:00
hwspinlock
hwtracing
i2c i2c: mpc: Use atomic read and fix break condition 2021-12-10 22:27:30 +01:00
i3c
idle
iio iio: trigger: stm32-timer: fix MODULE_ALIAS 2021-12-04 15:37:02 +00:00
infiniband RDMA/irdma: Don't arm the CQ more than two times if no CE for this CQ 2021-12-07 13:53:01 -04:00
input xen: add "not_essential" flag to struct xenbus_driver 2021-11-23 13:41:29 -06:00
interconnect
iommu iommu/vt-d: Fix unmap_pages support 2021-11-26 22:54:47 +01:00
ipack
irqchip irqchip/irq-bcm7120-l2: Add put_device() after of_find_device_by_node() 2021-12-10 13:23:13 +00:00
isdn
leds
macintosh
mailbox
mcb
md md: fix double free of mddev->private in autorun_array() 2021-12-10 09:11:07 -08:00
media media fixes for v5.16-rc3 2021-11-22 14:58:57 -08:00
memory memory: mtk-smi: Fix a null dereference for the ostd 2021-11-25 14:46:00 +01:00
memstick
message
mfd
misc misc: rtsx: Avoid mangling IRQ during runtime PM 2021-12-03 14:32:00 +01:00
mmc mmc: mediatek: free the ext_csd when mmc_get_ext_csd success 2021-12-09 10:30:11 +01:00
most
mtd Revert "mtd_blkdevs: don't scan partitions for plain mtdblock" 2021-12-10 11:52:34 -07:00
mux
net Char/misc driver fixes for 5.16-rc5 2021-12-12 10:16:34 -08:00
nfc nfc: virtual_ncidev: change default device permissions 2021-11-26 11:14:31 -08:00
ntb
nubus
nvdimm
nvme nvmet-tcp: fix possible list corruption for unexpected command failure 2021-12-08 16:36:58 +01:00
nvmem
of Merge drm/drm-next into drm-misc-next 2021-12-16 14:48:27 +01:00
opp
parisc
parport
pci pci-v5.16-fixes-2 2021-12-10 11:56:05 -08:00
pcmcia
perf
phy phy: HiSilicon: Fix copy and paste bug in error handling 2021-11-23 10:42:13 +05:30
pinctrl
platform platform/chrome: Add driver for ChromeOS privacy-screen 2022-01-10 12:17:37 +01:00
pnp
power
powercap powercap: DTPM: Drop unused local variable from init_dtpm() 2021-12-03 17:51:59 +01:00
pps
ps3
ptp ptp: ocp: Fix a couple NULL vs IS_ERR() checks 2021-11-18 12:12:55 +00:00
pwm Merge drm/drm-next into drm-misc-next 2021-11-18 09:36:39 +01:00
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390
sbus
scsi SCSI fixes on 20211211 2021-12-11 16:28:27 -08:00
sh
siox
slimbus
soc
soundwire
spi spi: Fixes for v5.16 2021-11-18 14:35:41 -08:00
spmi
ssb
staging
target scsi: target: configfs: Delete unnecessary checks for NULL 2021-11-18 23:07:02 -05:00
tc
tee
thermal thermal: int340x: Fix VCoRefLow MMIO bit offset for TGL 2021-12-08 15:29:22 +01:00
thunderbolt
tty TTY/Serial fixes for 5.16-rc4 2021-12-05 09:13:20 -08:00
uio
usb USB fixes for 5.16-rc5 2021-12-12 10:20:57 -08:00
vdpa vdpa_sim: avoid putting an uninitialized iova_domain 2021-11-24 19:00:29 -05:00
vfio vfio/pci: Fix OpRegion read 2021-11-30 11:41:49 -07:00
vhost vhost-vdpa: clean irqs before reseting vdpa device 2021-11-24 19:00:28 -05:00
video fbdev: Hot-unplug firmware fb devices on forced removal 2022-01-27 09:19:40 +01:00
virt
virtio Revert "virtio_ring: validate used buffer length" 2021-11-24 18:47:27 -05:00
visorbus
vlynq
vme
w1
watchdog
xen xen: detect uninitialized xenbus in xenbus_init 2021-11-24 08:55:15 -06:00
zorro
Kconfig
Makefile