summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm2
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2018-01-10 12:54:42 -0600
committerDerek Foreman <derekf@osg.samsung.com>2018-01-10 12:54:42 -0600
commit54fede47a9f2984e379cf64ef36beed31bd0c903 (patch)
treed41751eec022029bb2e31e98aa539314018491c2 /src/lib/ecore_drm2
parent324c917a20a34e2f3059c1aff5d72f1cdbd76060 (diff)
ecore_drm2: simplify device selection code
The platform check was added for systems (like ARM) that don't generally have PCI graphics devices. However, now we pick a fallback device that doesn't have a PCI constraint, so the platform check should no longer be necessary.
Diffstat (limited to 'src/lib/ecore_drm2')
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_device.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_device.c b/src/lib/ecore_drm2/ecore_drm2_device.c
index dea67b1ab3..e04f0d38d8 100644
--- a/src/lib/ecore_drm2/ecore_drm2_device.c
+++ b/src/lib/ecore_drm2/ecore_drm2_device.c
@@ -97,7 +97,6 @@ _drm2_device_find(Elput_Manager *em, const char *seat)
97 Eina_List *devs, *l; 97 Eina_List *devs, *l;
98 const char *dev, *ret = NULL, *chosen_dev = 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;
101 Eina_Bool modeset; 100 Eina_Bool modeset;
102 int fd; 101 int fd;
103 102
@@ -130,28 +129,16 @@ _drm2_device_find(Elput_Manager *em, const char *seat)
130 chosen_dev = dev; 129 chosen_dev = dev;
131 130
132 dparent = eeze_udev_syspath_get_parent_filtered(dev, "pci", NULL); 131 dparent = eeze_udev_syspath_get_parent_filtered(dev, "pci", NULL);
133 if (!dparent)
134 {
135 dparent =
136 eeze_udev_syspath_get_parent_filtered(dev, "platform", NULL);
137 platform = EINA_TRUE;
138 }
139
140 if (dparent) 132 if (dparent)
141 { 133 {
142 if (!platform) 134 const char *id;
143 {
144 const char *id;
145 135
146 id = eeze_udev_syspath_get_sysattr(dparent, "boot_vga"); 136 id = eeze_udev_syspath_get_sysattr(dparent, "boot_vga");
147 if (id) 137 if (id)
148 { 138 {
149 if (!strcmp(id, "1")) found = EINA_TRUE; 139 if (!strcmp(id, "1")) found = EINA_TRUE;
150 eina_stringshare_del(id); 140 eina_stringshare_del(id);
151 }
152 } 141 }
153 else
154 found = EINA_TRUE;
155 142
156 eina_stringshare_del(dparent); 143 eina_stringshare_del(dparent);
157 } 144 }