Commit ef200005 authored by Ray Strode's avatar Ray Strode
Browse files

native: only match drm subsystem devices

Despite g_udev_client_new taking a list of subsystems, it doesn't
implicitly filter results to those subsystems.

This commit explicitly adds a subsystem match to make sure sound cards
don't end up in the resulting list of video cards.
parent 8a7876de
......@@ -295,6 +295,11 @@ get_primary_gpu_path (const gchar *seat_name)
g_udev_enumerator_add_match_name (enumerator, "card*");
g_udev_enumerator_add_match_tag (enumerator, "seat");
/* We need to explicitly match the subsystem for now.
g_udev_enumerator_add_match_subsystem (enumerator, "drm");
devices = g_udev_enumerator_execute (enumerator);
if (!devices)
goto out;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment