Skip to content

Commit

Permalink
Revert "drm/amdgpu: kmap PDs/PTs in amdgpu_vm_update_directories"
Browse files Browse the repository at this point in the history
This reverts commit a7f9106.

Bug: SWDEV-163973
Change-Id: I182927493a5caf09fe09b04744bfb526419999ff
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
  • Loading branch information
Felix Kuehling authored and Felix Kuehling committed Aug 31, 2018
1 parent 5f91cd2 commit effa11e
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,13 @@ int amdgpu_vm_validate_pt_bos(struct amdgpu_device *adev, struct amdgpu_vm *vm,
spin_unlock(&glob->lru_lock);
}

if (bo->tbo.type == ttm_bo_type_kernel &&
vm->use_cpu_for_update) {
r = amdgpu_bo_kmap(bo, NULL);
if (r)
break;
}

if (bo->tbo.type != ttm_bo_type_kernel) {
spin_lock(&vm->moved_lock);
list_move(&bo_base->vm_status, &vm->moved);
Expand Down Expand Up @@ -1048,14 +1055,6 @@ int amdgpu_vm_update_directories(struct amdgpu_device *adev,
params.adev = adev;

if (vm->use_cpu_for_update) {
struct amdgpu_vm_bo_base *bo_base;

list_for_each_entry(bo_base, &vm->relocated, vm_status) {
r = amdgpu_bo_kmap(bo_base->bo, NULL);
if (unlikely(r))
return r;
}

r = amdgpu_vm_wait_pd(adev, vm, AMDGPU_FENCE_OWNER_VM);
if (unlikely(r))
return r;
Expand Down

0 comments on commit effa11e

Please sign in to comment.