sysclk: reformat kip editor and add fan speed to info
This commit is contained in:
@@ -49,6 +49,11 @@ Thread cpuCore0Thread;
|
||||
Thread cpuCore1Thread;
|
||||
Thread cpuCore2Thread;
|
||||
Thread cpuCore3Thread;
|
||||
Thread MISCThread;
|
||||
|
||||
FanController fanController;
|
||||
Result fanCheck = 1;
|
||||
u8 fanSpeed = 0;
|
||||
|
||||
uint32_t GPU_Load_u = 0, fd = 0;
|
||||
|
||||
@@ -169,6 +174,14 @@ void gpuLoadThread(void*) {
|
||||
} while(true);
|
||||
}
|
||||
|
||||
void miscThread(void*) {
|
||||
float temp;
|
||||
for(;;) {
|
||||
fanControllerGetRotationSpeedLevel(&fanController, &temp);
|
||||
fanSpeed = (u8)temp;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Board::Initialize()
|
||||
{
|
||||
@@ -205,6 +218,15 @@ void Board::Initialize()
|
||||
|
||||
if (R_SUCCEEDED(nvInitialize())) nvCheck = nvOpen(&fd, "/dev/nvhost-ctrl-gpu");
|
||||
|
||||
rc = rgltrInitialize();
|
||||
ASSERT_RESULT_OK(rc, "rgltrInitialize");
|
||||
|
||||
if (R_SUCCEEDED(fanInitialize())) {
|
||||
if (hosversionAtLeast(7,0,0)) fanCheck = fanOpenController(&fanController, 0x3D000001);
|
||||
else fanCheck = fanOpenController(&fanController, 1);
|
||||
}
|
||||
|
||||
|
||||
threadCreate(&gpuLThread, gpuLoadThread, NULL, NULL, 0x1000, 0x3F, -2);
|
||||
threadStart(&gpuLThread);
|
||||
|
||||
@@ -220,8 +242,8 @@ void Board::Initialize()
|
||||
threadCreate(&cpuCore3Thread, CheckCore3, NULL, NULL, 0x1000, 0x10, 3);
|
||||
threadStart(&cpuCore3Thread);
|
||||
|
||||
rc = rgltrInitialize();
|
||||
ASSERT_RESULT_OK(rc, "rgltrInitialize");
|
||||
threadCreate(&MISCThread, miscThread, NULL, NULL, 0x1000, 0x3F, -2);
|
||||
threadStart(&MISCThread);
|
||||
|
||||
|
||||
FetchHardwareInfos();
|
||||
@@ -254,6 +276,8 @@ void Board::Exit()
|
||||
threadClose(&cpuCore1Thread);
|
||||
threadClose(&cpuCore2Thread);
|
||||
threadClose(&cpuCore3Thread);
|
||||
threadClose(&MISCThread);
|
||||
|
||||
rgltrExit();
|
||||
}
|
||||
|
||||
@@ -729,3 +753,7 @@ std::uint32_t Board::GetVoltage(HocClkVoltage voltage)
|
||||
|
||||
return out > 0 ? out : 0;
|
||||
}
|
||||
|
||||
u8 Board::GetFanRotationLevel() {
|
||||
return fanSpeed;
|
||||
}
|
||||
|
||||
@@ -55,6 +55,7 @@ class Board
|
||||
static SysClkSocType GetSocType();
|
||||
static HorizonOCConsoleType GetConsoleType();
|
||||
static std::uint32_t GetVoltage(HocClkVoltage voltage);
|
||||
static u8 GetFanRotationLevel();
|
||||
|
||||
protected:
|
||||
static void FetchHardwareInfos();
|
||||
|
||||
@@ -81,7 +81,7 @@ ClockManager::ClockManager()
|
||||
this->rnxSync = new ReverseNXSync;
|
||||
|
||||
if(this->config->GetConfigValue(HocClkConfigValue_KipEditing))
|
||||
this->GetKipData();
|
||||
this->GetKipData();
|
||||
}
|
||||
|
||||
ClockManager::~ClockManager()
|
||||
@@ -512,6 +512,8 @@ bool ClockManager::RefreshContext()
|
||||
FileUtils::WriteContextToCsv(this->context);
|
||||
}
|
||||
|
||||
this->context->fanLevel = Board::GetFanRotationLevel();
|
||||
|
||||
return hasChanged;
|
||||
}
|
||||
|
||||
@@ -632,7 +634,7 @@ void ClockManager::GetKipData() {
|
||||
configValues.values[KipConfigValue_marikoCpuLowVmin] = cust_get_mariko_cpu_low_vmin(&table);
|
||||
configValues.values[KipConfigValue_marikoCpuHighVmin] = cust_get_mariko_cpu_high_vmin(&table);
|
||||
configValues.values[KipConfigValue_marikoCpuMaxVolt] = cust_get_mariko_cpu_max_volt(&table);
|
||||
configValues.values[KipConfigValue_marikoCpuMaxClock] = cust_get_marikoCpuMaxClock(&table) / 1000;
|
||||
configValues.values[KipConfigValue_marikoGpuFullUnlock] = cust_get_marikoCpuMaxClock(&table) / 1000;
|
||||
configValues.values[KipConfigValue_eristaCpuBoostClock] = cust_get_erista_cpu_boost(&table) / 1000;
|
||||
configValues.values[KipConfigValue_marikoCpuBoostClock] = cust_get_mariko_cpu_boost(&table) / 1000;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user