On Fri, Jul 31, 2026 at 01:05:45AM +0800, Alvin Sun wrote: > Add method wrapping drm_debugfs_gpuva_info to dump GPU VA space > mappings into a seq_file. Needed by the Tyr gpuvas debugfs file. > > Signed-off-by: Alvin Sun <[email protected]> > --- > rust/kernel/drm/gpuvm/mod.rs | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/rust/kernel/drm/gpuvm/mod.rs b/rust/kernel/drm/gpuvm/mod.rs > index 20a08b3defeb8..9da88501a4206 100644 > --- a/rust/kernel/drm/gpuvm/mod.rs > +++ b/rust/kernel/drm/gpuvm/mod.rs > @@ -312,6 +312,14 @@ pub fn data_ref(&self) -> &T { > unsafe { &*self.0.data.get() } > } > > + /// Dumps GPU VA space info into a seq_file. > + /// > + /// Wraps the C `drm_debugfs_gpuva_info` function. > + pub fn dump_gpuva_info(&self, m: &crate::seq_file::SeqFile) -> Result { > + // SAFETY: `m.as_raw()` and `self.as_raw()` are valid by the type > invariants. > + to_result(unsafe { bindings::drm_debugfs_gpuva_info(m.as_raw(), > self.as_raw()) }) > + }
This can be marked inline. Otherwise: Reviewed-by: Alice Ryhl <[email protected]>
