kernel::drm::gpuvm

Trait DriverGpuVm

Source
pub trait DriverGpuVm:
    Sized
    + Send
    + Sync {
    type Driver: Driver;
    type Object: AllocImpl<Driver = Self::Driver> + Send + Sync;
    type VaData: Send;
    type VmBoData: Send + Sync;
    type SmContext<'ctx>
       where Self: 'ctx;

    // Required methods
    fn sm_step_map<'op, 'ctx>(
        &mut self,
        op: OpMap<'op, Self>,
        context: &mut Self::SmContext<'ctx>,
    ) -> Result<OpMapped<'op, Self>, Error>;
    fn sm_step_unmap<'op, 'ctx>(
        &mut self,
        op: OpUnmap<'op, Self>,
        context: &mut Self::SmContext<'ctx>,
    ) -> Result<OpUnmapped<'op, Self>, Error>;
    fn sm_step_remap<'op, 'ctx>(
        &mut self,
        op: OpRemap<'op, Self>,
        context: &mut Self::SmContext<'ctx>,
    ) -> Result<OpRemapped<'op, Self>, Error>;
}
Expand description

The manager for a GPUVM.

Required Associated Types§

Source

type Driver: Driver

Parent Driver for this object.

Source

type Object: AllocImpl<Driver = Self::Driver> + Send + Sync

The kind of GEM object stored in this GPUVM.

Source

type VaData: Send

Data stored with each struct drm_gpuva.

Only Send is required: the data has a single owner at all times, moving between threads by value (handed back as a GpuVaRemoved) but never accessed by two threads concurrently.

Source

type VmBoData: Send + Sync

Data stored with each struct drm_gpuvm_bo.

Source

type SmContext<'ctx> where Self: 'ctx

The private data passed to callbacks.

Required Methods§

Source

fn sm_step_map<'op, 'ctx>( &mut self, op: OpMap<'op, Self>, context: &mut Self::SmContext<'ctx>, ) -> Result<OpMapped<'op, Self>, Error>

Indicates that a new mapping should be created.

Source

fn sm_step_unmap<'op, 'ctx>( &mut self, op: OpUnmap<'op, Self>, context: &mut Self::SmContext<'ctx>, ) -> Result<OpUnmapped<'op, Self>, Error>

Indicates that an existing mapping should be removed.

Source

fn sm_step_remap<'op, 'ctx>( &mut self, op: OpRemap<'op, Self>, context: &mut Self::SmContext<'ctx>, ) -> Result<OpRemapped<'op, Self>, Error>

Indicates that an existing mapping should be split up.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§