xf86drm: continue after drmProcessPlatformDevice failure
authorGurchetan Singh <gurchetansingh@chromium.org>
Wed, 19 Jul 2017 15:37:06 +0000 (08:37 -0700)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 20 Jul 2017 11:23:58 +0000 (12:23 +0100)
commit5226b52773e0a9972cd1e0dade55cb9ae869941c
treeca071a95bbca6b4a5dfac8aba6a29b8e61aa4e65
parent23e234a3503f51b9d9c585123d33b936f522808d
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>
xf86drm.c