From: Gurchetan Singh Date: Wed, 19 Jul 2017 15:37:06 +0000 (-0700) Subject: xf86drm: continue after drmProcessPlatformDevice failure X-Git-Tag: libdrm-2.4.83~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5226b52773e0a9972cd1e0dade55cb9ae869941c;p=platform%2Fupstream%2Flibdrm.git 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: correct the host1x platforms as well] Signed-off-by: Emil Velikov --- diff --git a/xf86drm.c b/xf86drm.c index 879f85b..f306c9b 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -3997,7 +3997,7 @@ int drmGetDevices2(uint32_t flags, drmDevicePtr devices[], int max_devices) ret = drmProcessPlatformDevice(&device, node, node_type, maj, min, devices != NULL, flags); if (ret) - goto free_devices; + continue; break; @@ -4005,7 +4005,7 @@ int drmGetDevices2(uint32_t flags, drmDevicePtr devices[], int max_devices) ret = drmProcessHost1xDevice(&device, node, node_type, maj, min, devices != NULL, flags); if (ret) - goto free_devices; + continue; break;