Announcement: Panthor, an open source driver for the 10th generation Mali GPU, is now available

Collabora company announced about the readiness of the open panthor driver being developed for the tenth generation GPU Mali (G310, G510, G710), which uses the technology CSF (Command Stream Frontend), which transfers some driver functions to the firmware side to reduce the load on the CPU and offers a new model for organizing work on the GPU. DRM driver (Direct Rendering Manager) panthor accepted into the branch drm-misc and is expected to be included in the Linux 6.10 kernel. Changes to support the new driver are also adopted in Mesa and included in the panfrost Gallium driver for the Mali GPU.

In the new generation of Mali GPUs, the Job Manager scheduler is replaced by a CSF (Command Stream Frontend) interface, in which, instead of a model based on sending a chain of jobs, a command stream-based model is used with scheduling of the command stream queue on the firmware side. To organize the work of the scheduler, a separate Cortex-M7 microcontroller is built into the GPU, and a special command execution unit (Command Execution Unit) is provided to execute CSF instructions. Such features require a fundamentally different organization for transferring work to the GPU from user space.

Initially, an attempt was made to implement support for Mali GPUs based on CSF in the Panfrost DRM driver, but the developers came to the conclusion that this would lead to a great complication of the existing driver and for CSF it would be more optimal to create a new driver built using a different architecture. The panthor driver implements a completely new uAPI, new job scheduling logic, and new MMU/GPU-VA control logic. The new driver is based on Panfrost's existing DRM driver code, from which it borrows typical driver initialization, frequency control, and power management patterns.

At first, the development of the new driver was carried out using reverse engineering, but then ARM joined the project, provided access to the documentation and took part in code review. Two ARM employees have been promoted to driver co-maintainer status for the Linux kernel. In the future, once the OpenGL driver is ready, work will focus on implementing a Vulkan driver for new Mali GPUs and upgrading the existing Vulkan driver for older Mali GPUs.

It is noted that the prepared panthor driver allows for GPU support on boards with SoC Rockchip RK3588. Collabora also work done to ensure loading of Rockchip RK3588-based boards using a completely open software stack. A Debian-based system image has been prepared for Rockchip RK3588 and open bootloader to replace proprietary BL31 components (Boot Loader stage 3.1).

Thanks for reading: