Skip to content

Commit e201189

Browse files
committed
tu/wsi: unconditionally allow presentation on KGSL devices
KGSL exposes the GPU through /dev/kgsl-3d0, which is not a DRM device. As a result, drmGetDevice2() always fails when called on the KGSL fd, causing wsi_common_drm_devices_equal() to return false and making can_present_on_device() deny all WSI presentation, which breaks vkCreateSwapchainKHR on Adreno devices using the KGSL kernel driver. Since this build exclusively targets KGSL, there is no need to match display fds against the GPU device via the DRM subsystem. Simplify tu_wsi_can_present_on_device() to unconditionally return true.
1 parent 9113a0b commit e201189

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

src/freedreno/vulkan/tu_wsi.cc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,11 @@ tu_wsi_proc_addr(VkPhysicalDevice physicalDevice, const char *pName)
2525
static bool
2626
tu_wsi_can_present_on_device(VkPhysicalDevice physicalDevice, int fd)
2727
{
28-
#ifdef HAVE_LIBDRM
29-
VK_FROM_HANDLE(tu_physical_device, pdevice, physicalDevice);
30-
return wsi_common_drm_devices_equal(fd, pdevice->local_fd);
31-
#else
28+
/* KGSL uses /dev/kgsl-3d0 which is not a DRM device, so drmGetDevice2()
29+
* always fails on the KGSL fd. Since this build exclusively targets KGSL
30+
* devices, unconditionally allow presentation.
31+
*/
3232
return true;
33-
#endif
3433
}
3534

3635
VkResult

0 commit comments

Comments
 (0)