MightyCreak/mesamatrix

Add Asahi ^_^

alyssarosenzweig opened this issue ยท 5 comments

Upstream MR: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19944

The tricky part is of course choosing a colour... the Asahi logo for refernece https://asahilinux.org/img/AsahiLinux_logo.svg?d619e737

upstream MR landed

Thanks @alyssarosenzweig (and thanks for giving me a color reference ๐Ÿ˜‰). I'll get to it asap

As it seems that you are the expert on the matter, I'd like your input on this: do you think Asahi should be under the "Arm" vendor or the "Apple" vendor? (I'd tend to go with Arm)

Edit: For the moment I've put it under Arm, but we can still change it later

Thanks for updating the site!

Asahi should be under the Apple vendor, given that freedreno is under "Qualcomm", etnaviv is under "Vivante", and v3d is under "Broadcom". The only GPUs that Arm Ltd designs are Mali (or "Immortalis", thank their brilliant marketing department...). As such, the only drivers that should be under Arm are lima and panfrost.

The Asahi driver supports the "AGX" architecture, designed by Apple and presumably expanding to "Apple Graphics". We support all AGX models used in Apple's M-series system-on-chips (namely: G13G, G13X, and G14G -- as implemented M1, M1 Pro/Max/Ultra, M2 respectively). We don't support AGX models used in Apple's A-series system-on-chips (e.g. G13P found in A14) because we can't run Linux on these devices due to a closed boot chain :-( If a bootrom exploit were found in A14 though I might have to get myself an iPhone to destroy, I mean play with.

AGX is a derivative of Imagination's RGX architecture (one architecture marketed as PowerVR). Older iPhones shipped PowerVR GPUs, but Apple branched off AGX many years ago. From a software point of view, the OpenGL/Vulkan driver side looks similar to RGX, although it's much simpler for the modern AGX we support thanks to Apple simplifying the hardware. The kernel side is very different (and probably more complicated) because the kernel has to interface with the firmware, and Apple has their own firmware. The compilers are also totally different, since modern AGX implements an instruction set "AGX2" that appears to be completely in-house at Apple... I think AGX2 may be since Apple A8, which launched in 2014, to give you a sense of how long ago this GPU has been in the works. Given these differences, Asahi has an independent driver stack from PowerVR (also, our code predates Imagination's open source driver, lol).

From a hardware point of view, it's not clear whether modern AGX has any Imagination IP left, or whether Apple built software-compatible clones of RGX hardware. The latter seems a bit unlikely, especially when Imagination and Apple seem to have a deal around IP licensing. So there's probably IP that was originally built at Imagination in the chip, but I don't think that warrants putting the vendor as Imagination rather than Apple. For prior art there, for Adreno the site has Qualcomm as the vendor, but Adreno has ATI/AMD heritage... after all, Adreno is an anagram of Radeon :-)

All of the above notwithstanding.... I'll still call it the Imaginapple GPU in conference talks ๐Ÿ˜

Done! Asahi is now under Apple (I also changed the software color to be the same as mesa as I think it kinda makes sense as well as reducing the amount of colors overall)