Initial Rust DRM Abstractions, AGX Apple DRM Driver Posted For Review
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.