On Mon Mar 16, 2026 at 10:16 PM CET, Lyude Paul wrote:
Applied to drm-rust-next, thanks!
Asahi Lina (2): rust: drm: gem: shmem: Add DRM shmem helper abstraction
[ * DRM_GEM_SHMEM_HELPER is a tristate; when a module driver selects it, it becomes =m. The Rust kernel crate and its C helpers are always built into vmlinux and can't reference symbols from a module, causing link errors.
Thus, add RUST_DRM_GEM_SHMEM_HELPER bool Kconfig that selects DRM_GEM_SHMEM_HELPER, forcing it built-in when Rust drivers need it; use cfg(CONFIG_RUST_DRM_GEM_SHMEM_HELPER) for the shmem module.
* Add cfg_attr(not(CONFIG_RUST_DRM_GEM_SHMEM_HELPER), expect(unused)) on pub(crate) use impl_aref_for_gem_obj and BaseObjectPrivate, so that unused warnings are suppressed when shmem is not enabled.
* Enable const_refs_to_static (stabilized in 1.83) to prevent build errors with older compilers.
* Use &raw const for bindings::drm_gem_shmem_vm_ops and add #[allow(unused_unsafe, reason = "Safe since Rust 1.82.0")].
* Fix incorrect C Header path and minor spelling and formatting issues.
* Drop shmem::Object::sg_table() as the current implementation is unsound.
- Danilo ]
Lyude Paul (5): rust: drm: gem: Add raw_dma_resv() function
[ Fix incorrect reference in safety comment. - Danilo ]