diff options
| author | Oak Zeng <[email protected]> | 2021-04-01 19:36:41 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2021-04-15 20:03:01 +0000 |
| commit | 0ca565ab97083acaf640dd58a6f66cbe3d802356 (patch) | |
| tree | 16e3c6960d7b32a381839df764bac88bc4a707ec /drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | |
| parent | drm/amdgpu: Introduce functions for vram physical addr calculation (diff) | |
| download | kernel-0ca565ab97083acaf640dd58a6f66cbe3d802356.tar.gz kernel-0ca565ab97083acaf640dd58a6f66cbe3d802356.zip | |
drm/amdgpu: Calling address translation functions to simplify codes
Use amdgpu_gmc_vram_pa and amdgpu_gmc_vram_cpu_pa
to simplify codes. No logic change.
Signed-off-by: Oak Zeng <[email protected]>
Signed-off-by: Harish Kasiviswanathan <[email protected]>
Acked-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c b/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c index d189507dcef0..7a278d8dc709 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c @@ -120,8 +120,7 @@ static void gfxhub_v1_0_init_system_aperture_regs(struct amdgpu_device *adev) max(adev->gmc.fb_end, adev->gmc.agp_end) >> 18); /* Set default page address. */ - value = adev->vram_scratch.gpu_addr - adev->gmc.vram_start + - adev->vm_manager.vram_base_offset; + value = amdgpu_gmc_vram_mc2pa(adev, adev->vram_scratch.gpu_addr); WREG32_SOC15(GC, 0, mmMC_VM_SYSTEM_APERTURE_DEFAULT_ADDR_LSB, (u32)(value >> 12)); WREG32_SOC15(GC, 0, mmMC_VM_SYSTEM_APERTURE_DEFAULT_ADDR_MSB, |
