aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGurchetan Singh2017-07-19 10:37:06 -0500
committerEmil Velikov2017-07-20 06:23:58 -0500
commit5226b52773e0a9972cd1e0dade55cb9ae869941c (patch)
treeca071a95bbca6b4a5dfac8aba6a29b8e61aa4e65 /xf86drm.c
parent23e234a3503f51b9d9c585123d33b936f522808d (diff)
downloadexternal-libdrm-5226b52773e0a9972cd1e0dade55cb9ae869941c.tar.gz
external-libdrm-5226b52773e0a9972cd1e0dade55cb9ae869941c.tar.xz
external-libdrm-5226b52773e0a9972cd1e0dade55cb9ae869941c.zip
xf86drm: continue after drmProcessPlatformDevice failure
On ChromeOS devices, readdir() processes the directory in the following order: -NAME- -TYPE- . n/a .. n/a vgem n/a card1 DRM_BUS_PLATFORM renderD129 DRM_BUS_PLATFORM card0 DRM_BUS_PCI renderD128 DRM_BUS_PCI controlD64 DRM_BUS_PCI In drmGetDevices2, after drmProcessPlatformDevice fails for /dev/dri/card1, we don't process the remaining directory entries. As such, Vulkan fails to initialize since Mesa uses drmGetDevices2. To fix this, continue if drmProcessPlatformDevice fails. Fixes: 7b1f37f474d ("xf86drm: Add platform and host1x bus support") Reviewed-by: Emil Velikov <emil.velikov@collabora.com> [Emil: correct the host1x platforms as well] Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Diffstat (limited to 'xf86drm.c')
-rw-r--r--xf86drm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xf86drm.c b/xf86drm.c
index 879f85b6..f306c9b7 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -3997,7 +3997,7 @@ int drmGetDevices2(uint32_t flags, drmDevicePtr devices[], int max_devices)
3997 ret = drmProcessPlatformDevice(&device, node, node_type, maj, min, 3997 ret = drmProcessPlatformDevice(&device, node, node_type, maj, min,
3998 devices != NULL, flags); 3998 devices != NULL, flags);
3999 if (ret) 3999 if (ret)
4000 goto free_devices; 4000 continue;
4001 4001
4002 break; 4002 break;
4003 4003
@@ -4005,7 +4005,7 @@ int drmGetDevices2(uint32_t flags, drmDevicePtr devices[], int max_devices)
4005 ret = drmProcessHost1xDevice(&device, node, node_type, maj, min, 4005 ret = drmProcessHost1xDevice(&device, node, node_type, maj, min,
4006 devices != NULL, flags); 4006 devices != NULL, flags);
4007 if (ret) 4007 if (ret)
4008 goto free_devices; 4008 continue;
4009 4009
4010 break; 4010 break;
4011 4011