diff options
author | Eric Anholt <[email protected]> | 2020-06-17 11:25:17 -0700 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-06-26 19:34:17 +0000 |
commit | e67c2e1c96c17b5b57f214297adba2a8a302f994 (patch) | |
tree | e8cd016774411d44e08e1336afb3b4c519d5d948 /src/freedreno | |
parent | aba8c579a9780f9d3ad2d677f9ef625df7726479 (diff) |
turnip: Do better TU_DEBUG=startup logging of drmGetDevices2() failure.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2769>
Diffstat (limited to 'src/freedreno')
-rw-r--r-- | src/freedreno/vulkan/tu_device.c | 8 |
1 files changed, 6 insertions, 2 deletions
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); |