sys-clk: add config to use governor only on handheld profile #28

This commit is contained in:
hanabbi
2023-07-02 05:34:24 +09:00
parent caad5b5fe8
commit cedec93222
3 changed files with 10 additions and 0 deletions

View File

@@ -259,10 +259,14 @@ bool ClockManager::RefreshContext()
SysClkOcGovernorConfig governorConfig = SysClkOcGovernorConfig_AllDisabled;
if (this->GetConfig()->GetConfigValue(SysClkConfigValue_GovernorExperimental)) {
auto governorHandheldOnly = this->GetConfig()->GetConfigValue(SysClkConfigValue_GovernorHandheldOnly);
governorConfig = SysClkOcGovernorConfig_Default;
SysClkOcGovernorConfig governorConfigTitle = this->GetConfig()->GetTitleGovernorConfig(applicationId);
if (governorConfig != governorConfigTitle)
governorConfig = governorConfigTitle;
// Set governor config to disabled if Handheld Only is true
if (governorHandheldOnly && (realProfile != SysClkProfile_Handheld))
governorConfig = SysClkOcGovernorConfig_AllDisabled;
}
this->governor->SetConfig(governorConfig);