hocclk: remove handheld TDP
This commit is contained in:
@@ -480,4 +480,8 @@ namespace config {
|
||||
return true;
|
||||
}
|
||||
|
||||
void DeleteKey(const char* section, const char* key) {
|
||||
std::scoped_lock lock{gConfigMutex};
|
||||
ini_puts(section, key, NULL, gPath.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,8 @@ namespace config {
|
||||
bool SetConfigValues(HocClkConfigValueList* configValues, bool immediate);
|
||||
bool ResetConfigValue(HocClkConfigValue kval);
|
||||
bool SetConfigValue(HocClkConfigValue kval, std::uint64_t value, bool immediate = true);
|
||||
|
||||
void DeleteKey(const char* section, const char* key);
|
||||
|
||||
extern uint64_t configValues[HocClkConfigValue_EnumMax];
|
||||
|
||||
}
|
||||
|
||||
@@ -311,11 +311,17 @@ namespace kip {
|
||||
config::GetConfigValues(&configValues);
|
||||
u32 previousVersion = configValues.values[KipConfigValue_KipVersion];
|
||||
if(previousVersion < 240 && version >= 240) {
|
||||
// <2.4.0 -> 2.4.0 migration: add marikoGpuBootVolt with default value of 800mV
|
||||
// <2.4.0 -> 2.4.0 migration
|
||||
|
||||
// add marikoGpuBootVolt with default value of 800mV
|
||||
configValues.values[KipConfigValue_marikoGpuBootVolt] = 800;
|
||||
|
||||
// delete handheld TDP config entries
|
||||
config::DeleteKey(CONFIG_VAL_SECTION, "handheld_tdp");
|
||||
config::DeleteKey(CONFIG_VAL_SECTION, "tdp_limit");
|
||||
config::DeleteKey(CONFIG_VAL_SECTION, "tdp_limit_l");
|
||||
}
|
||||
config::SetConfigValues(&configValues, true);
|
||||
// This function cannot do anything at the moment. The capabilities will be expanded in the next release
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -293,20 +293,6 @@ namespace clockManager {
|
||||
|
||||
bool HandleSafetyFeatures()
|
||||
{
|
||||
if (config::GetConfigValue(HocClkConfigValue_HandheldTDP) && (gContext.profile != HocClkProfile_Docked)) {
|
||||
if (board::GetConsoleType() == HocClkConsoleType_Hoag) {
|
||||
if (board::GetPowerMw(HocClkPowerSensor_Avg) < -(int)config::GetConfigValue(HocClkConfigValue_LiteTDPLimit)) {
|
||||
ResetToStockClocks();
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if (board::GetPowerMw(HocClkPowerSensor_Avg) < -(int)config::GetConfigValue(HocClkConfigValue_HandheldTDPLimit)) {
|
||||
ResetToStockClocks();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (((tmp451TempSoc() / 1000) > (int)config::GetConfigValue(HocClkConfigValue_ThermalThrottleThreshold)) && config::GetConfigValue(HocClkConfigValue_ThermalThrottle)) {
|
||||
ResetToStockClocks();
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user