Commit 3fcfd1d
committed
tu/wsi: allow presentation on non-DRM devices (KGSL)
tu_wsi_can_present_on_device() uses wsi_common_drm_devices_equal() to
match the GPU device against the display fd by calling drmGetDevice2().
However, KGSL exposes the GPU via /dev/kgsl-3d0, which is not part of
the DRM subsystem. As a result, drmGetDevice2() always fails on the
KGSL local_fd, causing can_present_on_device() to unconditionally return
false and making vkCreateSwapchainKHR fail on all Adreno devices using
the KGSL kernel driver.
Fix this by detecting the KGSL case: if the DRM device comparison fails
and no DRM master fd is present (master_fd == -1), skip the check and
allow presentation on any display fd. This restores swapchain creation
on Adreno 725 and similar devices running in Android container
environments with KGSL.
Fixes: vkcube crashing at demo_prepare_buffers on Adreno 725 (KGSL path)1 parent 3b064f5 commit 3fcfd1d
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
30 | 37 | | |
31 | 38 | | |
32 | 39 | | |
| |||
0 commit comments