ecore-drm: Fix drm cards on ARM platform not having boot_vga parameter

Summary:
On some ARM platforms, the drivers do not list boot_vga as an
attribute, so we cannot do checks for that. This patch fixes finding
drm cards on those platforms by skipping the boot_vga check if we had
to use "platform" to find it.

Thanks to shiin for the report :)

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2014-10-08 10:06:45 -04:00
parent 1c77bdf2d1
commit 7135d1967d
1 changed files with 12 additions and 5 deletions

View File

@ -152,6 +152,7 @@ ecore_drm_device_find(const char *name, const char *seat)
{
Ecore_Drm_Device *dev = NULL;
Eina_Bool found = EINA_FALSE;
Eina_Bool platform = EINA_FALSE;
Eina_List *devs, *l;
const char *device;
@ -189,17 +190,23 @@ ecore_drm_device_find(const char *name, const char *seat)
{
devparent =
eeze_udev_syspath_get_parent_filtered(device, "platform", NULL);
platform = EINA_TRUE;
}
if (devparent)
{
const char *id;
if ((id = eeze_udev_syspath_get_sysattr(devparent, "boot_vga")))
if (!platform)
{
if (!strcmp(id, "1")) found = EINA_TRUE;
eina_stringshare_del(id);
const char *id;
if ((id = eeze_udev_syspath_get_sysattr(devparent, "boot_vga")))
{
if (!strcmp(id, "1")) found = EINA_TRUE;
eina_stringshare_del(id);
}
}
else
found = EINA_TRUE;
eina_stringshare_del(devparent);
}