mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 16:57:04 +07:00
drm/amd/pp: Allow underclocking when od table is empty in vbios
if max od engine clock limit and memory clock limit are not set in vbios. driver will allow underclocking instand of disable od feature completely. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
9dac0c3fb4
commit
46defdd6ff
@ -870,12 +870,6 @@ static int init_over_drive_limits(
|
||||
hwmgr->platform_descriptor.maxOverdriveVDDC = 0;
|
||||
hwmgr->platform_descriptor.overdriveVDDCStep = 0;
|
||||
|
||||
if (hwmgr->platform_descriptor.overdriveLimit.engineClock == 0 \
|
||||
|| hwmgr->platform_descriptor.overdriveLimit.memoryClock == 0) {
|
||||
hwmgr->od_enabled = false;
|
||||
pr_debug("OverDrive feature not support by VBIOS\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1074,12 +1074,6 @@ static int init_overdrive_limits(struct pp_hwmgr *hwmgr,
|
||||
powerplay_table,
|
||||
(const ATOM_FIRMWARE_INFO_V2_1 *)fw_info);
|
||||
|
||||
if (hwmgr->platform_descriptor.overdriveLimit.engineClock == 0
|
||||
&& hwmgr->platform_descriptor.overdriveLimit.memoryClock == 0) {
|
||||
hwmgr->od_enabled = false;
|
||||
pr_debug("OverDrive feature not support by VBIOS\n");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -791,7 +791,8 @@ static int smu7_setup_dpm_tables_v1(struct pp_hwmgr *hwmgr)
|
||||
data->dpm_table.sclk_table.count++;
|
||||
}
|
||||
}
|
||||
|
||||
if (hwmgr->platform_descriptor.overdriveLimit.engineClock == 0)
|
||||
hwmgr->platform_descriptor.overdriveLimit.engineClock = dep_sclk_table->entries[i-1].clk;
|
||||
/* Initialize Mclk DPM table based on allow Mclk values */
|
||||
data->dpm_table.mclk_table.count = 0;
|
||||
for (i = 0; i < dep_mclk_table->count; i++) {
|
||||
@ -806,6 +807,8 @@ static int smu7_setup_dpm_tables_v1(struct pp_hwmgr *hwmgr)
|
||||
}
|
||||
}
|
||||
|
||||
if (hwmgr->platform_descriptor.overdriveLimit.memoryClock == 0)
|
||||
hwmgr->platform_descriptor.overdriveLimit.memoryClock = dep_mclk_table->entries[i-1].clk;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1311,6 +1311,9 @@ static int vega10_setup_default_dpm_tables(struct pp_hwmgr *hwmgr)
|
||||
vega10_setup_default_single_dpm_table(hwmgr,
|
||||
dpm_table,
|
||||
dep_gfx_table);
|
||||
if (hwmgr->platform_descriptor.overdriveLimit.engineClock == 0)
|
||||
hwmgr->platform_descriptor.overdriveLimit.engineClock =
|
||||
dpm_table->dpm_levels[dpm_table->count-1].value;
|
||||
vega10_init_dpm_state(&(dpm_table->dpm_state));
|
||||
|
||||
/* Initialize Mclk DPM table based on allow Mclk values */
|
||||
@ -1319,6 +1322,9 @@ static int vega10_setup_default_dpm_tables(struct pp_hwmgr *hwmgr)
|
||||
vega10_setup_default_single_dpm_table(hwmgr,
|
||||
dpm_table,
|
||||
dep_mclk_table);
|
||||
if (hwmgr->platform_descriptor.overdriveLimit.memoryClock == 0)
|
||||
hwmgr->platform_descriptor.overdriveLimit.memoryClock =
|
||||
dpm_table->dpm_levels[dpm_table->count-1].value;
|
||||
vega10_init_dpm_state(&(dpm_table->dpm_state));
|
||||
|
||||
data->dpm_table.eclk_table.count = 0;
|
||||
|
@ -267,12 +267,6 @@ static int init_over_drive_limits(
|
||||
hwmgr->platform_descriptor.maxOverdriveVDDC = 0;
|
||||
hwmgr->platform_descriptor.overdriveVDDCStep = 0;
|
||||
|
||||
if (hwmgr->platform_descriptor.overdriveLimit.engineClock == 0 ||
|
||||
hwmgr->platform_descriptor.overdriveLimit.memoryClock == 0) {
|
||||
hwmgr->od_enabled = false;
|
||||
pr_debug("OverDrive feature not support by VBIOS\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user