sysclk: fix governor
This commit is contained in:
@@ -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))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user