Alyssa Rosenzweig specializes in writing GPU compilers/drivers. Other people, like marcan, specialize on the low level hardware and firmware stuff required to get the SoC to boot, including the display controller. The DC and GPU are almost entirely unrelated. She's working ahead here so that GPU acceleration, which is predicted to be the single hardest feature to enable, can be developed more quickly once the easy part of booting linux is done.
Re:Dissecting the Apple M1 GPU, part I
by marcan_42 on Thursday January 07, 2021 @08:01PM
(#25679979)
Precisely this :)
I'm not nearly as experienced as the blog post author, but I suspect the M1's GPU does not have any way of blitting to the screen other than driving it 'fully' - ie. using the standard command queue and shader units to even get the simplest 2D output.
Re:Dissecting the Apple M1 GPU, part I
by floatboth on Thursday January 07, 2021 @07:06PM
(#25679490)
In embedded SoCs the GPU is typically "render only", and display is handled by a different hardware block ("display engine" etc), and of course both CPU and GPU can write to it. Well that's even true in desktop GPUs but it's just tightly coupled there, both blocks are on the same PCIe device so the support is in one driver.
From the iPhone 7 Linux port we know that Apple is nothing special in terms of this (they have framebuffer working there)
So would the bootloader also include a rudimentary GPU driver to, for example, display the Apple logo, the boot device selection screen, the internet recovery UI and so on? One would think that they would've provided a simple framebuffer interface in the hardware for this kind of use case.
(I'm more of a software kind of guy, I might be entirely wrong here tho)
IIRC the firmware turns the screen on for you so it's already there when Linux boots.
Re:Dissecting the Apple M1 GPU, part I
by StillBored on Thursday January 07, 2021 @05:02PM
(#25678214)
Yes, this is a standard UEFI feature. The firmware basically hands off a structure indicating horizontal/vert resolution, pixel depth and a buffer.
Which is fine until you need to change the mode, or start doing heavy BLT/etc operations. At which point your machine will feel like something from the early 1990s.
So yes, you can get a full linux DE running with mesa and CPU GLES emulation, but its not really particularly usable.
It's worth noting that the M1 does not use EFI like Intel Macs do, so the kernel would still need to boot on this proprietary new mechanism. Apple previously indicated that the M1 Macs boot using a derivative of the iPhone/iPad boot procedure. There's a reasonable chance it'll still have something like the EFI buffer allocation mechanism, but it'll not be using a mainline standard. While it sucks that Apple ditched EFI, the good news is that it's probably reasonably well understood since Linux has already been booted on an iPhone 7 using Checkra1n [1] (and apparently with framebuffer support too!).
[1]: https://tuxphones.com/iphone-7-now-boots-postmarketos-linux/
It would seem easier to get Linux booting (by just sending the same commands apples software does) before worrying about 3d acceleration and shaders...