Skip to contentSkip to conversation

drm/amd/pm: Use a minimum version for NPM capability init

PATCH New Asad Kamal 1 participant 1 message Oct 23

Subsystems (3)
lore
Share & tools
lore

Asad Kamal

author
#0 lore raw

PATCH 1/1 drm/amd/pm: Use a minimum version for NPM capability init

Compare the system metrics table version with the first version that added NPM. SMU_SYSTEM_METRICS_TABLE_VERSION follows the latest header and would drop NPM support when that header moves forward.

---
 drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.c | 2 +-
 drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.c +1 -1
index f427efa23c4c..9663fe0d5e94 100644
@@ -622,7 +622,7 @@ static void smu_v15_0_8_init_npm_cap(struct smu_context *smu)
 	if (ret)
 		return;
 
-	if (table_version < SMU_SYSTEM_METRICS_TABLE_VERSION)
+	if (table_version < SMU_15_0_8_SYSTEM_METRICS_NPM_MIN_VERSION)
 		return;
 
 	ret = smu_v15_0_8_get_system_metrics_table(smu);
drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.h +1 -0
index dff601bc0f9a..106b847db494 100644
@@ -35,6 +35,7 @@
 #define SMU_15_0_8_CAP_NPM			1
 #define SMU_15_0_8_CAP_NODE_UNLOAD		2
 #define SMU_15_0_8_NODE_UNLOAD_MIN_FW_VERSION	0x027d0c00u /* 2.125.12.0 */
+#define SMU_15_0_8_SYSTEM_METRICS_NPM_MIN_VERSION	0x2
 extern void smu_v15_0_8_set_ppt_funcs(struct smu_context *smu);
 
 typedef struct {
Signature · 1 line
2.46.0