linux-IllusionX/drivers
Javier Martinez Canillas eb79c5cee0
drivers/firmware: skip simpledrm if nvidia-drm.modeset=1 is set
The Nvidia proprietary driver has some bugs that leads to issues if used
with the simpledrm driver. The most noticeable is that does not register
an emulated fbdev device.

It just relies on a fbdev to be registered by another driver, that could
be that could be attached to the framebuffer console. On UEFI machines,
this is the efifb driver.

This means that disabling the efifb driver will cause virtual consoles to
not be present in the system when using the Nvidia driver. Legacy BIOS is
not affected just because fbcon is not used there, but instead vgacon.

Unless a VGA mode is specified using the vga= kernel command line option,
in that case the vesafb driver is used instead and its fbdev attached to
the fbcon.

This is a problem because with CONFIG_SYSFB_SIMPLEFB=y, the sysfb platform
code attempts to register a "simple-framebuffer" platform device (that is
matched against simpledrm) and only registers either an "efi-framebuffer"
or "vesa-framebuffer" if this fails to be registered due the video modes
not being compatible.

The Nvidia driver relying on another driver to register the fbdev is quite
fragile, since it can't really assume those will stick around. For example
there are patches posted to remove the EFI and VESA platform devices once
a real DRM or fbdev driver probes.

But in any case, moving to a simpledrm + emulated fbdev only breaks this
assumption and causes users to not have VT if the Nvidia driver is used.

So to prevent this, let's add a workaround and make the sysfb to skip the
"simple-framebuffer" registration when nvidia-drm.modeset=1 option is set.

This is quite horrible, but honestly I can't think of any other approach.

For this to work, the CONFIG_FB_EFI and CONFIG_FB_VESA config options must
be enabled besides CONFIG_DRM_SIMPLEDRM.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Cherry-picked-for: https://bugs.archlinux.org/task/73720
2024-10-22 20:26:11 +02:00
..
accel
accessibility
acpi
amba
android
ata
atm
auxdisplay
base
bcma
block
bluetooth Bluetooth: btusb: Fix regression with fake CSR controllers 0a12:0001 2024-10-22 15:51:31 +02:00
bus
cache
cdrom
cdx
char
clk
clocksource
comedi
connector
counter
cpufreq
cpuidle
crypto
cxl
dax
dca
devfreq
dio
dma
dma-buf
dpll
edac
eisa
extcon
firewire
firmware drivers/firmware: skip simpledrm if nvidia-drm.modeset=1 is set 2024-10-22 20:26:11 +02:00
fpga
fsi
gnss
gpio
gpu
greybus
hid
hsi
hte
hv
hwmon
hwspinlock
hwtracing
i2c
i3c
idle
iio
infiniband
input
interconnect
iommu
ipack
irqchip irqchip/sifive-plic: Return error code on failure 2024-10-22 15:51:36 +02:00
isdn
leds
macintosh
mailbox
mcb
md
media
memory
memstick
message
mfd
misc misc: microchip: pci1xxxx: add support for NVMEM_DEVID_AUTO for OTP device 2024-10-22 15:51:33 +02:00
mmc
most
mtd
mux
net
nfc
ntb
nubus
nvdimm
nvme
nvmem
of
opp
parisc
parport parport: Proper fix for array out-of-bounds access 2024-10-22 15:51:34 +02:00
pci
pcmcia
peci
perf
phy
pinctrl pinctrl: apple: check devm_kasprintf() returned value 2024-10-22 15:51:35 +02:00
platform
pmdomain
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390
sbus
scsi
sh
siox
slimbus
soc
soundwire
spi
spmi
ssb
staging
target
tc
tee
thermal
thunderbolt
tty serial: qcom-geni: fix receiver enable 2024-10-22 15:51:37 +02:00
ufs
uio
usb usb: dwc3: core: Fix system suspend on TI AM62 platforms 2024-10-22 15:51:33 +02:00
vdpa
vfio
vhost
video
virt
virtio
w1
watchdog
xen
zorro
Kconfig
Makefile