[PATCH 3/3] drm/amd/pm: Fill pldm version for SMU v13.0.6 SOCs

Zhang, Hawking Hawking.Zhang at amd.com
Tue May 13 14:20:40 UTC 2025


[AMD Official Use Only - AMD Internal Distribution Only]

Series is

Reviewed-by: Hawking Zhang <Hawking.Zhang at amd.com>

Regards,
Hawking
-----Original Message-----
From: Kamal, Asad <Asad.Kamal at amd.com>
Sent: Tuesday, May 13, 2025 19:22
To: amd-gfx at lists.freedesktop.org; Lazar, Lijo <Lijo.Lazar at amd.com>
Cc: Zhang, Hawking <Hawking.Zhang at amd.com>; Ma, Le <Le.Ma at amd.com>; Zhang, Morris <Shiwu.Zhang at amd.com>; Kamal, Asad <Asad.Kamal at amd.com>; Deucher, Alexander <Alexander.Deucher at amd.com>
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 <asad.kamal at amd.com>
Signed-off-by: Lijo Lazar <lijo.lazar at amd.com>
---
 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



More information about the amd-gfx mailing list