[PATCH v4 1/2] drm_amdgpu: Add job fence to resv conditionally
xinhui pan
xinhui.pan at amd.com
Fri Mar 13 16:09:32 UTC 2020
Job fence on page table should be a shared one, so add it to the root
page talbe bo resv.
Cc: Christian König <christian.koenig at amd.com>
Cc: Alex Deucher <alexander.deucher at amd.com>
Cc: Felix Kuehling <Felix.Kuehling at amd.com>
Suggested-by: Christian König <christian.koenig at amd.com>
Signed-off-by: xinhui pan <xinhui.pan at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
index 4cc7881f438c..c094654b233c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
@@ -107,8 +107,10 @@ static int amdgpu_vm_sdma_commit(struct amdgpu_vm_update_params *p,
tmp = dma_fence_get(f);
if (p->direct)
swap(p->vm->last_direct, tmp);
- else
+ else {
+ dma_resv_add_shared_fence(p->vm->root.base.bo->tbo.base.resv, tmp);
swap(p->vm->last_delayed, tmp);
+ }
dma_fence_put(tmp);
if (fence && !p->direct)
--
2.17.1
More information about the amd-gfx
mailing list