sysclk: fix 1963mhz bug

This commit is contained in:
souldbminersmwc
2026-02-06 19:42:58 -05:00
parent 19a2e562bc
commit b623dabce5

View File

@@ -114,6 +114,7 @@ ClockManager::ClockManager()
void ClockManager::FixCpuBug() {
if(this->config->Refresh() && this->RefreshContext()) {
u32 targetHz = 0;
u32 maxHz = 0;
u32 nearestHz = 0;
@@ -139,13 +140,14 @@ void ClockManager::FixCpuBug() {
}
Board::SetHz(SysClkModule_CPU, targetHz);
}
}
}
ClockManager::~ClockManager()
{
threadClose(&governorTHREAD);
delete this->config;
delete this->context;
threadClose(&governorTHREAD);
}
SysClkContext ClockManager::GetCurrentContext()
@@ -323,7 +325,6 @@ void ClockManager::GovernorThread(void* arg)
continue;
}
std::scoped_lock lock{mgr->contextMutex};
if (!isGovernorEnabled)
{
@@ -338,6 +339,8 @@ void ClockManager::GovernorThread(void* arg)
continue;
}
std::scoped_lock lock{mgr->contextMutex};
u32 currentHz = Board::GetHz(SysClkModule_GPU);
u32 index = 0;