Ideas for getting Freedreno working on non-mainline kernel devices?
Created by: zhuowei
Curently, we have 29 Qualcomm Adreno GPU devices being ported, and only two devices (asus-flo and sony-castor-windy) support the Freedreno kernel driver (drm/msm) required for 3D acceleration in Weston and KWin. The other devices run kernels too old to support the upstream drm/msm driver, and thus can't use Freedreno in Weston due to missing KMS support.
What approach should we take to support GPU acceleration on these devices? I can think of three options:
- Backport drm/msm from newer kernels into each device's kernel. Rob Clark, the developer of Freedreno, maintains backport patches for Linux 3.10 (and older), but it consists of almost 200 commits, and may be unwieldy to get running on each Snapdragon device's kernel.
Edit: It looks like the Nexus 6P kernel diverged a bit from the IFC6540 kernel, which causes compile errors when I try to copy the backport from the Freedreno backported repo.
- Test if Freedreno works in X11 using the kgsl-drm compatibility layer in downstream kernels, and create a shim for Weston/KWin that simulates KMS, borrowing the X11 modesetting code. This would be a horrible kludge, and may not even work as the required kgsl-drm compatibility layer may be broken in the device kernel.
Edit: per Rob Clark's comment, the kgsl support is unlikely to work on kernels newer than 3.4, so the drm/msm backport seems to be preferred.
- Give up and use libhybris.
What are the pros and cons of each?