Skip to content

mesa: build Freedreno for Qualcomm phones - #500

Open
quatrixone wants to merge 2 commits into
derekross:mainfrom
quatrixone:mesa-freedreno
Open

quatrixone wants to merge 2 commits into
derekross:mainfrom
quatrixone:mesa-freedreno

Conversation

@quatrixone

@quatrixone quatrixone commented Nov 7, 2026 •

Copy link
Copy Markdown

Summary

Enable the Gallium Freedreno driver in the shared Mesa build so current and future Qualcomm Adreno phones have their DRI driver.

This affects Mesa builds installed on every phone, including Pixels. The shared build cost and rebuild impact are the tradeoff for supporting Qualcomm devices; this PR isolates that decision for review.

Checks

  • git diff --check origin/main...HEAD — passed
  • tools/build-packages --local dipper packages/mesa — attempted; source extraction stopped after the build container reported No space left on device while writing Mesa subproject files. No package artifact or pacman -Qlp listing was produced.
  • No device test was run. Mi 8 renderer and Pixel Panthor checks remain pending.

Add Adreno support to the shared Mesa package for Qualcomm phones. This rebuilds Mesa packages used by Pixels, so the per-device cost needs review against the shared Qualcomm support benefit.
@derekross

Copy link
Copy Markdown
Owner

Thanks for splitting the Mi 8 work into reviewable pieces, and for saying
plainly in the description what you did and didn't run. That made this one
easy to read.

The change looks right to me, and it's needed. [omamobile] sits before
Arch Linux ARM's repositories in every phone's pacman.conf, so our Mesa
replaces ALARM's on a Qualcomm phone too, and without Freedreno the Mi 8 would
have no msm_dri.so. I checked the Pixel side in the 26.2.4 tarball. kmsro
picks the Gallium driver by the render node's kernel driver name (msm for
Freedreno, panfrost/panthor for Panfrost), and Freedreno adds no build
dependency beyond libdrm, so the Pixels' path stays as it is. ALARM's
vulkan-freedreno depends on vulkan-mesa-implicit-layers, which we ship, and
not on an exact Mesa version, so your README note holds.

What it still needs before it can merge is evidence, because it rebuilds the
GPU stack on every phone and CI never builds Mesa:

  1. A build: the log of tools/build-packages --local dipper packages/mesa,
    and pacman -Qlp on the result showing msm_dri.so.
  2. The Mi 8: with that package installed, eglinfo (or glxinfo -B) showing
    the Adreno 630 renderer under Hyprland, plus the tools/phone-smoke report
    and uname -r.
  3. On my side, I'll install the same build on my Pixel 7 Pro and check that
    Panthor is still the renderer before I merge.

Small things:

  • The PKGBUILD header still says "pkgrel 1.4" (line 27).
  • The README calls the package "rebuilt for the Xiaomi Mi 8". Until the Mi 8
    port lands, I'd say "for Qualcomm Adreno phones (the Mi 8 port in progress)".
  • Please put the reason in the commit body (our Mesa wins over ALARM's, so a
    Qualcomm phone needs Freedreno in it). I'll land it as
    mesa 1:26.2.4-1.5: build the Freedreno Gallium driver for Adreno phones.

Mesa supplies Freedreno, which Arch Linux ARM does not include in its Mesa build. Keep the Qualcomm Adreno path for the Mi 8 port while describing this as ongoing work.
@derekross

Copy link
Copy Markdown
Owner

Thanks for the fixes, and for trying the build and saying exactly where it stopped. The PKGBUILD comment and the README wording are what I asked for.

The build is still the open point. Without it, and the Mi 8 and Pixel runs, I can't merge a change that rebuilds the GPU stack on every phone:

  1. A build. The log of tools/build-packages --local dipper packages/mesa, and pacman -Qlp on the result showing msm_dri.so. "No space left on device" while unpacking the subprojects usually means a small /tmp or Docker data directory. A Mesa build needs several GB free wherever the container works.
  2. The Mi 8. With that package installed, eglinfo (or glxinfo -B) showing the Adreno 630 renderer, plus uname -r.
  3. My Pixel 7 Pro. I'll install the same build and check that Panthor is still the renderer before I merge.

Two small things for the next push:

  • Every Mesa bump so far has moved _omamobile together with pkgrel (1.3 had omamobile3, 1.4 omamobile4). Please make it omamobile5 for 1.5, and update the comment's ".omamobile4" to match.
  • The new commit says Arch Linux ARM's Mesa doesn't include Freedreno. It does: their PKGBUILD builds -D gallium-drivers=all. The reason we need it here is that [omamobile] comes first in pacman.conf, so our Mesa replaces theirs on every phone. I'll write the squash message with that reason, so there's no need to reword it unless you're pushing anyway.

I'll land it as mesa 1:26.2.4-1.5: build the Freedreno Gallium driver for Adreno phones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants