From: jsg Date: Thu, 9 Nov 2023 08:16:47 +0000 (+0000) Subject: drm/amdgpu: Reserve fences for VM update X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a4c32e1b060a9cfd73d016063b7712101578162d;p=openbsd drm/amdgpu: Reserve fences for VM update From Felix Kuehling ff86d69b2e5004ec256a9301990acdaa282a777c in linux-6.1.y/6.1.62 316baf09d355aec1179981b6dfe28eba50c5ee5b in mainline linux --- diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_dma_buf.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_dma_buf.c index 15e0a1a5e67..09389154fae 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_dma_buf.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_dma_buf.c @@ -410,7 +410,10 @@ amdgpu_dma_buf_move_notify(struct dma_buf_attachment *attach) continue; } - r = amdgpu_vm_clear_freed(adev, vm, NULL); + /* Reserve fences for two SDMA page table updates */ + r = dma_resv_reserve_fences(resv, 2); + if (!r) + r = amdgpu_vm_clear_freed(adev, vm, NULL); if (!r) r = amdgpu_vm_handle_moved(adev, vm);