diff options
| author | 2018-08-22 12:22:14 +0200 | |
|---|---|---|
| committer | 2018-08-27 11:11:19 -0500 | |
| commit | 11c3a249ff7a1c710011bd06a451956f2a40c30c (patch) | |
| tree | 5bebe0cee82cb0e67c1303d399cf8f83853f6619 /drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | |
| parent | drm/amdgpu: remove gart.table_addr (diff) | |
| download | wireguard-linux-11c3a249ff7a1c710011bd06a451956f2a40c30c.tar.xz wireguard-linux-11c3a249ff7a1c710011bd06a451956f2a40c30c.zip | |
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/gfxhub_v1_0.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c b/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c index 2baab7e69ef5..3403ded39d13 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c @@ -37,12 +37,7 @@ u64 gfxhub_v1_0_get_mc_fb_offset(struct amdgpu_device *adev) static void gfxhub_v1_0_init_gart_pt_regs(struct amdgpu_device *adev) { - uint64_t value = amdgpu_bo_gpu_offset(adev->gart.bo); - - BUG_ON(value & (~0x0000FFFFFFFFF000ULL)); - value -= adev->gmc.vram_start + adev->vm_manager.vram_base_offset; - value &= 0x0000FFFFFFFFF000ULL; - value |= 0x1; /*valid bit*/ + uint64_t value = amdgpu_gmc_pd_addr(adev->gart.bo); WREG32_SOC15(GC, 0, mmVM_CONTEXT0_PAGE_TABLE_BASE_ADDR_LO32, lower_32_bits(value)); |
