Eben Upton32:42
No, I, the kind of ticker, we have a signage-focused Wayland demo which is kind of 3D and video and a ticker and a 2D ticker at 60 fps, just like how you, a little bit, I mean you're familiar with the history of this, that's right. So yeah, broadly speaking, the history of multimedia in particular on Raspberry Pi is that we used to use a bunch of Broadcom proprietary interfaces for driving the multimedia subsystem. And so that meant video decode, camera processing, video encode and decode, camera processing, 3D, and display composition. And broadly those APIs were OpenMAX, I mean okay, some of these are standards-based. OpenMAX for example is standards-based. So OpenMAX or MMAL, which is kind of a simplified OpenMAX for video codec and camera. Dispmanx for display composition, and OpenGL ES but a kind of a remoted OpenGL ES. The interesting thing about OpenGL is that it is very amenable to being effectively serialized across a FIFO, and so what we would do is we'd run the OpenGL subsystem, run the state machine inside the VPU, so the closed-source blob, this thing is called 'the blob' sometimes on a Pi. I could talk at length about fear of the blob. And I think often people who are afraid of the blob imagine that their PC is a lot less blob-full than it actually is. You do have a management engine with the blob on your PC, and you don't know what the source code of that is. I had an episode with the coreboot guys talking about BIOSes just a few episodes ago, and yeah, that's a good example of a blob that you have no idea what's in it. How can I be safe on my x86 PC when there is this piece of closed-source code that I don't understand? Anyway, sorry. There is a blob, and this is a single state, which is a big VPU program, a big closed-source proprietary VPU program, which provides the device-side element of all of these APIs which are basically serialized and piped over a subsystem called VCHI from Linux host land, from a bunch of Linux host libraries through the kernel across to the VPU. So everything in a Pi 1 in 2012 is kind of done by remote control. HDMI mode negotiation, I mean it makes for a very nice platform actually, particularly for people who want to do bare-metal programming, because the thing comes up with a framebuffer. By the time the ARM is out of reset, it's already negotiated the display mode for the television. Which is great in a lot of ways when you've got a little processor, you've got an ARM11 in there, it's quite nice not to have to worry about that. And TV service and Dispmanx and some of these other APIs provide you a way of renegotiating if you want to renegotiate. And all is well, but all is very proprietary and non-standard.
So the direction of travel really has been, as you say, towards a standards-based approach. So rather than, probably trying to get them in the right order, probably the earliest of these is the move to Mesa for driving the 3D. Anholt joined Broadcom, worked for me at Broadcom for a while, and did some of the early work on this. Igalia now maintains and progresses the OpenGL and Vulkan Mesa stack for us, which is kind of fun. And then you have the move to KMS for controlling display output. As you say, Video for Linux for stateless V4L for controlling codecs, even the legacy codec H.264, modern codecs from Pi 4 onwards there's a H.265 codec which is a modern codec developed at Raspberry Pi that was designed to be driven from the ARM from the get-go. So you have this gradual depletion of the stock of things that are inside the blob, controlled from inside the blob, to the point where on Raspberry Pi 5, really it's only clocks, power, and reset. And everyone needs that. All decent, all sensible, you know, I believe a bunch of Intel chips actually have ARM cores in them now that do microcontroller cores that do this stuff. So yeah, everyone has, large chips don't tend to come out of reset with the big core being the first thing that comes out of reset. Almost always you have some management processor of some sort that comes out of reset first and gets the world ready, sort of a John the Baptist processor. It doesn't come to such a sticky end, but it will set up the DRAM, fetch a next-stage bootloader. It probably won't negotiate HDMI mode for you, that's probably a bit excessive. But so really, that's what the VPU has been beaten down to. It's still present, it's a very antique piece of hardware, it's still present in 2712 in the Pi 5 chipset, but it's been relegated to this microcontroller-type world where it sets up DRAM, loads the second-stage bootloader, and then sits there providing clocking services, monitoring the temperature of the chip and reducing clocks if things get too hot, those kind of slightly safety-critical processes that you don't necessarily want to, you want those processes to continue to happen even if the OS crashes, even if the big OS goes away. It's a kind of watchdog world.