On 11/17/26 8:32 PM, Alice Ryhl wrote:
> From: Sami Tolvanen <[email protected]>
> 
> Tyr's VM_BIND remap path rebuilds page-table mappings for the fragments
> that survive a split, and those fragments must keep the protection flags
> of the original mapping. Add GpuVa::data_ref() so the remap step can
> read the VaData of an existing mapping.
> 
> Signed-off-by: Sami Tolvanen <[email protected]>
> [aliceryhl: split into separate gpuvm and iommu commits]
> Signed-off-by: Alice Ryhl <[email protected]>

One question below, otherwise:

Acked-by: Danilo Krummrich <[email protected]>

> ---
>  rust/kernel/drm/gpuvm/va.rs | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/rust/kernel/drm/gpuvm/va.rs b/rust/kernel/drm/gpuvm/va.rs
> index 46493f0ec5a6..f81302faba61 100644
> --- a/rust/kernel/drm/gpuvm/va.rs
> +++ b/rust/kernel/drm/gpuvm/va.rs
> @@ -87,6 +87,12 @@ pub fn obj(&self) -> &T::Object {
>          unsafe { <T::Object as 
> IntoGEMObject>::from_raw((*self.as_raw()).gem.obj) }
>      }
>  
> +    /// Access the driver-private [`VaData`](DriverGpuVm::VaData) associated 
> with this mapping.
> +    #[inline]
> +    pub fn data_ref(&self) -> &T::VaData {
> +        &self.data
> +    }
> +
Why data_ref() instead of just data() or a Deref impl?

Reply via email to