An unexpected announcement this Friday evening is an introduction to Tyr, a new Linux kernel DRM graphics driver written in the Rust programming language. As is sadly becoming more common among Linux GPU kernel drivers is the increasing obscure driver names. Tyr?!?
Not clear from the name and initially overlooked in my kernel mailing list readings was the Tyr announcement. Tyr is a new open-source Direct Rendering Manager driver for modern Arm Mali graphics hardware. This Rust-written Tyr driver is aiming to support the same modern Arm Mali graphics hardware currently supported by the Panthor DRM kernel driver in making use of the Arm Mali Command Stream Frontend (CSF) firmware. The CSF support comes down to Mali graphics “Gen10” and newer.
Daniel Almeida of Collabora announced the Tyr driver and plans to incrementally develop it as the Rust DRM bindings continue to mature and until it’s able to replace the Panthor driver functionality for that C-based code. Almeida explained in the introduction announcement:
“Add a Rust driver for ARM Mali CSF-based GPUs. It is a port of Panthor and therefore exposes Panthor’s uAPI and name to userspace, and the product of a joint effort between Collabora, ARM and Google engineers.
The aim is to incrementally develop Tyr with the abstractions that are currently available until it is consider to be in parity with Panthor feature-wise.
This first version only implements a subset of the current features available downstream, as the rest is not implementable without pulling in even more abstractions. In particular, a lot of things depend on properly mapping memory on a given VA range, which itself depends on the GPUVM abstraction that is currently work-in-progress. For this reason, we still cannot boot the MCU and thus, cannot do much in the current version.
Still, this version is intended as a way to validate some of the abstractions that are still being developed, in particular the platform iomem code. A subsequent patch will introduce VM_BIND support once the discussions on the GPUVM abstraction advance.
Despite its limited feature-set, we offer an IGT branch to test this patch with. It is only tested on the rk3588, so any other SoC is probably not going to work at all for now.”
The Tyr driver skeleton code was based on the Rust-based NOVA DRM driver being developed for modern open-source NVIDIA GPU support. Tyr is being worked on by Collabora along with Arm and Google.
Those wanting to learn more about the Tyr driver can do so via the LKML.