mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-20 21:29:58 +07:00
drm/amd/pp: Disable OD feature if VBIOS limits
Check vbios to determine whether we can enable OD 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
e3933f26b6
commit
3abb20264d
@ -836,10 +836,10 @@ static int init_over_drive_limits(
|
|||||||
hwmgr->platform_descriptor.maxOverdriveVDDC = 0;
|
hwmgr->platform_descriptor.maxOverdriveVDDC = 0;
|
||||||
hwmgr->platform_descriptor.overdriveVDDCStep = 0;
|
hwmgr->platform_descriptor.overdriveVDDCStep = 0;
|
||||||
|
|
||||||
if (hwmgr->platform_descriptor.overdriveLimit.engineClock > 0 \
|
if (hwmgr->platform_descriptor.overdriveLimit.engineClock == 0 \
|
||||||
&& hwmgr->platform_descriptor.overdriveLimit.memoryClock > 0) {
|
|| hwmgr->platform_descriptor.overdriveLimit.memoryClock == 0) {
|
||||||
phm_cap_set(hwmgr->platform_descriptor.platformCaps,
|
hwmgr->od_enabled = false;
|
||||||
PHM_PlatformCaps_ACOverdriveSupport);
|
pr_debug("OverDrive feature not support by VBIOS\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1074,12 +1074,11 @@ static int init_overdrive_limits(struct pp_hwmgr *hwmgr,
|
|||||||
powerplay_table,
|
powerplay_table,
|
||||||
(const ATOM_FIRMWARE_INFO_V2_1 *)fw_info);
|
(const ATOM_FIRMWARE_INFO_V2_1 *)fw_info);
|
||||||
|
|
||||||
if (hwmgr->platform_descriptor.overdriveLimit.engineClock > 0
|
if (hwmgr->platform_descriptor.overdriveLimit.engineClock == 0
|
||||||
&& hwmgr->platform_descriptor.overdriveLimit.memoryClock > 0
|
&& hwmgr->platform_descriptor.overdriveLimit.memoryClock == 0) {
|
||||||
&& !phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
|
hwmgr->od_enabled = false;
|
||||||
PHM_PlatformCaps_OverdriveDisabledByPowerBudget))
|
pr_debug("OverDrive feature not support by VBIOS\n");
|
||||||
phm_cap_set(hwmgr->platform_descriptor.platformCaps,
|
}
|
||||||
PHM_PlatformCaps_ACOverdriveSupport);
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -267,10 +267,10 @@ static int init_over_drive_limits(
|
|||||||
hwmgr->platform_descriptor.maxOverdriveVDDC = 0;
|
hwmgr->platform_descriptor.maxOverdriveVDDC = 0;
|
||||||
hwmgr->platform_descriptor.overdriveVDDCStep = 0;
|
hwmgr->platform_descriptor.overdriveVDDCStep = 0;
|
||||||
|
|
||||||
if (hwmgr->platform_descriptor.overdriveLimit.engineClock > 0 &&
|
if (hwmgr->platform_descriptor.overdriveLimit.engineClock == 0 ||
|
||||||
hwmgr->platform_descriptor.overdriveLimit.memoryClock > 0) {
|
hwmgr->platform_descriptor.overdriveLimit.memoryClock == 0) {
|
||||||
phm_cap_set(hwmgr->platform_descriptor.platformCaps,
|
hwmgr->od_enabled = false;
|
||||||
PHM_PlatformCaps_ACOverdriveSupport);
|
pr_debug("OverDrive feature not support by VBIOS\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user