Commit c60cd590 authored by Felix Kuehling's avatar Felix Kuehling Committed by Alex Deucher

drm/amdgpu: Replace ttm_bo_wait with amdgpu_bo_sync_wait

The fence_owner logic in amdgpu_sync_wait will allow waiting without
having to temporarily remove eviction fences.
Signed-off-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent e8e32426
...@@ -355,7 +355,7 @@ static int amdgpu_amdkfd_bo_validate(struct amdgpu_bo *bo, uint32_t domain, ...@@ -355,7 +355,7 @@ static int amdgpu_amdkfd_bo_validate(struct amdgpu_bo *bo, uint32_t domain,
if (ret) if (ret)
goto validate_fail; goto validate_fail;
ttm_bo_wait(&bo->tbo, false, false); amdgpu_bo_sync_wait(bo, AMDGPU_FENCE_OWNER_KFD, false);
amdgpu_amdkfd_add_eviction_fence(bo, ef_list, ef_count); amdgpu_amdkfd_add_eviction_fence(bo, ef_list, ef_count);
} }
...@@ -1002,7 +1002,7 @@ static int init_kfd_vm(struct amdgpu_vm *vm, void **process_info, ...@@ -1002,7 +1002,7 @@ static int init_kfd_vm(struct amdgpu_vm *vm, void **process_info,
pr_err("validate_pt_pd_bos() failed\n"); pr_err("validate_pt_pd_bos() failed\n");
goto validate_pd_fail; goto validate_pd_fail;
} }
ret = ttm_bo_wait(&vm->root.base.bo->tbo, false, false); amdgpu_bo_sync_wait(vm->root.base.bo, AMDGPU_FENCE_OWNER_KFD, false);
if (ret) if (ret)
goto wait_pd_fail; goto wait_pd_fail;
amdgpu_bo_fence(vm->root.base.bo, amdgpu_bo_fence(vm->root.base.bo,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment