diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2018-01-05 11:37:38 -0600 |
---|---|---|
committer | Derek Foreman <derekf@osg.samsung.com> | 2018-01-05 11:51:22 -0600 |
commit | c264ef264f0936632a1603fef45c59a50369631d (patch) | |
tree | 7ec51ffb61a04ba3733c49b943aeb96f6da36442 /src/lib/ecore_drm2/ecore_drm2_device.c | |
parent | 5c5e29daa5455bc625b8287cf2437197e49ffa2a (diff) |
ecore_drm2: Don't fail if there's no boot_vga device
In a multi-seat configuration it's quite likely that only one
seat will have a boot_vga device.
While we should use the boot_vga device if possible, we shouldn't
fail just because a seat's gpu isn't the boot_vga device. Fallback
to the last viable drm device we saw.
Reported-by: n3rdopolis
ref D5712
ref T6455
Diffstat (limited to 'src/lib/ecore_drm2/ecore_drm2_device.c')
-rw-r--r-- | src/lib/ecore_drm2/ecore_drm2_device.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_device.c b/src/lib/ecore_drm2/ecore_drm2_device.c index 21963c98fb..67cfebbd8c 100644 --- a/src/lib/ecore_drm2/ecore_drm2_device.c +++ b/src/lib/ecore_drm2/ecore_drm2_device.c | |||
@@ -95,7 +95,7 @@ static const char * | |||
95 | _drm2_device_find(Elput_Manager *em, const char *seat) | 95 | _drm2_device_find(Elput_Manager *em, const char *seat) |
96 | { | 96 | { |
97 | Eina_List *devs, *l; | 97 | Eina_List *devs, *l; |
98 | const char *dev, *ret = NULL; | 98 | const char *dev, *ret = NULL, *chosen_dev = NULL; |
99 | Eina_Bool found = EINA_FALSE; | 99 | Eina_Bool found = EINA_FALSE; |
100 | Eina_Bool platform = EINA_FALSE; | 100 | Eina_Bool platform = EINA_FALSE; |
101 | Eina_Bool modeset; | 101 | Eina_Bool modeset; |
@@ -141,6 +141,7 @@ _drm2_device_find(Elput_Manager *em, const char *seat) | |||
141 | { | 141 | { |
142 | const char *id; | 142 | const char *id; |
143 | 143 | ||
144 | chosen_dev = dev; | ||
144 | id = eeze_udev_syspath_get_sysattr(dparent, "boot_vga"); | 145 | id = eeze_udev_syspath_get_sysattr(dparent, "boot_vga"); |
145 | if (id) | 146 | if (id) |
146 | { | 147 | { |
@@ -160,9 +161,9 @@ cont: | |||
160 | if (found) break; | 161 | if (found) break; |
161 | } | 162 | } |
162 | 163 | ||
163 | if (!found) goto out; | 164 | if (!chosen_dev) goto out; |
164 | 165 | ||
165 | ret = eeze_udev_syspath_get_devpath(dev); | 166 | ret = eeze_udev_syspath_get_devpath(chosen_dev); |
166 | 167 | ||
167 | out: | 168 | out: |
168 | EINA_LIST_FREE(devs, dev) | 169 | EINA_LIST_FREE(devs, dev) |