]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amdgpu: apply the RV2 system aperture fix to RN/CZN as well
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 3 Jan 2024 16:55:53 +0000 (11:55 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 5 Jan 2024 21:10:44 +0000 (16:10 -0500)
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>
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.c
drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index 53a2ba5fcf4ba3c2865b0abcf6a7592f24e4ea10..22175da0e16afefef1fd4df7a0afbfdf3c63f688 100644 (file)
@@ -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.
index 55423ff1bb4926d78003ad33dc4b3ceec0591948..95d06da544e2a54ebe6fb10ad1309a0c8074814f 100644 (file)
@@ -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.
index 843219a91736093b4b4a6242a75961816d7ec3c4..e3ddd22aa1728eaf89b4ba38657b1816371c5288 100644 (file)
@@ -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
index d9729cf5ceea5a5335ce84d4da83d5f214c7643a..10b2a896c498229ef42e4ce65afbb943b16f3c0e 100644 (file)
@@ -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