Converting a DRM driver to Rust
summary
A 400-line VGEM DRM driver gets rewritten in Rust as a drop-in equivalent that uses Asahi Lina DRM bindings and Rust-for-Linux helpers for timers, DMA reservation and legacy platform init. The rewrite exposes real issues in the C code (use-after-free in GEM paths), requires explicit unsafe blocks with safety comments and safety-review discipline, and lands as a working Rust vgem implementation ready for upstream discussion and further reviewer-driven refinements. rewrote the 400-line VGEM DRM driver in Rust used Asahi Lina DRM bindings
AI-written summary · about
chapters (8)
- 0:00Introduction to Rust GPU
- 0:42Understanding vGEM
- 2:00Motivation for the rewrite
- 4:29Implementing Rust vGEM
- 7:21Challenges with Rust in kernel
- 12:54Upstreaming and community
- 15:26Discussion and feedback
- 24:41Future of Rust in Linux
related talks
39mFrom C to Rust: Bringing Rust Abstractions to Embedded Linux
20mAn Empirical Study of Rust-for-Linux: The Success, Dissatisfaction, and Compromise
18mRewriting a Component from C to Rust
51mRust in the Linux kernel
47mWriting a Nintendo 64 emulator in Rust
39mFrom C to Rust: Bringing Rust Abstractions to Embedded Linux
39mTyr: A New Rust GPU Driver for the Linux Kernel
33mIntegrating Some Rust in VLC Media Player
