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.
I am using Nouveau without any patches. I have a few different Radeon cards, the Radeon RX 6500XT shipped with an AArch64 optionrom as well as an x86_64 one. I assume that the issue is probably a bad interaction with whatever Switch AMD uses and Amperes PCIe implementation. whatever Nvidia uses is seemingly not as bad. though I have some major regressions with 6.7 and 6.8. 6.8 is better and mostly works. the video stack blew up on 6.7.
@pimzand I‘m currently trying to get an Intel Arc A310 working on aarch64 (Rockchip RK3588) but not having any luck yet as the GPU seems to shutdown during/after the boot process. Under Linux 6.8 it’s like there is no card plugged it (compared to Nvidia GPU‘s which I got much further with)
You did compile your own kernel, right?
You need the Xe driver that is not being built by default in kernel 6.8, even though the code is present.
On x86_64, you would need to blacklist the old i915 driver, but in aarch64 there is no i915 driver.
You would probably still need to whitelist the Xe driver for the pci id of your card.