]> git.dujemihanovic.xyz Git - linux.git/commitdiff
drm/amd/pm: Add support for new P2S table revision
authorLijo Lazar <lijo.lazar@amd.com>
Fri, 16 Aug 2024 09:04:17 +0000 (14:34 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 23 Aug 2024 14:55:03 +0000 (10:55 -0400)
Add p2s table support for a new revision of SMUv13.0.6.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Asad Kamal <asad.kamal@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c

index 78c3f94bb3ff60f48234121f89d1b7431a3d0407..9974c9f8135e99977a95d5d0128455be3991533b 100644 (file)
@@ -121,6 +121,7 @@ struct mca_ras_info {
 
 #define P2S_TABLE_ID_A 0x50325341
 #define P2S_TABLE_ID_X 0x50325358
+#define P2S_TABLE_ID_3 0x50325303
 
 // clang-format off
 static const struct cmn2asic_msg_mapping smu_v13_0_6_message_map[SMU_MSG_MAX_COUNT] = {
@@ -271,14 +272,18 @@ static int smu_v13_0_6_init_microcode(struct smu_context *smu)
        struct amdgpu_device *adev = smu->adev;
        uint32_t p2s_table_id = P2S_TABLE_ID_A;
        int ret = 0, i, p2stable_count;
+       int var = (adev->pdev->device & 0xF);
        char ucode_prefix[15];
 
        /* No need to load P2S tables in IOV mode */
        if (amdgpu_sriov_vf(adev))
                return 0;
 
-       if (!(adev->flags & AMD_IS_APU))
+       if (!(adev->flags & AMD_IS_APU)) {
                p2s_table_id = P2S_TABLE_ID_X;
+               if (var == 0x5)
+                       p2s_table_id = P2S_TABLE_ID_3;
+       }
 
        amdgpu_ucode_ip_version_decode(adev, MP1_HWIP, ucode_prefix,
                                       sizeof(ucode_prefix));