summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm2
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2018-01-05 11:37:38 -0600
committerDerek Foreman <derekf@osg.samsung.com>2018-01-05 11:51:22 -0600
commitc264ef264f0936632a1603fef45c59a50369631d (patch)
tree7ec51ffb61a04ba3733c49b943aeb96f6da36442 /src/lib/ecore_drm2
parent5c5e29daa5455bc625b8287cf2437197e49ffa2a (diff)
downloadefl-c264ef264f0936632a1603fef45c59a50369631d.tar.gz
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')
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_device.c7
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 *
_drm2_device_find(Elput_Manager *em, const char *seat)
{
Eina_List *devs, *l;
- const char *dev, *ret = NULL;
+ const char *dev, *ret = NULL, *chosen_dev = NULL;
Eina_Bool found = EINA_FALSE;
Eina_Bool platform = EINA_FALSE;
Eina_Bool modeset;
@@ -141,6 +141,7 @@ _drm2_device_find(Elput_Manager *em, const char *seat)
{
const char *id;
+ chosen_dev = dev;
id = eeze_udev_syspath_get_sysattr(dparent, "boot_vga");
if (id)
{
@@ -160,9 +161,9 @@ cont:
if (found) break;
}
- if (!found) goto out;
+ if (!chosen_dev) goto out;
- ret = eeze_udev_syspath_get_devpath(dev);
+ ret = eeze_udev_syspath_get_devpath(chosen_dev);
out:
EINA_LIST_FREE(devs, dev)