dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xf86drm: continue after drmProcessPlatformDevice failure
@ 2017-07-19 15:37 Gurchetan Singh
  2017-07-20 11:33 ` Emil Velikov
  2017-07-20 13:47 ` Thierry Reding
  0 siblings, 2 replies; 3+ messages in thread
From: Gurchetan Singh @ 2017-07-19 15:37 UTC (permalink / raw)
  To: dri-devel; +Cc: thierry.reding, emil.l.velikov, Gurchetan Singh

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.
---
 xf86drm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xf86drm.c b/xf86drm.c
index 879f85b6..50862f22 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;
 
-- 
2.12.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-20 13:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-19 15:37 [PATCH] xf86drm: continue after drmProcessPlatformDevice failure Gurchetan Singh
2017-07-20 11:33 ` Emil Velikov
2017-07-20 13:47 ` Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox