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 b1d2779a2aee..55f75bad9304 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -1215,7 +1215,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); } -- 2.56.1
