add warning when setting disabled freq

This commit is contained in:
Lightos1
2026-07-04 20:33:19 +02:00
parent 00d3e1cf82
commit 539d1949a8

View File

@@ -344,6 +344,13 @@ namespace clockManager {
}
void ApplyGpuFreqVoltRequest(u32 voltage, u32 hz) {
/* Apply nothing with disabled voltage. */
constexpr u32 DisabledVoltage = 2000;
if (voltage == DisabledVoltage) {
notification::writeNotification("Horizon OC\nDeactivated frequency.\nReboot to apply.");
return;
}
voltage = ClampGpuVoltage(voltage);
u32 currentFreq = GetCurrentNearestGpuFrequency();
/* If not freq was provided, use the current freq. */