prevent switch from combusting into 4 billion volts :D

This commit is contained in:
Lightos1
2026-04-19 15:47:46 +02:00
parent 3c7a42b033
commit 78112547b6

View File

@@ -230,7 +230,11 @@ namespace clockManager {
void DVFSBeforeSet(u32 targetHz) void DVFSBeforeSet(u32 targetHz)
{ {
s32 dvfsOffset = config::GetConfigValue(HocClkConfigValue_DVFSOffset); s32 dvfsOffset = config::GetConfigValue(HocClkConfigValue_DVFSOffset);
u32 vmin = board::GetMinimumGpuVmin(targetHz / 1000000, board::GetGpuSpeedoBracket()) + dvfsOffset; u32 vmin = board::GetMinimumGpuVmin(targetHz / 1000000, board::GetGpuSpeedoBracket());
if (vmin) {
vmin += dvfsOffset;
}
board::PcvHijackGpuVolts(vmin); board::PcvHijackGpuVolts(vmin);
@@ -618,7 +622,6 @@ namespace clockManager {
void Tick() void Tick()
{ {
fileUtils::LogLine("CPU Temp: %d", board::GetTemperatureMilli(HocClkThermalSensor_CPU));
std::scoped_lock lock{gContextMutex}; std::scoped_lock lock{gContextMutex};
std::uint32_t mode = 0; std::uint32_t mode = 0;
Result rc = apmExtGetCurrentPerformanceConfiguration(&mode); Result rc = apmExtGetCurrentPerformanceConfiguration(&mode);