drm/amdgpu: Use another offset for GC 9.4.3 remap
authorLijo Lazar <lijo.lazar@amd.com>
Tue, 28 Nov 2023 11:17:14 +0000 (16:47 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 29 Nov 2023 21:49:35 +0000 (16:49 -0500)
The legacy region at 0x7F000 maps to valid registers in GC 9.4.3 SOCs.
Use 0x1A000 offset instead as MMIO register remap region.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/soc15.c

index e3d41e8aac9d9020e42cddc63ae7cf1472ffbb8c..9ad4d6d3122b37aa4e2a4b77be49c92f679ffadc 100644 (file)
@@ -1162,6 +1162,11 @@ static int soc15_common_early_init(void *handle)
                        AMD_PG_SUPPORT_VCN_DPG |
                        AMD_PG_SUPPORT_JPEG;
                adev->external_rev_id = adev->rev_id + 0x46;
+               /* GC 9.4.3 uses MMIO register region hole at a different offset */
+               if (!amdgpu_sriov_vf(adev)) {
+                       adev->rmmio_remap.reg_offset = 0x1A000;
+                       adev->rmmio_remap.bus_addr = adev->rmmio_base + 0x1A000;
+               }
                break;
        default:
                /* FIXME: not supported yet */