Some fixes for using Freedreno & Turnip normally under Wayland#76
Open
lfdevs wants to merge 3 commits into
Open
Some fixes for using Freedreno & Turnip normally under Wayland#76lfdevs wants to merge 3 commits into
lfdevs wants to merge 3 commits into
Conversation
This patch comes from superturtlee@ca95478. Implement and export vk_icdGetDeviceProcAddr as the required ICD entrypoint for the Vulkan loader to query device-level function pointers.
This patch comes from superturtlee@4aeb52f. Introduce MESA_VK_DEVICE_SELECT_FORCE_DEFAULT_DEVICE_DRI3 environment variable. On the kgsl-backed turnip stack, the GBM/DRI3 fd points at the display device (msm_drm) while the GPU is exposed through kgsl. Because of this, the render-node DRM major/minor never matches turnip's pdev, causing device selection to fail and fall back to llvmpipe. When this option is set, skip the DRM-based matching for the DRI3 path and let zink take the default (first) physical device.
This patch comes from superturtlee/anland@4df7180, and introduces compatibility layer support for the KGSL-backed freedreno driver, ensuring that native GL rendering works correctly in Android container environments: - egl/wayland: If the compositor does not advertise wl_drm or v4 dma-buf feedback, fall back to opening the /dev/kgsl-3d0 node directly to avoid initialization failure. - freedreno/drm: Split fd tracking into `fd` (GPU submission fd) and `control_fd` (identity/screen-cache fd). Under KGSL, the display node fd passed in from EGL/GBM is used as the `control_fd` to keep the fd-keyed screen cache and DRI3 identity intact, while GPU commands are redirected to `/dev/kgsl-3d0`. Support forcing this behavior via FD_FORCE_KGSL=1. - freedreno/drm: Quietly return -1 for FD_UCHE_TRAP_BASE on KGSL since it is not supported, avoiding noisy "invalid param id" errors. - freedreno/gallium: Force-enable prime import/export capabilities on the pipe screen. The display controller node does not report the GPU's PRIME support, which otherwise prevents EGL from exposing dmabuf import extensions.
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.
In recent days, @superturtlee implemented a new complete solution, anland, for running Wayland desktops (especially KDE Plasma Wayland) with hardware acceleration in Linux containers hosted on Android. This project currently uses an Ubuntu 24.04 Droidspaces container and has been successfully run on devices with GPU such as Adreno 750, 830, and 840.
The patch in this PR comes from superturtlee's repository: superturtlee/anland@4df7180 Many thanks to him.