For the 40.46 SMU release, they changed CurrSocketPower to
AverageSocketPower, but this was changed back in 40.47 so just check if
it's 40.46 and make the appropriate change
Tested with 40.45, 40.46 and 40.47 successfully
Signed-off-by: Kent Russell <kent.russell@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
if (ret)
return ret;
- if (hwmgr->smu_version < 0x282e00)
- *query = metrics_table.CurrSocketPower << 8;
- else
+ /* For the 40.46 release, they changed the value name */
+ if (hwmgr->smu_version == 0x282e00)
*query = metrics_table.AverageSocketPower << 8;
+ else
+ *query = metrics_table.CurrSocketPower << 8;
return ret;
}
if (ret)
return ret;
- if (smu_version < 0x282e00)
- *value = metrics.CurrSocketPower << 8;
- else
+ /* For the 40.46 release, they changed the value name */
+ if (smu_version == 0x282e00)
*value = metrics.AverageSocketPower << 8;
+ else
+ *value = metrics.CurrSocketPower << 8;
return 0;
}