[PATCH] drm/amd/pm: Make static table support conditional

Wang, Yang(Kevin) KevinYang.Wang at amd.com
Mon Aug 4 05:18:26 UTC 2025


[AMD Official Use Only - AMD Internal Distribution Only]

Reviewed-by: Yang Wang <kevinyang.wang at amd.com>

Btw,
the hex version value is not easy to review and maintain, we'd better add a new helper macro to support version check further, .e.g: SMU_FW_VERSION(a, b, c,d)

Best Regards,
Kevin

-----Original Message-----
From: Lazar, Lijo <Lijo.Lazar at amd.com>
Sent: Monday, August 4, 2025 13:08
To: amd-gfx at lists.freedesktop.org
Cc: Zhang, Hawking <Hawking.Zhang at amd.com>; Deucher, Alexander <Alexander.Deucher at amd.com>; Kamal, Asad <Asad.Kamal at amd.com>; Wang, Yang(Kevin) <KevinYang.Wang at amd.com>
Subject: [PATCH] drm/amd/pm: Make static table support conditional

Add PMFW version check for static table support on SMU v13.0.6 VFs.

Signed-off-by: Lijo Lazar <lijo.lazar at amd.com>
---
 .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c  | 28 ++++++++++++++-----
 1 file changed, 21 insertions(+), 7 deletions(-)

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 ad014b50c300..21cef59dbcce 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
@@ -402,14 +402,28 @@ static void smu_v13_0_6_init_caps(struct smu_context *smu)
                if ((pgm == 7 && fw_ver >= 0x7550E00) ||
                    (pgm == 0 && fw_ver >= 0x00557E00))
                        smu_v13_0_6_cap_set(smu, SMU_CAP(HST_LIMIT_METRICS));
-               if ((pgm == 0 && fw_ver >= 0x00557F01) ||
-                   (pgm == 7 && fw_ver >= 0x7551000)) {
-                       smu_v13_0_6_cap_set(smu, SMU_CAP(STATIC_METRICS));
-                       smu_v13_0_6_cap_set(smu, SMU_CAP(BOARD_VOLTAGE));
+
+               if (amdgpu_sriov_vf(adev)) {
+                       if ((pgm == 0 && fw_ver >= 0x00558000) ||
+                           (pgm == 7 && fw_ver >= 0x7551000)) {
+                               smu_v13_0_6_cap_set(smu,
+                                                   SMU_CAP(STATIC_METRICS));
+                               smu_v13_0_6_cap_set(smu,
+                                                   SMU_CAP(BOARD_VOLTAGE));
+                               smu_v13_0_6_cap_set(smu, SMU_CAP(PLDM_VERSION));
+                       }
+               } else {
+                       if ((pgm == 0 && fw_ver >= 0x00557F01) ||
+                           (pgm == 7 && fw_ver >= 0x7551000)) {
+                               smu_v13_0_6_cap_set(smu,
+                                                   SMU_CAP(STATIC_METRICS));
+                               smu_v13_0_6_cap_set(smu,
+                                                   SMU_CAP(BOARD_VOLTAGE));
+                       }
+                       if ((pgm == 0 && fw_ver >= 0x00558000) ||
+                           (pgm == 7 && fw_ver >= 0x7551000))
+                               smu_v13_0_6_cap_set(smu, SMU_CAP(PLDM_VERSION));
                }
-               if ((pgm == 0 && fw_ver >= 0x00558000) ||
-                   (pgm == 7 && fw_ver >= 0x7551000))
-                       smu_v13_0_6_cap_set(smu, SMU_CAP(PLDM_VERSION));
        }
        if (((pgm == 7) && (fw_ver >= 0x7550700)) ||
            ((pgm == 0) && (fw_ver >= 0x00557900)) ||
--
2.49.0



More information about the amd-gfx mailing list