[2/4] drm/amdgpu: Replace ttm_bo_wait with amdgpu_sync_wait_resv

Submitted by Kuehling, Felix on Feb. 7, 2019, 7:54 p.m.

Details

Message ID 1549569222-13251-2-git-send-email-Felix.Kuehling@amd.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Kuehling, Felix Feb. 7, 2019, 7:54 p.m.
The fence_owner logic in amdgpu_sync_wait will allow waiting without
having to temporarily remove eviction fences.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
index d7b10d7..492439c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
@@ -355,7 +355,8 @@  static int amdgpu_amdkfd_bo_validate(struct amdgpu_bo *bo, uint32_t domain,
 		if (ret)
 			goto validate_fail;
 
-		ttm_bo_wait(&bo->tbo, false, false);
+		amdgpu_sync_wait_resv(NULL, bo->tbo.resv,
+				      AMDGPU_FENCE_OWNER_KFD, false);
 		amdgpu_amdkfd_add_eviction_fence(bo, ef_list, ef_count);
 	}
 
@@ -1002,7 +1003,8 @@  static int init_kfd_vm(struct amdgpu_vm *vm, void **process_info,
 		pr_err("validate_pt_pd_bos() failed\n");
 		goto validate_pd_fail;
 	}
-	ret = ttm_bo_wait(&vm->root.base.bo->tbo, false, false);
+	amdgpu_sync_wait_resv(NULL, vm->root.base.bo->tbo.resv,
+			      AMDGPU_FENCE_OWNER_KFD, false);
 	if (ret)
 		goto wait_pd_fail;
 	amdgpu_bo_fence(vm->root.base.bo,