Initial Rust DRM Abstractions, AGX Apple DRM Driver Posted For Review

Written by Michael Larabel in Apple on 7 March 2023 at 10:45 AM EST. 58 Comments
After being in development for several months, Asahi Lina with the Asahi Linux project has posted the initial Rust Direct Rendering Manager (DRM) subsystem abstractions for review as well as a preview of the experimental state of the AGX DRM driver providing the open-source kernel graphics driver support for Apple M1/M2 hardware.

The AGX DRM driver is the first prominent open-source kernel graphics driver being written in the Rust programming language and thus is coming up with the necessary Rust abstractions along the way for interfacing with the otherwise C code.

The AGX DRM driver is being posted for review in "preview" form and the user-space API (UAPI) is admittedly not yet finalized/stable. The hope is at least for these Rust DRM abstractions to be upstreamed soon now that the rest of the Rust for Linux enablement work in the kernel is coming along well.
Things work! We've had most of the abstractions in production edge kernels with the driver, and the new explicit sync stuff has passed quite a few torture tests (this is how we found the drm_sched issue, patch 11).

The abstractions are intended to be safe (safety review very welcome!). While writing them, I tried to avoid making any changes to the C side unless absolutely necessary. I understand that it will probably make sense to adjust the C side to make some things easier, but I wanted to start from this as a baseline.

More details via dri-devel for those interested in Rust DRM abstractions and/or the in-development Apple AGX DRM driver that eventually will go along with the Mesa work for providing open-source graphics support for Apple Silicon hardware on Linux.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week