@@ -1283,11 +1283,8 @@ static int arcturus_get_power_limit(struct smu_context *smu,
1283
1283
uint32_t * max_power_limit ,
1284
1284
uint32_t * min_power_limit )
1285
1285
{
1286
- struct smu_11_0_powerplay_table * powerplay_table =
1287
- (struct smu_11_0_powerplay_table * )smu -> smu_table .power_play_table ;
1288
- struct smu_11_0_overdrive_table * od_settings = smu -> od_settings ;
1289
1286
PPTable_t * pptable = smu -> smu_table .driver_pptable ;
1290
- uint32_t power_limit , od_percent_upper = 0 , od_percent_lower = 0 ;
1287
+ uint32_t power_limit ;
1291
1288
1292
1289
if (smu_v11_0_get_current_power_limit (smu , & power_limit )) {
1293
1290
/* the last hope to figure out the ppt limit */
@@ -1303,30 +1300,10 @@ static int arcturus_get_power_limit(struct smu_context *smu,
1303
1300
* current_power_limit = power_limit ;
1304
1301
if (default_power_limit )
1305
1302
* default_power_limit = power_limit ;
1306
-
1307
- if (powerplay_table ) {
1308
- if (smu -> od_enabled &&
1309
- od_settings -> cap [SMU_11_0_ODCAP_POWER_LIMIT ]) {
1310
- od_percent_upper = le32_to_cpu (powerplay_table -> overdrive_table .max [SMU_11_0_ODSETTING_POWERPERCENTAGE ]);
1311
- od_percent_lower = le32_to_cpu (powerplay_table -> overdrive_table .min [SMU_11_0_ODSETTING_POWERPERCENTAGE ]);
1312
- } else if (od_settings -> cap [SMU_11_0_ODCAP_POWER_LIMIT ]) {
1313
- od_percent_upper = 0 ;
1314
- od_percent_lower = le32_to_cpu (powerplay_table -> overdrive_table .min [SMU_11_0_ODSETTING_POWERPERCENTAGE ]);
1315
- }
1316
- }
1317
-
1318
- dev_dbg (smu -> adev -> dev , "od percent upper:%d, od percent lower:%d (default power: %d)\n" ,
1319
- od_percent_upper , od_percent_lower , power_limit );
1320
-
1321
- if (max_power_limit ) {
1322
- * max_power_limit = power_limit * (100 + od_percent_upper );
1323
- * max_power_limit /= 100 ;
1324
- }
1325
-
1326
- if (min_power_limit ) {
1327
- * min_power_limit = power_limit * (100 - od_percent_lower );
1328
- * min_power_limit /= 100 ;
1329
- }
1303
+ if (max_power_limit )
1304
+ * max_power_limit = power_limit ;
1305
+ if (min_power_limit )
1306
+ * min_power_limit = power_limit ;
1330
1307
1331
1308
return 0 ;
1332
1309
}
0 commit comments