drm/amdgpu: Revert "kmap PDs/PTs in amdgpu_vm_update_directories"
This reverts commit a7f91061c6
.
Felix pointed out that we need to have the BOs mapped even before
amdgpu_vm_update_directories is called.
Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Junwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
ec210e3226
commit
17cc525206
|
@ -343,7 +343,10 @@ int amdgpu_vm_validate_pt_bos(struct amdgpu_device *adev, struct amdgpu_vm *vm,
|
||||||
list_move(&bo_base->vm_status, &vm->moved);
|
list_move(&bo_base->vm_status, &vm->moved);
|
||||||
spin_unlock(&vm->moved_lock);
|
spin_unlock(&vm->moved_lock);
|
||||||
} else {
|
} else {
|
||||||
r = amdgpu_ttm_alloc_gart(&bo->tbo);
|
if (vm->use_cpu_for_update)
|
||||||
|
r = amdgpu_bo_kmap(bo, NULL);
|
||||||
|
else
|
||||||
|
r = amdgpu_ttm_alloc_gart(&bo->tbo);
|
||||||
if (r)
|
if (r)
|
||||||
break;
|
break;
|
||||||
list_move(&bo_base->vm_status, &vm->relocated);
|
list_move(&bo_base->vm_status, &vm->relocated);
|
||||||
|
@ -1094,14 +1097,6 @@ int amdgpu_vm_update_directories(struct amdgpu_device *adev,
|
||||||
params.adev = adev;
|
params.adev = adev;
|
||||||
|
|
||||||
if (vm->use_cpu_for_update) {
|
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);
|
r = amdgpu_vm_wait_pd(adev, vm, AMDGPU_FENCE_OWNER_VM);
|
||||||
if (unlikely(r))
|
if (unlikely(r))
|
||||||
return r;
|
return r;
|
||||||
|
|
Loading…
Reference in New Issue