AMD GPUs on the Altra devkit and other Altras - patches available now


I’ve made it possible to use AMD GPUs on the Altras without graphical glitches.
As it turns out, the Altra has a buggy PCIe controller, which means you can
technically modeset with the GPUs and launch a desktop, but you will get
garbage in the output, like this:

I’ve come across some patches in Tencent’s kernel tree, which is a fork of
an old LTS. The patches do not apply on modern kernels:

I ended up rebasing them, however:

For 6.1: main/linux-lts: update to 6.1.30 and fix GPUs on ampere altra · chimera-linux/cports@da73b68 · GitHub
for 6.3: main/linux-stable: update to 6.3.4 and fix GPUs on ampere altra · chimera-linux/cports@38692a6 · GitHub

Now you get this:

You just need to apply them into the kernel. The kernels in my distribution
will come patched out of the box, people on other distributions will need
to apply it and rebuild their kernel. Mesa does not need to be rebuilt,
it works as is.

Tested GPUs are Radeon Pro WX 2100 (works out of the box, any kernel version, as long as patched) and Radeon RX 5500 XT (needs kernel 6.2 or newer, just like everything newer than AMD Polaris, as before 6.2 the DC component was not ready on AArch64 due to kernel hardware floating point trouble, and also kernel command line parameters pcie_aspm=off amdgpu.aspm=0 amdgpu.runpm=0).

Note that these patches are a workaround and come with a performance penalty,
especially when unaligned access is involved. However, things run quite
satisfactorily as far as I can tell.


@q66 thank you for the post, that is awesome…

1 Like

Thanks a lot for sharing @q66 and an even bigger thanks for the solution itself!

I really hope the forum gets more people writing about their personal projects or anything AArch64-related done as a part of their regular work.

Even outside our group, there’s a lot of great stuff going on that I’m sure many end up reading about and not everyone here is necessarily aware of.