drm/amdgpu: cleanup kptr handling

Don't keep around the same pointer twice.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Christian König
2017-07-20 23:45:18 +02:00
committed by Alex Deucher
parent 4dbc9908d4
commit f5e1c740af
5 changed files with 19 additions and 15 deletions

View File

@@ -1060,7 +1060,7 @@ static int amdgpu_vm_update_level(struct amdgpu_device *adev,
shadow = parent->bo->shadow;
if (vm->use_cpu_for_update) {
pd_addr = (unsigned long)parent->bo->kptr;
pd_addr = (unsigned long)amdgpu_bo_kptr(parent->bo);
r = amdgpu_vm_wait_pd(adev, vm, AMDGPU_FENCE_OWNER_VM);
if (unlikely(r))
return r;
@@ -1401,7 +1401,7 @@ static int amdgpu_vm_update_ptes(struct amdgpu_pte_update_params *params,
pt = entry->bo;
if (use_cpu_update) {
pe_start = (unsigned long)pt->kptr;
pe_start = (unsigned long)amdgpu_bo_kptr(pt);
} else {
if (pt->shadow) {
pe_start = amdgpu_bo_gpu_offset(pt->shadow);