On 11/18/26 19:52, Benjamin Cheng wrote: > Switch to stop using this deprecated helper. > > The original could be incorrect under certain circumstances, since the > amdgpu_bo_fence only reserves one slot, and at the time of calling the > SDMA commit and TLB flush fences were not added yet (the reserve_fences > is not additive). In addition this allows us to switch to use BOOKKEEP > usage. > > Signed-off-by: Benjamin Cheng <[email protected]>
Reviewed-by: Christian König <[email protected]> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c > index daf0e75d0bb1..2a8abc9684b7 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c > @@ -1216,7 +1216,8 @@ int amdgpu_vm_update_range(struct amdgpu_device *adev, > struct amdgpu_vm *vm, > if (!unlocked && !dma_fence_is_signaled(vm->last_unlocked)) { > struct dma_fence *tmp = dma_fence_get_stub(); > > - amdgpu_bo_fence(vm->root.bo, vm->last_unlocked, true); > + dma_resv_add_fence(vm->root.bo->tbo.base.resv, > vm->last_unlocked, > + DMA_RESV_USAGE_BOOKKEEP); > swap(vm->last_unlocked, tmp); > dma_fence_put(tmp); > }
