From f7d45cb3623a5c1c8e8121330fe83b12bed1e455 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 18 Sep 2024 13:29:25 -0400 Subject: [PATCH] tu/virtio: silence startup spam on asahi quiet a big pile of: TU: error: ../src/freedreno/vulkan/tu_knl_drm_virtio.cc:1299: could not get connect vdrm: No such file or directory (VK_ERROR_INCOMPATIBLE_DRIVER) Signed-off-by: Alyssa Rosenzweig Part-of: --- src/freedreno/vulkan/tu_knl_drm_virtio.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/freedreno/vulkan/tu_knl_drm_virtio.cc b/src/freedreno/vulkan/tu_knl_drm_virtio.cc index 0716c0df2ea..b873d062bf9 100644 --- a/src/freedreno/vulkan/tu_knl_drm_virtio.cc +++ b/src/freedreno/vulkan/tu_knl_drm_virtio.cc @@ -1297,10 +1297,18 @@ tu_knl_drm_virtio_load(struct tu_instance *instance, version->name); } + /* Try to connect. If this doesn't work, it's probably because we're running + * in a non-Adreno VM. Unless startup debug info is specifically requested, + * we should silently exit and let another Vulkan driver try probing instead. + */ vdrm = vdrm_device_connect(fd, VIRTGPU_DRM_CONTEXT_MSM); if (!vdrm) { - return vk_startup_errorf(instance, VK_ERROR_INCOMPATIBLE_DRIVER, - "could not get connect vdrm: %s", strerror(errno)); + if (TU_DEBUG(STARTUP)) { + return vk_startup_errorf(instance, VK_ERROR_INCOMPATIBLE_DRIVER, + "could not get connect vdrm: %s", strerror(errno)); + } else { + return VK_ERROR_INCOMPATIBLE_DRIVER; + } } caps = vdrm->caps;