Bifrost meets GNOME: Onward & upward to zero graphics blobs
The lead developer of the open source Panfrost graphics driver posted some awesome news for us C4 users:
To decode what it says here, we have to know that there are three Mali graphics chip product lines:In our last blog update for Panfrost, the free and open-source graphics driver for modern Mali GPUs, we announced initial support for the Bifrost architecture. We have since extended this support to all major features of OpenGL ES 2.0 and even some features of desktop OpenGL 2.1. With only free software, a Mali G31 chip can now run Wayland compositors with zero-copy graphics, including GNOME 3. We can run every scene in glmark2-es2, and 3D games like Neverball can be played. In addition, we can support hardware-accelerated video players mpv and Kodi. Screenshots above are from a Mali G31 board running Panfrost.
- The Utgard product line: with the low powered Mali 200-4xx graphics chips, which have an open source Lima graphics driver.
- The Midgard product line: the T-line with graphics chips like the T600-T780 chipsets, which have an open source graphics driver named Panfrost
- The Bifrost product line: the G-line with graphics chips like the G31, G52 and G71 for example. The Panfrost driver did not support Bifrost until very, very recently.
Seeing as the C4 has a Mali G31 chip (GPU), which is in the Mali Bifrost product line, this means that effective immediately (??) we should now be able to use the Panfrost driver for GPU hardware acceleration. That is: if you actually know what you are doing, which, to be honest, I really don't. So, the 'we' there is more specifically guru developers that are creating the wonderful images we all use on the C4 and single-board computers alike.
Also, lead dev Alyssa mentions specifically Wayland compositors, so it appears Xorg is not really going just yet? Traditionally Linux desktops work with Xorg graphics software, but the newer work-in-progress Wayland also makes it possible to run Linux desktop software.
And Panfrost's Bifrost support now brings some OpenGL (desktop graphics acceleration, the non-Windows DirectX counterpart if you like) and OpenGL ES (a smaller OpenGL subset for mobile devices) support to Mali Bifrost devices. And the lead developer now says that Gnome 3 on Wayland is now supported! And in the relatively near future: a hardware accelerated Xorg with Gnome 3 and KDE Plasma will be available as well, seeing as Panfrost for the Midgard product line already supports multiple desktop environments on Xorg. This is all really exciting stuff! (And no, Vulkan drivers are not available and not part of Panfrost.)
Besides the Panfrost reverse engineering effort, there is also an 'official' ARM Mali driver for Wayland, which is made available to us all by tobetter:
Ubuntu 20.04 (Focal Fossa) + Linux 5.x Headless OS image
The Focal Fossa image from tobetter makes it possible to (relatively easily) install the Mali GPU driver which supports Gnome 3 on Wayland.
So, now for the C4 we are blessed with two (almost?) working solutions for Linux desktops:
- Xorg using Panfrost (this is a work in progress)
- Wayland using the Mali Bifrost Wayland driver
And technically, there is the official C4 minimal image with Ubuntu 20.04, which has both GPU and VPU support. Also, it uses a Hardkernel officially patched kernel 4.9, specifically made for the C4. But that comes without any Linux desktop environment (Xorg or Wayland) support, just a GPU accelerated framebuffer driver. So, ymmv on that one, you might get good use out of this image depending on your use cases.
There is however a second graphics chip (or part of the system on a chip) called the VPU, the video processing unit. And it does just that, it encodes and/or decodes video streams/files into image frames and vice versa. This saves the GPU a lot of work, making the OS and video players run smoother. Now the hardware accelerated video decoding (the VPU, it is not doing vdec yet) is not yet working on normal, mainline Linux kernels. That is still a work in progress, with V4L2 being actively developed. And at some point some of this will come down the line to the C4 as well. Having a hardware accelerated GPU obviously improves playing video tremendously already. And you can read some more on VPUs here.
We know the Mali Bifrost Wayland driver works with Gnome 3, does anyone have the Panfrost driver working on the C4 or seen actual reports of it working on the C4 other than from Collabora?