pub struct UniqueRefGpuVm<T: DriverGpuVm>(/* private fields */);Expand description
The core of the DRM GPU VA manager.
This object is a unique reference to the VM that can access the interval tree and the Rust
data field.
§Invariants
Each GpuVm instance has at most one UniqueRefGpuVm reference.
Implementations§
Source§impl<T: DriverGpuVm> UniqueRefGpuVm<T>
impl<T: DriverGpuVm> UniqueRefGpuVm<T>
Sourcepub fn sm_map(&mut self, req: OpMapRequest<'_, '_, T>) -> Result
pub fn sm_map(&mut self, req: OpMapRequest<'_, '_, T>) -> Result
Create a mapping, removing or remapping anything that overlaps.
Internally calls the DriverGpuVm callbacks similar to Self::sm_unmap, except that
the DriverGpuVm::sm_step_map is called once to create the requested mapping.
Sourcepub fn sm_unmap(
&mut self,
addr: u64,
length: u64,
context: &mut T::SmContext<'_>,
) -> Result
pub fn sm_unmap( &mut self, addr: u64, length: u64, context: &mut T::SmContext<'_>, ) -> Result
Remove any mappings in the given region.
Internally calls DriverGpuVm::sm_step_unmap for ranges entirely contained within the
given range, and DriverGpuVm::sm_step_remap for ranges that overlap with the range.
Source§impl<T: DriverGpuVm> UniqueRefGpuVm<T>
impl<T: DriverGpuVm> UniqueRefGpuVm<T>
Methods from Deref<Target = GpuVm<T>>§
Sourcepub fn project<'__pin>(
self: Pin<&'__pin mut Self>,
) -> GpuVmProjection<'__pin, T>
pub fn project<'__pin>( self: Pin<&'__pin mut Self>, ) -> GpuVmProjection<'__pin, T>
Pin-projects all fields of Self.
These fields are structurally pinned:
vm
These fields are not structurally pinned:
data
Sourcepub fn obtain(
&self,
obj: &T::Object,
data: impl PinInit<T::VmBoData>,
) -> Result<ARef<GpuVmBo<T>>, AllocError>
pub fn obtain( &self, obj: &T::Object, data: impl PinInit<T::VmBoData>, ) -> Result<ARef<GpuVmBo<T>>, AllocError>
Get or create the GpuVmBo for this gem object.
Sourcepub fn deferred_cleanup(&self)
pub fn deferred_cleanup(&self)
Clean up buffer objects that are no longer used.