diff options
author | Christian König <christian.koenig@amd.com> | 2018-08-30 03:45:07 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-08-30 10:03:45 -0400 |
commit | 17cc525206d6dba36d0fde12fd512c77dcfa1954 (patch) | |
tree | 69f0d8054b9571c68b1a5d39380c5829e67b8e01 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |
parent | ec210e3226dc0b481ac1b33082b3b508f89387e3 (diff) |
drm/amdgpu: Revert "kmap PDs/PTs in amdgpu_vm_update_directories"
This reverts commit a7f91061c60ad9cac2e6a03b642be6a4f88b3662.
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index f50697df9799..f31fa351caba 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |||
@@ -343,7 +343,10 @@ int amdgpu_vm_validate_pt_bos(struct amdgpu_device *adev, struct amdgpu_vm *vm, | |||
343 | list_move(&bo_base->vm_status, &vm->moved); | 343 | list_move(&bo_base->vm_status, &vm->moved); |
344 | spin_unlock(&vm->moved_lock); | 344 | spin_unlock(&vm->moved_lock); |
345 | } else { | 345 | } else { |
346 | r = amdgpu_ttm_alloc_gart(&bo->tbo); | 346 | if (vm->use_cpu_for_update) |
347 | r = amdgpu_bo_kmap(bo, NULL); | ||
348 | else | ||
349 | r = amdgpu_ttm_alloc_gart(&bo->tbo); | ||
347 | if (r) | 350 | if (r) |
348 | break; | 351 | break; |
349 | list_move(&bo_base->vm_status, &vm->relocated); | 352 | list_move(&bo_base->vm_status, &vm->relocated); |
@@ -1094,14 +1097,6 @@ restart: | |||
1094 | params.adev = adev; | 1097 | params.adev = adev; |
1095 | 1098 | ||
1096 | if (vm->use_cpu_for_update) { | 1099 | if (vm->use_cpu_for_update) { |
1097 | struct amdgpu_vm_bo_base *bo_base; | ||
1098 | |||
1099 | list_for_each_entry(bo_base, &vm->relocated, vm_status) { | ||
1100 | r = amdgpu_bo_kmap(bo_base->bo, NULL); | ||
1101 | if (unlikely(r)) | ||
1102 | return r; | ||
1103 | } | ||
1104 | |||
1105 | r = amdgpu_vm_wait_pd(adev, vm, AMDGPU_FENCE_OWNER_VM); | 1100 | r = amdgpu_vm_wait_pd(adev, vm, AMDGPU_FENCE_OWNER_VM); |
1106 | if (unlikely(r)) | 1101 | if (unlikely(r)) |
1107 | return r; | 1102 | return r; |