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
This commit is contained in:
Derek Foreman 2018-01-05 11:37:38 -06:00
parent 5c5e29daa5
commit c264ef264f
1 changed files with 4 additions and 3 deletions

View File

@ -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)