Reworking the VGEM driver in Rust

Maira Canal from Igalia presented a project to rewrite the VGEM (Virtual GEM Provider) driver in Rust. VGEM is about 400 lines of code and provides a hardware-agnostic GEM (Graphics Execution Manager) backend used for shared buffer access by 3D software device drivers such as LLVMpipe to improve software rasterization performance.

VGEM will be the second kernel-level graphics driver in Rust (the first was Asahi's DRM (Direct Rendering Manager) driver for the Apple AGX GPU used in the Apple M1/M2 chips). Development required the creation of new bindings to work from Rust code with the platform device, the XArray type, and abstractions related to direct memory access, such as DMA barriers (DMA fence). At the current stage of development, the driver is almost ready, it passes most of the IGT tests, with the exception of two checks (vgem_slow and vgem_basic@unload), but IOCTL support needs to be improved.

Source: opennet.ru

Add a comment