From 86416cb05586331dca085ad520f38d55ce4c2d50 Mon Sep 17 00:00:00 2001 From: souldbminersmwc Date: Sun, 21 Dec 2025 12:59:04 -0500 Subject: [PATCH] sysclk: fix governor --- Source/sys-clk/sysmodule/src/clock_manager.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Source/sys-clk/sysmodule/src/clock_manager.cpp b/Source/sys-clk/sysmodule/src/clock_manager.cpp index c018fee0..720c2ee5 100644 --- a/Source/sys-clk/sysmodule/src/clock_manager.cpp +++ b/Source/sys-clk/sysmodule/src/clock_manager.cpp @@ -333,7 +333,7 @@ void ClockManager::GovernorThread(void* arg) if (targetHz) { - u32 targetIndex = index; + u32 targetIndex = table.count - 1; for (u32 i = 0; i < table.count; i++) { if (table.list[i] >= targetHz) @@ -343,12 +343,13 @@ void ClockManager::GovernorThread(void* arg) } } - if (index > targetIndex && index > 0) - index--; - else if (index < targetIndex && index + 1 < table.count) - index++; + if (index > targetIndex) + { + index = targetIndex; + } } + u32 newHz = table.list[index]; if (mgr->IsAssignableHz(SysClkModule_GPU, newHz)) {