Panthor, an open source driver for the 10th generation Mali GPU, has been announced

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

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 Rockchip RK3588 SoC. Collabora has also done work to ensure that Rockchip RK3588-based boards can be loaded using a completely open software stack. For Rockchip RK3588, a Debian-based system image and an open bootloader have been prepared to replace proprietary BL31 components (Boot Loader stage 3.1).

Source: opennet.ru

Add a comment