Skip to content

Commit 16783d8

Browse files
committed
drm/amdgpu: apply the RV2 system aperture fix to RN/CZN as well
These chips needs the same fix. This was previously not seen on then since the AGP aperture expanded the system aperture, but this showed up again when AGP was disabled. Reviewed-and-tested-by: Jiadong Zhu <Jiadong.Zhu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent d65e0e9 commit 16783d8

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ static void gfxhub_v1_0_init_system_aperture_regs(struct amdgpu_device *adev)
102102
WREG32_SOC15_RLC(GC, 0, mmMC_VM_SYSTEM_APERTURE_LOW_ADDR,
103103
min(adev->gmc.fb_start, adev->gmc.agp_start) >> 18);
104104

105-
if (adev->apu_flags & AMD_APU_IS_RAVEN2)
105+
if (adev->apu_flags & (AMD_APU_IS_RAVEN2 |
106+
AMD_APU_IS_RENOIR |
107+
AMD_APU_IS_GREEN_SARDINE))
106108
/*
107109
* Raven2 has a HW issue that it is unable to use the
108110
* vram which is out of MC_VM_SYSTEM_APERTURE_HIGH_ADDR.

drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ gfxhub_v1_2_xcc_init_system_aperture_regs(struct amdgpu_device *adev,
139139
WREG32_SOC15_RLC(GC, GET_INST(GC, i), regMC_VM_SYSTEM_APERTURE_LOW_ADDR,
140140
min(adev->gmc.fb_start, adev->gmc.agp_start) >> 18);
141141

142-
if (adev->apu_flags & AMD_APU_IS_RAVEN2)
142+
if (adev->apu_flags & (AMD_APU_IS_RAVEN2 |
143+
AMD_APU_IS_RENOIR |
144+
AMD_APU_IS_GREEN_SARDINE))
143145
/*
144146
* Raven2 has a HW issue that it is unable to use the
145147
* vram which is out of MC_VM_SYSTEM_APERTURE_HIGH_ADDR.

drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ static void mmhub_v1_0_init_system_aperture_regs(struct amdgpu_device *adev)
9696
WREG32_SOC15(MMHUB, 0, mmMC_VM_SYSTEM_APERTURE_LOW_ADDR,
9797
min(adev->gmc.fb_start, adev->gmc.agp_start) >> 18);
9898

99-
if (adev->apu_flags & AMD_APU_IS_RAVEN2)
99+
if (adev->apu_flags & (AMD_APU_IS_RAVEN2 |
100+
AMD_APU_IS_RENOIR |
101+
AMD_APU_IS_GREEN_SARDINE))
100102
/*
101103
* Raven2 has a HW issue that it is unable to use the vram which
102104
* is out of MC_VM_SYSTEM_APERTURE_HIGH_ADDR. So here is the

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,7 +1294,9 @@ static void mmhub_read_system_context(struct amdgpu_device *adev, struct dc_phy_
12941294
/* AGP aperture is disabled */
12951295
if (agp_bot > agp_top) {
12961296
logical_addr_low = adev->gmc.fb_start >> 18;
1297-
if (adev->apu_flags & AMD_APU_IS_RAVEN2)
1297+
if (adev->apu_flags & (AMD_APU_IS_RAVEN2 |
1298+
AMD_APU_IS_RENOIR |
1299+
AMD_APU_IS_GREEN_SARDINE))
12981300
/*
12991301
* Raven2 has a HW issue that it is unable to use the vram which
13001302
* is out of MC_VM_SYSTEM_APERTURE_HIGH_ADDR. So here is the
@@ -1306,7 +1308,9 @@ static void mmhub_read_system_context(struct amdgpu_device *adev, struct dc_phy_
13061308
logical_addr_high = adev->gmc.fb_end >> 18;
13071309
} else {
13081310
logical_addr_low = min(adev->gmc.fb_start, adev->gmc.agp_start) >> 18;
1309-
if (adev->apu_flags & AMD_APU_IS_RAVEN2)
1311+
if (adev->apu_flags & (AMD_APU_IS_RAVEN2 |
1312+
AMD_APU_IS_RENOIR |
1313+
AMD_APU_IS_GREEN_SARDINE))
13101314
/*
13111315
* Raven2 has a HW issue that it is unable to use the vram which
13121316
* is out of MC_VM_SYSTEM_APERTURE_HIGH_ADDR. So here is the

0 commit comments

Comments
 (0)