drm/amdgpu: Revert "kmap PDs/PTs in amdgpu_vm_update_directories"
Subsystems (2)
PATCH 1/1 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.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +4 -9
@@ -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);spin_unlock (&vm->moved_lock); }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)break ;list_move (&bo_base->vm_status, &vm->relocated);
@@ -1093,14 +1096,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;
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20180830075006.13403-1-christian.koenig-5C7GfCeVMHo@public.gmane.org
Zhang, Jerry (Junwei)
Acked-by Junwei ZhangQuoted 6 lines · Christian König
This reverts commit
a7f91061c60ad9cac2e6a03b642be6a4f88b3662.Felix pointed out that we need to have the BOs mapped even before
amdgpu_vm_update_directoriesis called.Signed-off-by Christian König <[email protected]>
Quoted 26 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +4
-2@@ -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);spin_unlock (&vm->moved_lock); }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)break ;list_move (&bo_base->vm_status, &vm->relocated);@@ -1093,14 +1096,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;
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c int amdgpu_vm_update_directories(struct amdgpu_device *adev, · line 1101
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0
-7- -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;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx