drm/amd/pm: Use a minimum version for NPM capability init
Subsystems (3)
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.
Signed-off-by Asad Kamal <[email protected]>
--- 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
@@ -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
@@ -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 0x2extern void smu_v15_0_8_set_ppt_funcs (struct smu_context *smu); typedef struct {
Signature · 1 line
2.46.0