Racing karts on a Rust GPU kernel driver
3 days ago
- #Rust
- #Linux
- #GPU
- Tyr, a Rust driver for Arm Mali GPUs, has progressed to running GNOME, Weston, and full-screen 3D games like SuperTuxKart.
- The driver matches C-driver performance and serves as a baseline for community benchmarking.
- User-mode drivers (UMDs) translate high-level API commands into GPU-specific commands, while kernel-mode drivers (KMDs) manage GPU hardware states and fair sharing.
- Initial focus was on KMD functionalities like power management, firmware loading, and GPU memory allocation.
- Testing was conducted using the IGT framework, starting with simple jobs before moving to complex workloads.
- Successfully rendered a rotating cube with kmscube, demonstrating job dependency enforcement.
- Achieved offscreen rendering at over 500fps, matching C driver performance.
- GNOME and Weston run successfully, including logging in and using applications like Firefox.
- Full-screen 3D games run smoothly, though windowed mode has some glitches.
- Tyr is not yet ready for daily use but serves as an experimental driver and testbed for Rust abstractions.
- Tested on Rock 5B with RK3588 SoC; contributions and feedback are welcome.