|
@@ -242,13 +242,6 @@ 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);
|
|
@@ -940,6 +933,14 @@ restart:
|
|
|
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;
|