[AMD Official Use Only - AMD Internal Distribution Only]

Series is

Reviewed-by: Hawking Zhang <[email protected]>

Regards,
Hawking
-----Original Message-----
From: Kamal, Asad <[email protected]>
Sent: Tuesday, May 13, 2025 19:22
To: [email protected]; Lazar, Lijo <[email protected]>
Cc: Zhang, Hawking <[email protected]>; Ma, Le <[email protected]>; Zhang, 
Morris <[email protected]>; Kamal, Asad <[email protected]>; Deucher, 
Alexander <[email protected]>
Subject: [PATCH 3/3] drm/amd/pm: Fill pldm version for SMU v13.0.6 SOCs

Fetch pldm version from static metrics table for SMU v13.0.6 SOCs

Signed-off-by: Asad Kamal <[email protected]>
Signed-off-by: Lijo Lazar <[email protected]>
---
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 7 +++++++  
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.h | 1 +
 2 files changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c 
b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
index 7d4ff09be7e8..cd9ed3b5e9fa 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
@@ -396,6 +396,8 @@ static void smu_v13_0_6_init_caps(struct smu_context *smu)
                        smu_v13_0_6_cap_set(smu, SMU_CAP(STATIC_METRICS));
                        smu_v13_0_6_cap_set(smu, SMU_CAP(BOARD_VOLTAGE));
                }
+               if (fw_ver >= 0x00558000)
+                       smu_v13_0_6_cap_set(smu, SMU_CAP(PLDM_VERSION));
        }
        if (((pgm == 7) && (fw_ver >= 0x7550700)) ||
            ((pgm == 0) && (fw_ver >= 0x00557900)) || @@ -752,6 +754,11 @@ 
static void smu_v13_0_6_fill_static_metrics_table(struct smu_context *smu,
        }

        dpm_context->board_volt = static_metrics->InputTelemetryVoltageInmV;
+
+       if (smu_v13_0_6_cap_supported(smu, SMU_CAP(PLDM_VERSION)) &&
+           static_metrics->pldmVersion[0] != 0xFFFFFFFF)
+               smu->adev->firmware.pldm_version =
+                       static_metrics->pldmVersion[0];
 }

 int smu_v13_0_6_get_static_metrics_table(struct smu_context *smu) diff --git 
a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.h 
b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.h
index 5313206ae4bb..6e7293d3f264 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.h
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.h
@@ -67,6 +67,7 @@ enum smu_v13_0_6_caps {
        SMU_CAP(STATIC_METRICS),
        SMU_CAP(HST_LIMIT_METRICS),
        SMU_CAP(BOARD_VOLTAGE),
+       SMU_CAP(PLDM_VERSION),
        SMU_CAP(ALL),
 };

--
2.46.0

Reply via email to