[PATCH v8 02/42] drm/gpuvm: Add locking helpers
Danilo Krummrich
dakr at redhat.com
Sun Jun 29 14:49:18 UTC 2025
On 6/29/25 4:03 PM, Rob Clark wrote:
> For UNMAP/REMAP steps we could be needing to lock objects that are not
> explicitly listed in the VM_BIND ioctl in order to tear-down unmapped
> VAs. These helpers handle locking/preparing the needed objects.
>
> Note that these functions do not strictly require the VM changes to be
> applied before the next drm_gpuvm_sm_map_lock()/_unmap_lock() call. In
> the case that VM changes from an earlier drm_gpuvm_sm_map()/_unmap()
> call result in a differing sequence of steps when the VM changes are
> actually applied, it will be the same set of GEM objects involved, so
> the locking is still correct.
>
> v2: Rename to drm_gpuvm_sm_*_exec_locked() [Danilo]
> v3: Expand comments to show expected usage, and explain how the usage
> is safe in the case of overlapping driver VM_BIND ops.
>
> Signed-off-by: Rob Clark <robin.clark at oss.qualcomm.com>
> Tested-by: Antonino Maniscalco <antomani103 at gmail.com>
> Reviewed-by: Antonino Maniscalco <antomani103 at gmail.com>
Acked-by: Danilo Krummrich <dakr at kernel.org>
More information about the dri-devel
mailing list