Skip to content

Commit bc55c34

Browse files
Ma Junalexdeucher
Ma Jun
authored andcommitted
drm/amdgpu/pm: Don't use OD table on Arcturus
OD is not supported on Arcturus, so the OD table should not be used. Signed-off-by: Ma Jun <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent ad550db commit bc55c34

File tree

1 file changed

+5
-28
lines changed

1 file changed

+5
-28
lines changed

drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c

+5-28
Original file line numberDiff line numberDiff line change
@@ -1283,11 +1283,8 @@ static int arcturus_get_power_limit(struct smu_context *smu,
12831283
uint32_t *max_power_limit,
12841284
uint32_t *min_power_limit)
12851285
{
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;
12891286
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;
12911288

12921289
if (smu_v11_0_get_current_power_limit(smu, &power_limit)) {
12931290
/* the last hope to figure out the ppt limit */
@@ -1303,30 +1300,10 @@ static int arcturus_get_power_limit(struct smu_context *smu,
13031300
*current_power_limit = power_limit;
13041301
if (default_power_limit)
13051302
*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;
13301307

13311308
return 0;
13321309
}

0 commit comments

Comments
 (0)