Esitatud Tyr, Linuxi draiver GPU ARM Mali jaoks, mis on kirjutatud Rustis

Daniel Almeida, who specializes in video codecs at Collabora, published an initial implementation of the Tyr driver for ARM Mali GPUs in the Linux kernel developers' mailing list. This implementation utilizes CSF (Command Stream Frontend) technology, applicable to Mali G310, G510, and G710. The driver code, written in Rust, consists of just over 600 lines. The development of the Tyr driver is a collaborative effort by employees from Collabora, Arm, and Google.

The framework for creating the new driver is based on components from the abstract driver rust_platform_driver and the Nova driver, developed for NVIDIA GPUs, which is also written in Rust and partially integrated into kernel 6.15. The functionality for interacting with Mali GPUs has been ported from the existing DRM driver Panthor (Direct Rendering Manager), which is written in C. The uAPI of the Tyr driver is identical to the uAPI of the Panthor driver, allowing the use of existing user space components.

The CSF technology, utilized since the 10th generation of Mali GPUs, is notable for offloading some driver functionalities to firmware and employing a new model for task execution on the GPU. In GPUs with a CSF interface, a command stream-based model is used instead of a job chain submission model, with command queue scheduling handled by the firmware. A separate Cortex-M7 microcontroller is embedded in the GPU to manage the scheduler, while a specific command execution block (Command Execution Unit) is provided for executing CSF instructions.

The functionality of Tyr currently lags behind that of the Panthor driver, but developers intend to gradually reduce the gap until parity in capabilities is achieved. The missing features require the integration of additional abstractions into the kernel for creating Rust drivers, so the development of the Tyr driver will be synchronized with the addition of these abstractions into the kernel. For instance, there are currently no facilities for memory mapping in Rust drivers for GPUs, as developed in an unapproved set of GPUVM patches.

Allikas: opennet.ru

Osta usaldusväärne hostimine veebilehtede jaoks DDoS-i kaitsega, VPS VDS serverid 🔥 Osta usaldusväärne hostimine veebilehtede jaoks DDoS-i kaitsega, VPS VDS serverid | ProHoster