From: Eric Anholt Date: Wed, 17 Jun 2020 18:25:17 +0000 (-0700) Subject: turnip: Do better TU_DEBUG=startup logging of drmGetDevices2() failure. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e67c2e1c96c17b5b57f214297adba2a8a302f994;p=mesa.git turnip: Do better TU_DEBUG=startup logging of drmGetDevices2() failure. Part-of: --- diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c index 43ed5f6e4a8..dd046f39eef 100644 --- a/src/freedreno/vulkan/tu_device.c +++ b/src/freedreno/vulkan/tu_device.c @@ -501,8 +501,12 @@ tu_enumerate_devices(struct tu_instance *instance) max_devices = drmGetDevices2(0, devices, ARRAY_SIZE(devices)); - if (instance->debug_flags & TU_DEBUG_STARTUP) - tu_logi("Found %d drm nodes", max_devices); + if (instance->debug_flags & TU_DEBUG_STARTUP) { + if (max_devices < 0) + tu_logi("drmGetDevices2 returned error: %s\n", strerror(max_devices)); + else + tu_logi("Found %d drm nodes", max_devices); + } if (max_devices < 1) return vk_error(instance, VK_ERROR_INCOMPATIBLE_DRIVER);