sysclk: display max clock rework
This commit is contained in:
@@ -54,7 +54,7 @@ typedef enum {
|
|||||||
HorizonOCConfigValue_BatteryChargeCurrent,
|
HorizonOCConfigValue_BatteryChargeCurrent,
|
||||||
|
|
||||||
HorizonOCConfigValue_OverwriteRefreshRate,
|
HorizonOCConfigValue_OverwriteRefreshRate,
|
||||||
HorizonOCConfigValue_EnableUnsafeDisplayFreqs,
|
HorizonOCConfigValue_MaxDisplayClockH,
|
||||||
|
|
||||||
HorizonOCConfigValue_DVFSMode,
|
HorizonOCConfigValue_DVFSMode,
|
||||||
HorizonOCConfigValue_DVFSOffset,
|
HorizonOCConfigValue_DVFSOffset,
|
||||||
@@ -227,8 +227,8 @@ static inline const char* sysclkFormatConfigValue(SysClkConfigValue val, bool pr
|
|||||||
case HorizonOCConfigValue_OverwriteRefreshRate:
|
case HorizonOCConfigValue_OverwriteRefreshRate:
|
||||||
return pretty ? "Display Refresh Rate Changing" : "drr_changing";
|
return pretty ? "Display Refresh Rate Changing" : "drr_changing";
|
||||||
|
|
||||||
case HorizonOCConfigValue_EnableUnsafeDisplayFreqs:
|
case HorizonOCConfigValue_MaxDisplayClockH:
|
||||||
return pretty ? "Enable Unsafe Display Frequencies" : "drr_unsafe";
|
return pretty ? "Max Display Clock (Handheld)" : "drr_max_clock";
|
||||||
|
|
||||||
case HorizonOCConfigValue_DVFSMode:
|
case HorizonOCConfigValue_DVFSMode:
|
||||||
return pretty ? "DVFS Mode" : "dvfs_mode";
|
return pretty ? "DVFS Mode" : "dvfs_mode";
|
||||||
@@ -428,7 +428,6 @@ static inline uint64_t sysclkDefaultConfigValue(SysClkConfigValue val)
|
|||||||
case HocClkConfigValue_OverwriteBoostMode:
|
case HocClkConfigValue_OverwriteBoostMode:
|
||||||
case HorizonOCConfigValue_BatteryChargeCurrent:
|
case HorizonOCConfigValue_BatteryChargeCurrent:
|
||||||
case HorizonOCConfigValue_OverwriteRefreshRate:
|
case HorizonOCConfigValue_OverwriteRefreshRate:
|
||||||
case HorizonOCConfigValue_EnableUnsafeDisplayFreqs:
|
|
||||||
case HorizonOCConfigValue_GPUScheduling:
|
case HorizonOCConfigValue_GPUScheduling:
|
||||||
case HorizonOCConfigValue_LiveCpuUv:
|
case HorizonOCConfigValue_LiveCpuUv:
|
||||||
case HorizonOCConfigValue_GPUSchedulingMethod:
|
case HorizonOCConfigValue_GPUSchedulingMethod:
|
||||||
@@ -451,7 +450,9 @@ static inline uint64_t sysclkDefaultConfigValue(SysClkConfigValue val)
|
|||||||
case HocClkConfigValue_LiteTDPLimit:
|
case HocClkConfigValue_LiteTDPLimit:
|
||||||
return 6400ULL; // 0.5C
|
return 6400ULL; // 0.5C
|
||||||
case HorizonOCConfigValue_CpuGovernorMinimumFreq:
|
case HorizonOCConfigValue_CpuGovernorMinimumFreq:
|
||||||
return 612ULL; // 612MHz
|
return 612000000ULL; // 612MHz
|
||||||
|
case HorizonOCConfigValue_MaxDisplayClockH:
|
||||||
|
return 60ULL;
|
||||||
default:
|
default:
|
||||||
return 0ULL;
|
return 0ULL;
|
||||||
}
|
}
|
||||||
@@ -467,6 +468,7 @@ static inline uint64_t sysclkValidConfigValue(SysClkConfigValue val, uint64_t in
|
|||||||
case HocClkConfigValue_HandheldTDPLimit:
|
case HocClkConfigValue_HandheldTDPLimit:
|
||||||
case HocClkConfigValue_LiteTDPLimit:
|
case HocClkConfigValue_LiteTDPLimit:
|
||||||
case SysClkConfigValue_PollingIntervalMs:
|
case SysClkConfigValue_PollingIntervalMs:
|
||||||
|
case HorizonOCConfigValue_MaxDisplayClockH:
|
||||||
return input > 0;
|
return input > 0;
|
||||||
|
|
||||||
case SysClkConfigValue_TempLogIntervalMs:
|
case SysClkConfigValue_TempLogIntervalMs:
|
||||||
@@ -478,7 +480,6 @@ static inline uint64_t sysclkValidConfigValue(SysClkConfigValue val, uint64_t in
|
|||||||
case HocClkConfigValue_ThermalThrottle:
|
case HocClkConfigValue_ThermalThrottle:
|
||||||
case HocClkConfigValue_HandheldTDP:
|
case HocClkConfigValue_HandheldTDP:
|
||||||
case HorizonOCConfigValue_OverwriteRefreshRate:
|
case HorizonOCConfigValue_OverwriteRefreshRate:
|
||||||
case HorizonOCConfigValue_EnableUnsafeDisplayFreqs:
|
|
||||||
case HocClkConfigValue_IsFirstLoad:
|
case HocClkConfigValue_IsFirstLoad:
|
||||||
case HorizonOCConfigValue_EnableExperimentalSettings:
|
case HorizonOCConfigValue_EnableExperimentalSettings:
|
||||||
case HorizonOCConfigValue_LiveCpuUv:
|
case HorizonOCConfigValue_LiveCpuUv:
|
||||||
|
|||||||
@@ -533,11 +533,7 @@ void ClockManager::VRRThread(void* arg) {
|
|||||||
if(targetHz) {
|
if(targetHz) {
|
||||||
maxDisplay = targetHz;
|
maxDisplay = targetHz;
|
||||||
} else {
|
} else {
|
||||||
if(Board::GetConsoleType() == HorizonOCConsoleType_Aula) {
|
maxDisplay = 60;
|
||||||
maxDisplay = mgr->config->GetConfigValue(HorizonOCConfigValue_EnableUnsafeDisplayFreqs) ? 65 : 60;
|
|
||||||
} else {
|
|
||||||
maxDisplay = mgr->config->GetConfigValue(HorizonOCConfigValue_EnableUnsafeDisplayFreqs) ? 72 : 60;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 minDisplay = Board::GetConsoleType() == HorizonOCConsoleType_Aula ? 45 : 40;
|
u8 minDisplay = Board::GetConsoleType() == HorizonOCConsoleType_Aula ? 45 : 40;
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ typedef enum {
|
|||||||
HorizonOCConfigValue_BatteryChargeCurrent,
|
HorizonOCConfigValue_BatteryChargeCurrent,
|
||||||
|
|
||||||
HorizonOCConfigValue_OverwriteRefreshRate,
|
HorizonOCConfigValue_OverwriteRefreshRate,
|
||||||
HorizonOCConfigValue_EnableUnsafeDisplayFreqs,
|
HorizonOCConfigValue_MaxDisplayClockH,
|
||||||
|
|
||||||
HorizonOCConfigValue_DVFSMode,
|
HorizonOCConfigValue_DVFSMode,
|
||||||
HorizonOCConfigValue_DVFSOffset,
|
HorizonOCConfigValue_DVFSOffset,
|
||||||
@@ -227,8 +227,8 @@ static inline const char* sysclkFormatConfigValue(SysClkConfigValue val, bool pr
|
|||||||
case HorizonOCConfigValue_OverwriteRefreshRate:
|
case HorizonOCConfigValue_OverwriteRefreshRate:
|
||||||
return pretty ? "Display Refresh Rate Changing" : "drr_changing";
|
return pretty ? "Display Refresh Rate Changing" : "drr_changing";
|
||||||
|
|
||||||
case HorizonOCConfigValue_EnableUnsafeDisplayFreqs:
|
case HorizonOCConfigValue_MaxDisplayClockH:
|
||||||
return pretty ? "Enable Unsafe Display Frequencies" : "drr_unsafe";
|
return pretty ? "Max Display Clock (Handheld)" : "drr_max_clock";
|
||||||
|
|
||||||
case HorizonOCConfigValue_DVFSMode:
|
case HorizonOCConfigValue_DVFSMode:
|
||||||
return pretty ? "DVFS Mode" : "dvfs_mode";
|
return pretty ? "DVFS Mode" : "dvfs_mode";
|
||||||
@@ -428,7 +428,6 @@ static inline uint64_t sysclkDefaultConfigValue(SysClkConfigValue val)
|
|||||||
case HocClkConfigValue_OverwriteBoostMode:
|
case HocClkConfigValue_OverwriteBoostMode:
|
||||||
case HorizonOCConfigValue_BatteryChargeCurrent:
|
case HorizonOCConfigValue_BatteryChargeCurrent:
|
||||||
case HorizonOCConfigValue_OverwriteRefreshRate:
|
case HorizonOCConfigValue_OverwriteRefreshRate:
|
||||||
case HorizonOCConfigValue_EnableUnsafeDisplayFreqs:
|
|
||||||
case HorizonOCConfigValue_GPUScheduling:
|
case HorizonOCConfigValue_GPUScheduling:
|
||||||
case HorizonOCConfigValue_LiveCpuUv:
|
case HorizonOCConfigValue_LiveCpuUv:
|
||||||
case HorizonOCConfigValue_GPUSchedulingMethod:
|
case HorizonOCConfigValue_GPUSchedulingMethod:
|
||||||
@@ -452,6 +451,8 @@ static inline uint64_t sysclkDefaultConfigValue(SysClkConfigValue val)
|
|||||||
return 6400ULL; // 0.5C
|
return 6400ULL; // 0.5C
|
||||||
case HorizonOCConfigValue_CpuGovernorMinimumFreq:
|
case HorizonOCConfigValue_CpuGovernorMinimumFreq:
|
||||||
return 612000000ULL; // 612MHz
|
return 612000000ULL; // 612MHz
|
||||||
|
case HorizonOCConfigValue_MaxDisplayClockH:
|
||||||
|
return 60ULL;
|
||||||
default:
|
default:
|
||||||
return 0ULL;
|
return 0ULL;
|
||||||
}
|
}
|
||||||
@@ -467,6 +468,7 @@ static inline uint64_t sysclkValidConfigValue(SysClkConfigValue val, uint64_t in
|
|||||||
case HocClkConfigValue_HandheldTDPLimit:
|
case HocClkConfigValue_HandheldTDPLimit:
|
||||||
case HocClkConfigValue_LiteTDPLimit:
|
case HocClkConfigValue_LiteTDPLimit:
|
||||||
case SysClkConfigValue_PollingIntervalMs:
|
case SysClkConfigValue_PollingIntervalMs:
|
||||||
|
case HorizonOCConfigValue_MaxDisplayClockH:
|
||||||
return input > 0;
|
return input > 0;
|
||||||
|
|
||||||
case SysClkConfigValue_TempLogIntervalMs:
|
case SysClkConfigValue_TempLogIntervalMs:
|
||||||
@@ -478,7 +480,6 @@ static inline uint64_t sysclkValidConfigValue(SysClkConfigValue val, uint64_t in
|
|||||||
case HocClkConfigValue_ThermalThrottle:
|
case HocClkConfigValue_ThermalThrottle:
|
||||||
case HocClkConfigValue_HandheldTDP:
|
case HocClkConfigValue_HandheldTDP:
|
||||||
case HorizonOCConfigValue_OverwriteRefreshRate:
|
case HorizonOCConfigValue_OverwriteRefreshRate:
|
||||||
case HorizonOCConfigValue_EnableUnsafeDisplayFreqs:
|
|
||||||
case HocClkConfigValue_IsFirstLoad:
|
case HocClkConfigValue_IsFirstLoad:
|
||||||
case HorizonOCConfigValue_EnableExperimentalSettings:
|
case HorizonOCConfigValue_EnableExperimentalSettings:
|
||||||
case HorizonOCConfigValue_LiveCpuUv:
|
case HorizonOCConfigValue_LiveCpuUv:
|
||||||
|
|||||||
@@ -350,9 +350,11 @@ void AppProfileGui::addProfileUI(SysClkProfile profile)
|
|||||||
this->addModuleListItem(profile, SysClkModule_MEM);
|
this->addModuleListItem(profile, SysClkModule_MEM);
|
||||||
#if IS_MINIMAL == 0
|
#if IS_MINIMAL == 0
|
||||||
ValueThresholds lcdThresholds(60, 65);
|
ValueThresholds lcdThresholds(60, 65);
|
||||||
|
ValueThresholds DThresholdsOLED(120, 500); // nothing is dangerous, past 120hz you can get applet crashes
|
||||||
|
|
||||||
if(configList.values[HorizonOCConfigValue_OverwriteRefreshRate]) {
|
if(configList.values[HorizonOCConfigValue_OverwriteRefreshRate]) {
|
||||||
if(profile != SysClkProfile_Docked) {
|
if(profile != SysClkProfile_Docked) {
|
||||||
this->addModuleListItemValue(profile, HorizonOCModule_Display, "Display", IsAula() ? 45 : 40, configList.values[HorizonOCConfigValue_EnableUnsafeDisplayFreqs] ? IsAula() ? 65 : 75 : 60, 1, " Hz", 1, 0, lcdThresholds);
|
this->addModuleListItemValue(profile, HorizonOCModule_Display, "Display", IsAula() ? 45 : 40, configList.values[HorizonOCConfigValue_MaxDisplayClockH], 1, " Hz", 1, 0, lcdThresholds);
|
||||||
} else {
|
} else {
|
||||||
if(IsAula() && this->context->isSysDockInstalled) {
|
if(IsAula() && this->context->isSysDockInstalled) {
|
||||||
std::vector<NamedValue> dockedFreqs = {
|
std::vector<NamedValue> dockedFreqs = {
|
||||||
@@ -386,7 +388,7 @@ void AppProfileGui::addProfileUI(SysClkProfile profile)
|
|||||||
NamedValue("240 Hz", 240)
|
NamedValue("240 Hz", 240)
|
||||||
};
|
};
|
||||||
|
|
||||||
this->addModuleListItemValue(profile, HorizonOCModule_Display, "Display", 40, 240, 1, " Hz", 1, 0, ValueThresholds(), dockedFreqs);
|
this->addModuleListItemValue(profile, HorizonOCModule_Display, "Display", 40, 240, 1, " Hz", 1, 0, DThresholdsOLED, dockedFreqs);
|
||||||
} else if (IsAula() && !this->context->isSysDockInstalled) {
|
} else if (IsAula() && !this->context->isSysDockInstalled) {
|
||||||
std::vector<NamedValue> dockedFreqsLimited = {
|
std::vector<NamedValue> dockedFreqsLimited = {
|
||||||
NamedValue("50 Hz", 50),
|
NamedValue("50 Hz", 50),
|
||||||
@@ -398,7 +400,7 @@ void AppProfileGui::addProfileUI(SysClkProfile profile)
|
|||||||
NamedValue("75 Hz", 75)
|
NamedValue("75 Hz", 75)
|
||||||
};
|
};
|
||||||
|
|
||||||
this->addModuleListItemValue(profile, HorizonOCModule_Display, "Display", 50, 75, 1, " Hz", 1, 0, ValueThresholds(), dockedFreqsLimited);
|
this->addModuleListItemValue(profile, HorizonOCModule_Display, "Display", 50, 75, 1, " Hz", 1, 0, DThresholdsOLED, dockedFreqsLimited);
|
||||||
} else {
|
} else {
|
||||||
std::vector<NamedValue> dockedFreqsStandard = {
|
std::vector<NamedValue> dockedFreqsStandard = {
|
||||||
NamedValue("50 Hz", 50),
|
NamedValue("50 Hz", 50),
|
||||||
|
|||||||
@@ -360,7 +360,7 @@ void GlobalOverrideGui::listUI()
|
|||||||
#if IS_MINIMAL == 0
|
#if IS_MINIMAL == 0
|
||||||
ValueThresholds lcdThresholds(60, 65);
|
ValueThresholds lcdThresholds(60, 65);
|
||||||
if(configList.values[HorizonOCConfigValue_OverwriteRefreshRate])
|
if(configList.values[HorizonOCConfigValue_OverwriteRefreshRate])
|
||||||
this->addModuleListItemValue(HorizonOCModule_Display, "Display", IsAula() ? 45 : 40, configList.values[HorizonOCConfigValue_EnableUnsafeDisplayFreqs] ? IsAula() ? 65 : 75 : 60, 1, " Hz", 1, 0, lcdThresholds);
|
this->addModuleListItemValue(HorizonOCModule_Display, "Display", IsAula() ? 45 : 40, configList.values[HorizonOCConfigValue_MaxDisplayClockH], 1, " Hz", 1, 0, lcdThresholds);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
this->addGovernorSection();
|
this->addGovernorSection();
|
||||||
|
|||||||
@@ -635,9 +635,17 @@ protected:
|
|||||||
renderer->drawString("or damage to your display! ", false, x + 20, y + 70, 18, tsl::style::color::ColorText);
|
renderer->drawString("or damage to your display! ", false, x + 20, y + 70, 18, tsl::style::color::ColorText);
|
||||||
renderer->drawString("Proceed at your own risk!", false, x + 20, y + 90, 18, tsl::style::color::ColorText);
|
renderer->drawString("Proceed at your own risk!", false, x + 20, y + 90, 18, tsl::style::color::ColorText);
|
||||||
});
|
});
|
||||||
|
|
||||||
warningText->setBoundaries(0, 0, tsl::cfg::FramebufferWidth, 110);
|
warningText->setBoundaries(0, 0, tsl::cfg::FramebufferWidth, 110);
|
||||||
this->listElement->addItem(warningText);
|
this->listElement->addItem(warningText);
|
||||||
addConfigToggle(HorizonOCConfigValue_EnableUnsafeDisplayFreqs, nullptr);
|
ValueThresholds displayThresholds(60, 65);
|
||||||
|
addConfigButton(
|
||||||
|
HorizonOCConfigValue_MaxDisplayClockH,
|
||||||
|
"Max Handheld Display",
|
||||||
|
ValueRange(60, IsAula() ? 65 : 75, 1, " Hz", 1),
|
||||||
|
"Display Clock",
|
||||||
|
&displayThresholds
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user