tu/kgsl,x11: fix Termux:X11 presentation on KGSL#69
Open
lfdevs wants to merge 3 commits into
Open
Conversation
Allow KGSL devices to report WSI presentation support without DRM fd matching, since /dev/kgsl-3d0 is not a DRM render node. For FD725 on KGSL, avoid the DRI3 modifier import path and keep the native DRI3 linear path, which preserves the working A830 behavior while working around FD725 swapchain creation failures. Add TU_WSI_DEBUG diagnostics around X11 swapchain creation, WSI image allocation, dma-buf export/import, XCB pixmap import, and xshmfence setup. Also make KGSL shareable BO allocation report clearer errors and fall back from dma-heap to ION when possible.
FD725 on KGSL can create and export scanout dma-bufs, and Termux:X11 can import them as DRI3 pixmaps, but DRI3FenceFromFD fails with BadValue during swapchain image setup. Add an internal X11 WSI workaround to skip shm fence import and rely on Present IdleNotify for implicit-sync image reuse. Enable it only for KGSL FD725, leaving A830 and other devices on the existing fence path. Keep FD725 on the native DRI3 linear path by disabling modifier use for the affected chip IDs.
Some X servers reject DRI3FenceFromFD for imported DRI3 pixmaps with BadValue. In that case, fall back within the current X11 swapchain by skipping shm fences and relying on Present IdleNotify for implicit-sync image reuse. Remove the temporary TU_WSI_DEBUG diagnostic logging added while debugging the Termux:X11 KGSL path.
cf67788 to
4211a1b
Compare
Owner
Author
BenchmarksOverview
Detailed test resultsAdreno 730vkmarkglmark2 (Turnip+Zink)glmark2-es2 (Turnip+Zink) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, the Turnip driver from the standard release (whose release title doesn't have the
turnip-prefix) fails to work on Adreno 730 or other GPUs. This PR aims to fix this issue.Assisted by
gpt-5.5 (xhigh)model.Changelog
Fixed
/dev/kgsl-3d0, not a DRM render node, so the normal DRM device comparison is not valid for this path.DRI3FenceFromFDon imported DRI3 pixmaps withBadValue. When this occurs, the current swapchain now skips shm fences and relies on PresentIdleNotifyfor implicit-sync image reuse.Changed