[PATCH 3/4] drm/amdgpu: Signal page table fence after gfx vm flush
Philip Yang
Philip.Yang at amd.com
Thu Jun 1 19:31:16 UTC 2023
To free page table BOs which are fenced and freed when updating page
table.
Signed-off-by: Philip Yang <Philip.Yang at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
index e0d3e3aa2e31..10d63256d26b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
@@ -219,6 +219,13 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
amdgpu_ring_undo(ring);
return r;
}
+
+ if (vm) {
+ /* Signal fence to free page table BO */
+ dma_fence_signal(vm->pt_fence);
+ dma_fence_put(vm->pt_fence);
+ vm->pt_fence = amdgpu_pt_fence_create();
+ }
}
amdgpu_ring_ib_begin(ring);
--
2.35.1
More information about the amd-gfx
mailing list