File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
drivers/gpu/drm/amd/pm/swsmu/smu12 Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1171,6 +1171,7 @@ static int renoir_get_smu_metrics_data(struct smu_context *smu,
1171
1171
int ret = 0 ;
1172
1172
uint32_t apu_percent = 0 ;
1173
1173
uint32_t dgpu_percent = 0 ;
1174
+ struct amdgpu_device * adev = smu -> adev ;
1174
1175
1175
1176
1176
1177
ret = smu_cmn_get_metrics_table (smu ,
@@ -1196,7 +1197,11 @@ static int renoir_get_smu_metrics_data(struct smu_context *smu,
1196
1197
* value = metrics -> AverageUvdActivity / 100 ;
1197
1198
break ;
1198
1199
case METRICS_AVERAGE_SOCKETPOWER :
1199
- * value = (metrics -> CurrentSocketPower << 8 ) / 1000 ;
1200
+ if (((adev -> ip_versions [MP1_HWIP ][0 ] == IP_VERSION (12 , 0 , 1 )) && (adev -> pm .fw_version >= 0x40000f )) ||
1201
+ ((adev -> ip_versions [MP1_HWIP ][0 ] == IP_VERSION (12 , 0 , 0 )) && (adev -> pm .fw_version >= 0x373200 )))
1202
+ * value = metrics -> CurrentSocketPower << 8 ;
1203
+ else
1204
+ * value = (metrics -> CurrentSocketPower << 8 ) / 1000 ;
1200
1205
break ;
1201
1206
case METRICS_TEMPERATURE_EDGE :
1202
1207
* value = (metrics -> GfxTemperature / 100 ) *
You can’t perform that action at this time.
0 commit comments