summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c
diff options
context:
space:
mode:
authorLe Ma <le.ma@amd.com>2019-04-22 11:14:59 +0200
committerAlex Deucher <alexander.deucher@amd.com>2019-07-18 21:18:06 +0200
commit6c54afc7e83e801cccfcf773c92f7b4f614face8 (patch)
tree03d9d818a68384a35c6164b4d5efb197a8a5176b /drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c
parentdrm/amdgpu: add harvest support for Arcturus (diff)
downloadlinux-6c54afc7e83e801cccfcf773c92f7b4f614face8.tar.xz
linux-6c54afc7e83e801cccfcf773c92f7b4f614face8.zip
drm/amdgpu: assign fb_start/end in mmhub v9.4 interface
Align with mmhub v1.0. Signed-off-by: Le Ma <le.ma@amd.com> Reviewed-by: Feifei Xu <Feifei.Xu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c
index c0eb8f0a2182..33b0de54a5da 100644
--- a/drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c
+++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c
@@ -39,10 +39,17 @@ u64 mmhub_v9_4_get_fb_location(struct amdgpu_device *adev)
{
/* The base should be same b/t 2 mmhubs on Acrturus. Read one here. */
u64 base = RREG32_SOC15(MMHUB, 0, mmVMSHAREDVC0_MC_VM_FB_LOCATION_BASE);
+ u64 top = RREG32_SOC15(MMHUB, 0, mmVMSHAREDVC0_MC_VM_FB_LOCATION_TOP);
base &= VMSHAREDVC0_MC_VM_FB_LOCATION_BASE__FB_BASE_MASK;
base <<= 24;
+ top &= VMSHAREDVC0_MC_VM_FB_LOCATION_TOP__FB_TOP_MASK;
+ top <<= 24;
+
+ adev->gmc.fb_start = base;
+ adev->gmc.fb_end = top;
+
return base;
}