devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7135d1967df70b83bd07fca1a1e749caf90d0159

commit 7135d1967df70b83bd07fca1a1e749caf90d0159
Author: Chris Michael <[email protected]>
Date:   Wed Oct 8 10:06:45 2014 -0400

    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 <[email protected]>
---
 src/lib/ecore_drm/ecore_drm_device.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/src/lib/ecore_drm/ecore_drm_device.c 
b/src/lib/ecore_drm/ecore_drm_device.c
index 7e43ad2..e3e46be 100644
--- a/src/lib/ecore_drm/ecore_drm_device.c
+++ b/src/lib/ecore_drm/ecore_drm_device.c
@@ -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);
           }

-- 


Reply via email to