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:
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 Very cool, great job - thanks for shaing! Question - does the AMD GPU work during POST and EFI boot?
I was informed that it only works once you load the OS due to some Oprom thing missing from AMD cards or something.
AFAIK, EDK2 has the option of an emulator to run x86 oproms on other architectures (i had that working in an older UEFI build for solidrun honeycomb lx2) but it does not seem to be enabled here
that’s good to know, unfortunately these instructions no longer work; for one the ati-branch flashrom will not detect any devices (this can be patched around, it’s just broken usage of pciutils api where the necessary info in pci_dev was not being filled in because of missing pci_fill_info call), after patching that it will try accessing a wrong device because the domain is hardcoded to 0, and after patching around that too, flashrom_pci_mmio_map will fail with “invalid argument” when trying to map resource5 (on this GPU at least)
Agree completely! Please post things that you find interesting, odds are others will too. And we have all written blog posts and we don’t get comments or anything. So when we learn that someone, read it, liked it and then posted it somewhere, it really does make your day.