rust: drm: Introduce the Tyr driver for Arm Mali GPUsAdd a Rust driver for ARM Mali CSF-based GPUs. It is a port of Panthorand therefore exposes Panthor's uAPI and name to userspace, and theprodu
rust: drm: Introduce the Tyr driver for Arm Mali GPUsAdd a Rust driver for ARM Mali CSF-based GPUs. It is a port of Panthorand therefore exposes Panthor's uAPI and name to userspace, and theproduct of a joint effort between Collabora, Arm and Google engineers.The aim is to incrementally develop Tyr with the abstractions that arecurrently available until it is consider to be in parity with Panthorfeature-wise.The development of Tyr itself started in January, after a few failedattempts of converting Panthor piecewise through a mix of Rust and Ccode. There is a downstream branch that's much further ahead in terms ofcapabilities than this initial patch.The downstream code is capable of booting the MCU, doing sync VM_BINDSthrough the work-in-progress GPUVM abstraction and also doing (trivial)submits through Asahi's drm_scheduler and dma_fence abstractions. Sobasically, most of what one would expect a modern GPU driver to do,except for power management and some other very important adjacentpieces. It is not at the point where submits can correctly deal withdependencies, or at the point where it can rotate access to the GPUhardware fairly through a software scheduler, but that is simply amatter of writing more code.This first patch, however, only implements a subset of the currentfeatures available downstream, as the rest is not implementable withoutpulling in even more abstractions. In particular, a lot of things dependon properly mapping memory on a given VA range, which itself depends onthe GPUVM abstraction that is currently work-in-progress. For thisreason, we still cannot boot the MCU and thus, cannot do much for themoment.This constitutes a change in the overall strategy that we have beenusing to develop Tyr so far. By submitting small parts of the driverupstream iteratively, we aim to:a) evolve together with Nova and rvkms, hopefully reducing regressionsdue to upstream changes (that may break us because we were not there, inthe first place)b) prove any work-in-progress abstractions by having them run on a realdriver and hardware and,c) provide a reason to work on and review said abstractions by providinga user, which would be tyr itself.Despite its limited feature-set, we offer IGT tests. It is only testedon the rk3588, so any other SoC is probably not going to work at all fornow.The skeleton is basically taken from Nova and alsorust_platform_driver.rs.Lastly, the name "Tyr" is inspired by Norse mythology, reflecting ARM'stradition of naming their GPUs after Nordic mythological figures andplaces.Co-developed-by: Beata Michalska <beata.michalska@arm.com>Signed-off-by: Beata Michalska <beata.michalska@arm.com>Co-developed-by: Carsten Haitzler <carsten.haitzler@foss.arm.com>Signed-off-by: Carsten Haitzler <carsten.haitzler@foss.arm.com>Co-developed-by: Rob Herring <robh@kernel.org>Signed-off-by: Rob Herring <robh@kernel.org>Link: https://www.collabora.com/news-and-blog/news-and-events/introducing-tyr-a-new-rust-drm-driver.htmlSigned-off-by: Daniel Almeida <daniel.almeida@collabora.com>Acked-by: Boris Brezillon <boris.brezillon@collabora.com>[aliceryhl: minor Kconfig update on apply][aliceryhl: s/drm::device::/drm::/]Link: https://lore.kernel.org/r/20250910-tyr-v3-1-dba3bc2ae623@collabora.comCo-developed-by: Alice Ryhl <aliceryhl@google.com>Signed-off-by: Alice Ryhl <aliceryhl@google.com>
show more ...