Skip to content(if available)orjump to list(if available)

Writing a Rust GPU kernel driver: a brief introduction on how GPU drivers work

fabiensanglard

Great article. But too short. I was just getting excited about it and it ended. I look forward reading the other parts.

Muromec

Oh, that's cool. I use one of the rk3588 things with panfrost as a desktop and it sometimes bugs out with black or transparent patches in firefox. Weird thing.

TZubiri

I know that "Rust GPU driver" on the titles gets you more clicks than "Arm Mali CSF Based GPU Driver". But isn't this a Arm Mali CSF-based GPU driver?

I hate focusing on the metatools (tools for building tools). It really sounds like the objective here was to build something in Rust. In the article it is even described as "a gpu driver kernel supporting arm mali.." instead of just an arm mali driver

It is a misunderstanding of what the job of writing a driver is, you are connecting some wires between the OS api and the manufacturer api, you are not to build a framework that adds an additional layer of abstraction, sorry to put it so bluntly, but you are not that guy.

Sorry for being rough.

dralley

It's somewhat relevant given that this is one of the first Rust-based GPU drivers for Linux.

GeekyBear

The Asahi Linux team has previously blogged pretty extensively about developing the GPU driver for the Apple M series SOCs in Rust.

It's also an informative read.

> Paving the Road to Vulkan on Asahi Linux

https://asahilinux.org/2023/03/road-to-vulkan/

dralley

I did say "one of"

UK-AL

Rust is important here because it's one of the first(if not the first) to use the rust infrastructure for a GPU.

monocasa

The Asahi folks were probably first in this regard.

amiga386

I think what you're saying is that Rust devotees are entryists: rather than develop their own kernel from scratch in Rust, they want to join in developing the prestigious, well-established C language kernel of Linux and slowly but surely replace the C code with their preferred language.

https://en.wikipedia.org/wiki/Entryism

dralley

The Rust integration for Linux was invited and greenlit by Linus and Greg KH.

UK-AL

Because rewriting the kernel from scratch would literally cost billions. That's why. Literally criticising them for not achieving an impossible goal.

Ar-Curunir

People are already trying to make their own kernels in Rust. You just don’t hear about those because it takes a fuckton of time to build a useful kernel