Enable npm metrics data for smu_v13_0_12

v3: Add node id check for setting NPM_CAPS (Lijo)

Signed-off-by: Asad Kamal <[email protected]>
---
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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 f749acc7d48e..03b6a9969174 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
@@ -356,8 +356,11 @@ static void smu_v13_0_12_init_caps(struct smu_context *smu)
        if (fw_ver >= 0x04560700) {
                if (!amdgpu_sriov_vf(smu->adev))
                        smu_v13_0_6_cap_set(smu, SMU_CAP(TEMP_METRICS));
-               else if (fw_ver >= 0x04560900)
+               if (fw_ver >= 0x04560900) {
                        smu_v13_0_6_cap_set(smu, SMU_CAP(TEMP_METRICS));
+                       if (smu->adev->gmc.xgmi.physical_node_id == 0)
+                               smu_v13_0_6_cap_set(smu, SMU_CAP(NPM_METRICS));
+               }
        } else {
                smu_v13_0_12_tables_fini(smu);
        }
-- 
2.46.0

Reply via email to