提交 3abb2026 编写于 作者: R Rex Zhu 提交者: Alex Deucher

drm/amd/pp: Disable OD feature if VBIOS limits

Check vbios to determine whether we can enable OD
Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: NRex Zhu <Rex.Zhu@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 e3933f26
......@@ -836,10 +836,10 @@ 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) {
phm_cap_set(hwmgr->platform_descriptor.platformCaps,
PHM_PlatformCaps_ACOverdriveSupport);
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,11 @@ 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
&& !phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
PHM_PlatformCaps_OverdriveDisabledByPowerBudget))
phm_cap_set(hwmgr->platform_descriptor.platformCaps,
PHM_PlatformCaps_ACOverdriveSupport);
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;
}
......
......@@ -267,10 +267,10 @@ 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) {
phm_cap_set(hwmgr->platform_descriptor.platformCaps,
PHM_PlatformCaps_ACOverdriveSupport);
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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册