From 817b8dd7a98c456c0c3abf3010aa90e5b8f7713d Mon Sep 17 00:00:00 2001 From: lfdevs <109842948+lfdevs@users.noreply.github.com> Date: Sat, 25 Apr 2026 14:48:31 +0800 Subject: [PATCH] tu/kgsl: drop strict KHR_display check during initialization Currently, `tu_knl_kgsl_load` explicitly fails with `VK_ERROR_INITIALIZATION_FAILED` if the application enables the `VK_KHR_display` instance extension. This causes applications that blindly enable all available instance extensions (such as `vkcube` or WSI layers) to fail device enumeration completely in environments where KMS/DRM support is compiled alongside KGSL (i.e. when VK_USE_PLATFORM_DISPLAY_KHR is exposed). The proper WSI display fallback behavior (returning 0 displays when the DRM master fd is invalid/missing) is already correctly handled by `wsi_display_init_wsi` and `wsi_GetPhysicalDeviceDisplayPropertiesKHR`. Thus, it is safe and more compliant to drop this aggressive check, allowing Vulkan physical device enumeration to succeed even if the display extension was requested. --- src/freedreno/vulkan/tu_knl_kgsl.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/freedreno/vulkan/tu_knl_kgsl.cc b/src/freedreno/vulkan/tu_knl_kgsl.cc index c01160ea1f3..feeb4f2c288 100644 --- a/src/freedreno/vulkan/tu_knl_kgsl.cc +++ b/src/freedreno/vulkan/tu_knl_kgsl.cc @@ -1754,10 +1754,7 @@ tu_kgsl_get_raytracing(int fd) VkResult tu_knl_kgsl_load(struct tu_instance *instance, int fd) { - if (instance->vk.enabled_extensions.KHR_display) { - return vk_errorf(instance, VK_ERROR_INITIALIZATION_FAILED, - "I can't KHR_display"); - } + struct tu_physical_device *device = (struct tu_physical_device *) vk_zalloc(&instance->vk.alloc, sizeof(*device), 8,