sysclk: fix governor

This commit is contained in:
souldbminersmwc
2025-12-21 12:59:04 -05:00
parent 12947d3dc4
commit 86416cb055

View File

@@ -333,7 +333,7 @@ void ClockManager::GovernorThread(void* arg)
if (targetHz) if (targetHz)
{ {
u32 targetIndex = index; u32 targetIndex = table.count - 1;
for (u32 i = 0; i < table.count; i++) for (u32 i = 0; i < table.count; i++)
{ {
if (table.list[i] >= targetHz) if (table.list[i] >= targetHz)
@@ -343,12 +343,13 @@ void ClockManager::GovernorThread(void* arg)
} }
} }
if (index > targetIndex && index > 0) if (index > targetIndex)
index--; {
else if (index < targetIndex && index + 1 < table.count) index = targetIndex;
index++; }
} }
u32 newHz = table.list[index]; u32 newHz = table.list[index];
if (mgr->IsAssignableHz(SysClkModule_GPU, newHz)) if (mgr->IsAssignableHz(SysClkModule_GPU, newHz))
{ {