diff options
author | Christian König <christian.koenig@amd.com> | 2018-08-22 06:22:14 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-08-27 12:11:19 -0400 |
commit | 11c3a249ff7a1c710011bd06a451956f2a40c30c (patch) | |
tree | 5bebe0cee82cb0e67c1303d399cf8f83853f6619 /drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | |
parent | 4e830fb1b5f589352e711fc0df515c34e978e1a0 (diff) |
drm/amdgpu: add amdgpu_gmc_pd_addr helper
Add a helper to get the root PD address and remove the workarounds from
the GMC9 code for that.
Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c index f92597c292fe..2ef6e8557b65 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | |||
@@ -364,7 +364,6 @@ static int vm_validate_pt_pd_bos(struct amdgpu_vm *vm) | |||
364 | struct amdgpu_bo *pd = vm->root.base.bo; | 364 | struct amdgpu_bo *pd = vm->root.base.bo; |
365 | struct amdgpu_device *adev = amdgpu_ttm_adev(pd->tbo.bdev); | 365 | struct amdgpu_device *adev = amdgpu_ttm_adev(pd->tbo.bdev); |
366 | struct amdgpu_vm_parser param; | 366 | struct amdgpu_vm_parser param; |
367 | uint64_t addr, flags = AMDGPU_PTE_VALID; | ||
368 | int ret; | 367 | int ret; |
369 | 368 | ||
370 | param.domain = AMDGPU_GEM_DOMAIN_VRAM; | 369 | param.domain = AMDGPU_GEM_DOMAIN_VRAM; |
@@ -383,9 +382,7 @@ static int vm_validate_pt_pd_bos(struct amdgpu_vm *vm) | |||
383 | return ret; | 382 | return ret; |
384 | } | 383 | } |
385 | 384 | ||
386 | addr = amdgpu_bo_gpu_offset(vm->root.base.bo); | 385 | vm->pd_phys_addr = amdgpu_gmc_pd_addr(vm->root.base.bo); |
387 | amdgpu_gmc_get_vm_pde(adev, -1, &addr, &flags); | ||
388 | vm->pd_phys_addr = addr; | ||
389 | 386 | ||
390 | if (vm->use_cpu_for_update) { | 387 | if (vm->use_cpu_for_update) { |
391 | ret = amdgpu_bo_kmap(pd, NULL); | 388 | ret = amdgpu_bo_kmap(pd, NULL); |