]> git.ipfire.org Git - thirdparty/plymouth.git/commit
ply-device-manager: Create renderer for simpledrm devices right away
authorHans de Goede <hdegoede@redhat.com>
Tue, 4 Jun 2024 21:07:19 +0000 (23:07 +0200)
committerHans de Goede <hdegoede@redhat.com>
Fri, 7 Jun 2024 15:21:00 +0000 (17:21 +0200)
commit2f8b64ea4c6cefca6569ab94dc37d436a3fbf048
tree1977fe8672ac568bdc88716d56d47de4f345cfe0
parent8c0d5965030aae11249cbe1e42decc0654005c39
ply-device-manager: Create renderer for simpledrm devices right away

Often when plymouth starts and enumerates udev devices which are already
present at start (coldplug detection), udev is still initializing all
the devices and it reports 0 for udev_device_get_is_initialized ().

It may take a long time for the state of the simpledrm udev device
to change to initialized and for a udev add event to be send.

Especially when the amdgpu kernel module is involved which is very
large for a kernel module and can take op to 7 seconds to load.

In this case it is even possible for plymouth's default DeviceTimeout
of 8 seconds to trigger before the simpledrm device is considered
initialized. See for example these lines extracted from the plymouth-debug
log attached to: https://bugzilla.redhat.com/show_bug.cgi?id=2183743

  00:00:02.909 ../src/libply-splash-core/ply-device-manager.c:498:create_devi: found device /sys/devices/pci0000:00/0000:00:01.0/simple-framebuffer.0/drm/card0
  00:00:02.910 ../src/libply-splash-core/ply-device-manager.c:513:create_devi: it's not initialized
  00:00:10.917 ../src/libply-splash-core/ply-device-manager.c:1237:create_dev: Timeout elapsed, looking for devices from udev
  00:00:10.918 ../src/libply-splash-core/ply-device-manager.c:498:create_devi: found device /sys/devices/pci0000:00/0000:00:01.0/simple-framebuffer.0/drm/card0
  00:00:10.918 ../src/libply-splash-core/ply-device-manager.c:513:create_devi: it's not initialized

This leads to plymouth falling back to the text splash even when
plymouth.use-simpledrm is passed on the kernel commandline.

Add a special case for simpledrm devices and add these during coldboot
even if they are not initialized yet.
src/libply-splash-core/ply-device-manager.c