On 11/18/26 19:52, Benjamin Cheng wrote:
> Reserving 1 hasn't been enough here for a while (last_unlocked was never
> considered originally).
Again completely unnecessary. The fault handling can't use a TLB fence.
Regards,
Christian.
>
> Fixes: 2b665c3735b3 ("drm/amdgpu: reserve fence slot to update page table")
> Fixes: d8a3f0a0348d ("drm/amdgpu: implement TLB flush fence")
> Fixes: 897ee11ec020 ("drm/amdgpu: create multiple clear/move ttm entities")
> Signed-off-by: Benjamin Cheng <[email protected]>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 6d8d639e5986..f4a836594e7c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -3186,7 +3186,7 @@ bool amdgpu_vm_handle_fault(struct amdgpu_device *adev,
> u32 pasid,
> value = 0;
> }
>
> - r = dma_resv_reserve_fences(vm->root.bo->tbo.base.resv, 1);
> + r = dma_resv_reserve_fences(vm->root.bo->tbo.base.resv,
> AMDGPU_VM_UPDATE_FENCES);
> if (r) {
> pr_debug("failed %d to reserve fence slot\n", r);
> goto error_unlock;