summaryrefslogtreecommitdiff
path: root/src/libply-splash-core/ply-device-manager.c
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2014-03-03 17:25:44 -0500
committerRay Strode <rstrode@redhat.com>2014-03-03 17:31:27 -0500
commit97f02ee959374afb1b8a78dc67116cd880cf2d23 (patch)
treef756c6792c51cb4f163912d8a9f57c1096df4400 /src/libply-splash-core/ply-device-manager.c
parentf32df0332cda4d8af545ea177cb89acf3e0470bb (diff)
device-manager: defer /dev/fb compat processing until after coldplug
We never want to use a /dev/fb device if a DRM device will work instead (since it supports multi-monitor, isn't a legacy interface, etc) Unfortunately, right now plymouthd notices efifb at early start up, see's there is no DRM device associated with it and chooses it for the main display, which causes all sort of problems. This commit defers using /dev/fb devices until after udev settles.
Diffstat (limited to 'src/libply-splash-core/ply-device-manager.c')
-rw-r--r--src/libply-splash-core/ply-device-manager.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/libply-splash-core/ply-device-manager.c b/src/libply-splash-core/ply-device-manager.c
index 25f7d546..d06e1b5d 100644
--- a/src/libply-splash-core/ply-device-manager.c
+++ b/src/libply-splash-core/ply-device-manager.c
@@ -188,8 +188,9 @@ create_seat_for_udev_device (ply_device_manager_t *manager,
ply_renderer_type_t renderer_type = PLY_RENDERER_TYPE_NONE;
subsystem = udev_device_get_subsystem (device);
+ ply_trace ("device subsystem is %s", subsystem);
- if (strcmp (subsystem, SUBSYSTEM_DRM) == 0)
+ if (subsystem != NULL && strcmp (subsystem, SUBSYSTEM_DRM) == 0)
{
ply_trace ("found DRM device %s", device_path);
renderer_type = PLY_RENDERER_TYPE_DRM;
@@ -359,9 +360,26 @@ on_udev_event (ply_device_manager_t *manager)
return;
if (strcmp (action, "add") == 0)
- create_seat_for_udev_device (manager, device);
+ {
+ const char *subsystem;
+ bool coldplug_complete = manager->udev_queue_fd_watch == NULL;
+
+ subsystem = udev_device_get_subsystem (device);
+
+ if (strcmp (subsystem, SUBSYSTEM_DRM) == 0 ||
+ coldplug_complete)
+ {
+ create_seat_for_udev_device (manager, device);
+ }
+ else
+ {
+ ply_trace ("ignoring since we only handle subsystem %s devices after coldplug completes", subsystem);
+ }
+ }
else if (strcmp (action, "remove") == 0)
- free_seat_for_udev_device (manager, device);
+ {
+ free_seat_for_udev_device (manager, device);
+ }
udev_device_unref (device);
}