drm/amdgpu: apply the RV2 system aperture fix to RN/CZN as well
Subsystems (3)
Alex Deucher
maintainerPATCH 1/1 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.
--- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 4 +++- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.c | 4 +++- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 4 +++- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 ++++++-- 4 files changed, 15 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c +3 -1
@@ -102,7 +102,9 @@ static void gfxhub_v1_0_init_system_aperture_regs(struct amdgpu_device *adev)WREG32_SOC15_RLC (GC ,0 , mmMC_VM_SYSTEM_APERTURE_LOW_ADDR,min (adev->gmc.fb_start, adev->gmc.agp_start) >>18 ); -if (adev->apu_flags &AMD_APU_IS_RAVEN2 ) +if (adev->apu_flags & (AMD_APU_IS_RAVEN2 | +AMD_APU_IS_RENOIR | +AMD_APU_IS_GREEN_SARDINE ))/* * Raven2 has a HW issue that it is unable to use the * vram which is out of MC_VM_SYSTEM_APERTURE_HIGH_ADDR.
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.c +3 -1
@@ -139,7 +139,9 @@ gfxhub_v1_2_xcc_init_system_aperture_regs(struct amdgpu_device *adev,WREG32_SOC15_RLC (GC ,GET_INST (GC , i), regMC_VM_SYSTEM_APERTURE_LOW_ADDR,min (adev->gmc.fb_start, adev->gmc.agp_start) >>18 ); -if (adev->apu_flags &AMD_APU_IS_RAVEN2 ) +if (adev->apu_flags & (AMD_APU_IS_RAVEN2 | +AMD_APU_IS_RENOIR | +AMD_APU_IS_GREEN_SARDINE ))/* * Raven2 has a HW issue that it is unable to use the * vram which is out of MC_VM_SYSTEM_APERTURE_HIGH_ADDR.
drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c +3 -1
@@ -96,7 +96,9 @@ static void mmhub_v1_0_init_system_aperture_regs(struct amdgpu_device *adev)WREG32_SOC15 (MMHUB ,0 , mmMC_VM_SYSTEM_APERTURE_LOW_ADDR,min (adev->gmc.fb_start, adev->gmc.agp_start) >>18 ); -if (adev->apu_flags &AMD_APU_IS_RAVEN2 ) +if (adev->apu_flags & (AMD_APU_IS_RAVEN2 | +AMD_APU_IS_RENOIR | +AMD_APU_IS_GREEN_SARDINE ))/* * Raven2 has a HW issue that it is unable to use the vram which * is out of MC_VM_SYSTEM_APERTURE_HIGH_ADDR. So here is the
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +6 -2
@@ -1294,7 +1294,9 @@ static void mmhub_read_system_context(struct amdgpu_device *adev, struct dc_phy_/* AGP aperture is disabled */ if (agp_bot > agp_top) { logical_addr_low = adev->gmc.fb_start >>18 ; -if (adev->apu_flags &AMD_APU_IS_RAVEN2 ) +if (adev->apu_flags & (AMD_APU_IS_RAVEN2 | +AMD_APU_IS_RENOIR | +AMD_APU_IS_GREEN_SARDINE ))/* * Raven2 has a HW issue that it is unable to use the vram which * 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_ logical_addr_high = adev->gmc.fb_end >>18 ; }else { logical_addr_low =min (adev->gmc.fb_start, adev->gmc.agp_start) >>18 ; -if (adev->apu_flags &AMD_APU_IS_RAVEN2 ) +if (adev->apu_flags & (AMD_APU_IS_RAVEN2 | +AMD_APU_IS_RENOIR | +AMD_APU_IS_GREEN_SARDINE ))/* * Raven2 has a HW issue that it is unable to use the vram which * is out of MC_VM_SYSTEM_APERTURE_HIGH_ADDR. So here is the
Signature · 1 line
2.42.0
[AMD Official Use Only - General]
The patch is: Reviewed-and-tested-by: Jiadong Zhu <[email protected]>
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Thursday, January 4, 2024 5:55 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] 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.
--- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 4 +++- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.c | 4 +++- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 4 +++- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 ++++++-- 4 files changed, 15 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c +3 -1
@@ -102,7 +102,9 @@ static void gfxhub_v1_0_init_system_aperture_regs(struct amdgpu_device *adev)WREG32_SOC15_RLC (GC ,0 , mmMC_VM_SYSTEM_APERTURE_LOW_ADDR,min (adev->gmc.fb_start, adev->gmc.agp_start) >>18 ); -if (adev->apu_flags &AMD_APU_IS_RAVEN2 ) +if (adev->apu_flags & (AMD_APU_IS_RAVEN2 | +AMD_APU_IS_RENOIR | +AMD_APU_IS_GREEN_SARDINE ))/* * Raven2 has a HW issue that it is unable to use the * vram which is out of MC_VM_SYSTEM_APERTURE_HIGH_ADDR.
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.c +3 -1
@@ -139,7 +139,9 @@ gfxhub_v1_2_xcc_init_system_aperture_regs(struct amdgpu_device *adev,WREG32_SOC15_RLC (GC ,GET_INST (GC , i), regMC_VM_SYSTEM_APERTURE_LOW_ADDR,min (adev->gmc.fb_start, adev->gmc.agp_start) >>18 ); -if (adev->apu_flags &AMD_APU_IS_RAVEN2 ) +if (adev->apu_flags & (AMD_APU_IS_RAVEN2 | +AMD_APU_IS_RENOIR | +AMD_APU_IS_GREEN_SARDINE ))/* * Raven2 has a HW issue that it is unable to use the * vram which is out of MC_VM_SYSTEM_APERTURE_HIGH_ADDR.
drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c +3 -1
@@ -96,7 +96,9 @@ static void mmhub_v1_0_init_system_aperture_regs(struct amdgpu_device *adev)WREG32_SOC15 (MMHUB ,0 , mmMC_VM_SYSTEM_APERTURE_LOW_ADDR,min (adev->gmc.fb_start, adev->gmc.agp_start) >>18 ); -if (adev->apu_flags &AMD_APU_IS_RAVEN2 ) +if (adev->apu_flags & (AMD_APU_IS_RAVEN2 | +AMD_APU_IS_RENOIR | +AMD_APU_IS_GREEN_SARDINE ))/* * Raven2 has a HW issue that it is unable to use the vram which * is out of MC_VM_SYSTEM_APERTURE_HIGH_ADDR. So here is the diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 5a7ac1c35b58..0c35e4122612 100644
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -1
@@ -1294,7 +1294,9 @@ static void mmhub_read_system_context(struct amdgpu_device *adev, struct dc_phy_/* AGP aperture is disabled */ if (agp_bot > agp_top) { logical_addr_low = adev->gmc.fb_start >>18 ; -if (adev->apu_flags &AMD_APU_IS_RAVEN2 ) +if (adev->apu_flags & (AMD_APU_IS_RAVEN2 | +AMD_APU_IS_RENOIR | +AMD_APU_IS_GREEN_SARDINE ))/* * Raven2 has a HW issue that it is unable to use the vram which * 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_
logical_addr_high = adev->gmc.fb_end >> 18;
} else {
logical_addr_low = min(adev->gmc.fb_start, adev->gmc.agp_start) >> 18;- if (adev->apu_flags & AMD_APU_IS_RAVEN2)
+ if (adev->apu_flags & (AMD_APU_IS_RAVEN2 |
+ AMD_APU_IS_RENOIR |
+ AMD_APU_IS_GREEN_SARDINE))
/*
* Raven2 has a HW issue that it is unable to use the vram which
* is out of MC_VM_SYSTEM_APERTURE_HIGH_ADDR. So here is the
--
2.42.0