hocclk: minor refactor

This commit is contained in:
souldbminersmwc
2026-04-21 19:52:31 -04:00
parent 5a9afcbb74
commit c8c7b233f5
4 changed files with 8 additions and 8 deletions

View File

@@ -73,6 +73,6 @@ typedef struct
#define HOCCLK_FREQ_LIST_MAX 32
#define GLOBAL_PROFILE_ID 0xA111111111111111
#define HOCCLK_GLOBAL_PROFILE_TID 0xA111111111111111
static_assert(sizeof(HocClkContext) == 0x500);

View File

@@ -28,7 +28,6 @@
#include "base_menu_gui.h"
#include "freq_choice_gui.h"
#include "value_choice_gui.h"
#define HOCCLK_GLOBAL_PROFILE_TID 0xA111111111111111
class AppProfileGui : public BaseMenuGui
{
protected:

View File

@@ -286,7 +286,7 @@ namespace clockManager {
if (!targetHz) {
targetHz = config::GetAutoClockHz(gContext.applicationId, HocClkModule_GPU, gContext.profile, false);
if (!targetHz) {
targetHz = config::GetAutoClockHz(GLOBAL_PROFILE_ID, HocClkModule_GPU, gContext.profile, false);
targetHz = config::GetAutoClockHz(HOCCLK_GLOBAL_PROFILE_TID, HocClkModule_GPU, gContext.profile, false);
}
}
u32 maxHz = GetMaxAllowedHz(HocClkModule_GPU, gContext.profile);
@@ -357,7 +357,7 @@ namespace clockManager {
if (!targetHz) {
targetHz = config::GetAutoClockHz(gContext.applicationId, (HocClkModule)module, gContext.profile, returnRaw);
if (!targetHz)
targetHz = config::GetAutoClockHz(GLOBAL_PROFILE_ID, (HocClkModule)module, gContext.profile, returnRaw);
targetHz = config::GetAutoClockHz(HOCCLK_GLOBAL_PROFILE_TID, (HocClkModule)module, gContext.profile, returnRaw);
}
if (module == HocClkModule_Governor) {
@@ -528,7 +528,7 @@ namespace clockManager {
if (!targetHz) {
targetHz = config::GetAutoClockHz(gContext.applicationId, HocClkModule_Display, gContext.profile, true);
if (!targetHz)
targetHz = config::GetAutoClockHz(GLOBAL_PROFILE_ID, HocClkModule_Display, gContext.profile, true);
targetHz = config::GetAutoClockHz(HOCCLK_GLOBAL_PROFILE_TID, HocClkModule_Display, gContext.profile, true);
}
if (board::GetConsoleType() != HocClkConsoleType_Hoag)

View File

@@ -17,6 +17,7 @@
#include "governor.hpp"
#include "process_management.hpp"
#include <hocclk/clock_manager.h>
namespace governor {
#define POLL_NS 5'000'000 // 5 ms governor poll rate
@@ -43,7 +44,7 @@ namespace governor {
if (!tempTargetHz) {
tempTargetHz = config::GetAutoClockHz(clockManager::gContext.applicationId, HocClkModule_Governor, clockManager::gContext.profile, true);
if (!tempTargetHz)
tempTargetHz = config::GetAutoClockHz(GLOBAL_PROFILE_ID, HocClkModule_Governor, clockManager::gContext.profile, true);
tempTargetHz = config::GetAutoClockHz(HOCCLK_GLOBAL_PROFILE_TID, HocClkModule_Governor, clockManager::gContext.profile, true);
}
auto resolve = [](u8 app, u8 temp) -> u8 {
@@ -107,7 +108,7 @@ namespace governor {
clockManager::gContext.profile, false);
if (!hz)
hz = config::GetAutoClockHz(
GLOBAL_PROFILE_ID, module,
HOCCLK_GLOBAL_PROFILE_TID, module,
clockManager::gContext.profile, false);
return hz;
}
@@ -295,7 +296,7 @@ namespace governor {
if (!targetHz) {
targetHz = config::GetAutoClockHz(clockManager::gContext.applicationId, HocClkModule_Display, clockManager::gContext.profile, false);
if (!targetHz)
targetHz = config::GetAutoClockHz(GLOBAL_PROFILE_ID, HocClkModule_Display, clockManager::gContext.profile, false);
targetHz = config::GetAutoClockHz(HOCCLK_GLOBAL_PROFILE_TID, HocClkModule_Display, clockManager::gContext.profile, false);
}
u8 maxDisplay;