summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2024-02-06 03:50:17 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2024-02-06 03:50:17 +0000
commit50f9a0ce35773b5c989b19c9ce9070977823d8d0 (patch)
tree11523f98dc07e0c7d3628d8c6f497688c47b2a07
parent9fec5791ca9c433da9d361ee1cfc029ae1781a77 (diff)
drm/amdgpu: apply the RV2 system aperture fix to RN/CZN as well
From Alex Deucher 08dde830ab24cfcb855b198f7dbe7d3637f623bc in linux-6.6.y/6.6.16 16783d8ef08448815e149e40c82fc1e1fc41ddbf in mainline linux
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/gfxhub_v1_0.c4
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/gfxhub_v1_2.c4
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/mmhub_v1_0.c4
-rw-r--r--sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c8
4 files changed, 15 insertions, 5 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/gfxhub_v1_0.c b/sys/dev/pci/drm/amd/amdgpu/gfxhub_v1_0.c
index cdc290a474a..66c6bab75f8 100644
--- a/sys/dev/pci/drm/amd/amdgpu/gfxhub_v1_0.c
+++ b/sys/dev/pci/drm/amd/amdgpu/gfxhub_v1_0.c
@@ -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.
diff --git a/sys/dev/pci/drm/amd/amdgpu/gfxhub_v1_2.c b/sys/dev/pci/drm/amd/amdgpu/gfxhub_v1_2.c
index 0834af77154..b50f24f7ea5 100644
--- a/sys/dev/pci/drm/amd/amdgpu/gfxhub_v1_2.c
+++ b/sys/dev/pci/drm/amd/amdgpu/gfxhub_v1_2.c
@@ -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.
diff --git a/sys/dev/pci/drm/amd/amdgpu/mmhub_v1_0.c b/sys/dev/pci/drm/amd/amdgpu/mmhub_v1_0.c
index fb91b31056c..d25f87fb197 100644
--- a/sys/dev/pci/drm/amd/amdgpu/mmhub_v1_0.c
+++ b/sys/dev/pci/drm/amd/amdgpu/mmhub_v1_0.c
@@ -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/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index b9eba708fcd..c4e5c6ab034 100644
--- a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -1247,7 +1247,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
@@ -1259,7 +1261,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