From 33dd04b2aaec1af5e13a2b859cc9d6dc606a83de Mon Sep 17 00:00:00 2001 From: Yong Zhao Date: Fri, 21 Oct 2016 12:51:55 -0400 Subject: [PATCH 1552/4131] drm/amdgpu: Change amdgpu_vm_clear_freed prototype to return last fence MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change will accommodate the scenarios that we need to know when the last pt update operation is finished. Change-Id: I33cd04a9cf438d34206f0ce20d6f1848ce3a5bf6 Signed-off-by: Yong Zhao Reviewed-by: Christian König Conflicts: drivers/gpu/drm/amd/amdgpu/amdgpu.h drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c index 6581539..2b56ea3 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c @@ -840,7 +840,7 @@ static int map_bo_to_gpuvm(struct amdgpu_device *adev, struct amdgpu_bo *bo, * removed from PT. This function is called here because it requires * the radeon_vm::mutex to be locked and PT to be reserved */ - ret = amdgpu_vm_clear_freed(adev, vm); + ret = amdgpu_vm_clear_freed(adev, vm, NULL); if (ret != 0) { pr_err("amdkfd: Failed to radeon_vm_clear_freed\n"); goto err_unpin_bo; @@ -1251,7 +1251,7 @@ int amdgpu_amdkfd_gpuvm_create_process_vm(struct kgd_dev *kgd, void **vm, * removed from PT. This function is called here because it requires * the radeon_vm::mutex to be locked and PT to be reserved */ - ret = amdgpu_vm_clear_freed(adev, &new_vm->base); + ret = amdgpu_vm_clear_freed(adev, &new_vm->base, NULL); if (ret != 0) pr_err("amdgpu: Failed to amdgpu_vm_clear_freed\n"); @@ -1326,7 +1326,7 @@ static int unmap_bo_from_gpuvm(struct amdgpu_device *adev, * removed from PT. This function is called here because it requires * the radeon_vm::mutex to be locked and PT to be reserved */ - amdgpu_vm_clear_freed(adev, vm); + amdgpu_vm_clear_freed(adev, vm, NULL); /* Update the page tables - Remove the mapping from bo_va */ amdgpu_vm_bo_update(adev, bo_va, NULL); -- 2.7.4