On Mon, Oct 06, 2025 at 12:05:54PM +0000, Alice Ryhl wrote:
> There are two main ways that GPUVM might be used:
> 
> * staged mode, where VM_BIND ioctls update the GPUVM immediately so that
>   the GPUVM reflects the state of the VM *including* staged changes that
>   are not yet applied to the GPU's virtual address space.
> * immediate mode, where the GPUVM state is updated during run_job(),
>   i.e., in the DMA fence signalling critical path, to ensure that the
>   GPUVM and the GPU's virtual address space has the same state at all
>   times.
> 
> Currently, only Panthor uses GPUVM in immediate mode, but the Rust
> drivers Tyr and Nova will also use GPUVM in immediate mode, so it is
> worth to support both staged and immediate mode well in GPUVM. To use
> immediate mode, we must manage the vm_bos and vas during the fence
> signalling critical path.
> 
> The first part of that work was the introduction of a fence signalling
> safe mutex for the GEMs GPUVA list in commit e7fa80e2932c ("drm_gem: add
> mutex to drm_gem_object.gpuva").
> 
> This is series the second part of that work: Dropping a vm_bo object in
> the fence signalling critical path is problematic for two reasons:
> 
> * When using DRM_GPUVM_RESV_PROTECTED, you cannot remove the vm_bo from
>   the extobj/evicted lists during the fence signalling path.
> * Dropping a vm_bo could lead to the GEM object getting destroyed.
>   The requirement that GEM object cleanup is fence signalling safe is
>   dubious and likely to be violated in practice.
> 
> Panthor already has its own custom implementation of postponing vm_bo
> cleanup. Take inspiration from that by moving the logic into GPUVM, and
> adjust Panthor to use the new GPUVM logic.
> 
> Signed-off-by: Alice Ryhl <[email protected]>

Pushed to drm-rust-next.

I added this to drm-rust instead of drm-misc as a prerequisite for
another patch. If merge conflicts show up, we can do a backmerge.

Reply via email to