diff options
author | Scott Anderson <ascent12@hotmail.com> | 2017-05-02 18:13:17 +1200 |
---|---|---|
committer | Scott Anderson <ascent12@hotmail.com> | 2017-05-02 18:13:17 +1200 |
commit | e446a5300b742dd8a7f403bf96d1137e91ba1b11 (patch) | |
tree | 8869c45edca511f3743046003725fecbc5d77c9d /backend/drm/udev.c | |
parent | e9d716fc0c294849b627b35f6ea15f60fbdeb522 (diff) |
Added example.
Diffstat (limited to 'backend/drm/udev.c')
-rw-r--r-- | backend/drm/udev.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/backend/drm/udev.c b/backend/drm/udev.c index 6c4aa074..ae99bcfc 100644 --- a/backend/drm/udev.c +++ b/backend/drm/udev.c @@ -94,9 +94,10 @@ int wlr_udev_find_gpu(struct wlr_udev *udev, struct wlr_session *session) const char *id = udev_device_get_sysattr_value(pci, "boot_vga"); if (id && strcmp(id, "1") == 0) is_boot_vga = true; - udev_device_unref(pci); + //udev_device_unref(pci); } + // We already have a valid GPU if (!is_boot_vga && fd >= 0) { udev_device_unref(dev); continue; @@ -107,9 +108,10 @@ int wlr_udev_find_gpu(struct wlr_udev *udev, struct wlr_session *session) continue; } - if (is_boot_vga) { + udev_device_unref(dev); + + if (is_boot_vga) break; - } } udev_enumerate_unref(en); |