sysclk: rework labels and warnings, bump version

This commit is contained in:
souldbminersmwc
2026-03-19 16:50:21 -04:00
parent 9558fd67bb
commit b5876ede0e
7 changed files with 105 additions and 16 deletions

View File

@@ -39,7 +39,7 @@ include ${TOPDIR}/lib/libultrahand/ultrahand.mk
# version control constants
#---------------------------------------------------------------------------------
#TARGET_VERSION := $(shell git describe --dirty --always --tags)
APP_VERSION := 1.0.2
APP_VERSION := 1.0.3
TARGET_VERSION := $(APP_VERSION)
#---------------------------------------------------------------------------------

View File

@@ -54,9 +54,10 @@ void AppProfileGui::openFreqChoiceGui(tsl::elm::ListItem* listItem, SysClkProfil
std::map<uint32_t, std::string> labels = {};
if (module == SysClkModule_CPU) {
labels = IsMariko() ? cpu_freq_label_m : cpu_freq_label_e;
bool isUsingUv = IsMariko() ? configList.values[KipConfigValue_marikoCpuUVHigh] : configList.values[KipConfigValue_eristaCpuUV];
labels = IsMariko() ? (isUsingUv ? cpu_freq_label_m_uv : cpu_freq_label_m) : (isUsingUv ? cpu_freq_label_e_uv : cpu_freq_label_e);
} else if (module == SysClkModule_GPU) {
labels = IsMariko() ? gpu_freq_label_m : gpu_freq_label_e;
labels = IsMariko() ? *(marikoUV[configList.values[KipConfigValue_marikoGpuUV]]) : *(eristaUV[configList.values[KipConfigValue_eristaGpuUV]]);
}
tsl::changeTo<FreqChoiceGui>(this->profileList->mhzMap[profile][module] * 1000000, hzList, hzCount, module, [this, listItem, profile, module](std::uint32_t hz) {
this->profileList->mhzMap[profile][module] = hz / 1000000;

View File

@@ -154,7 +154,7 @@ void FreqChoiceGui::listUI()
if (IsMariko())
{
unsafe_cpu = this->configList->values[KipConfigValue_marikoCpuUVHigh] ? 2296 : 1964;
unsafe_cpu = this->configList->values[KipConfigValue_marikoCpuUVHigh] ? 2398 : 1964;
if(this->configList->values[KipConfigValue_marikoGpuUV] == 0) {
unsafe_gpu = 1076;
} else if (this->configList->values[KipConfigValue_marikoGpuUV] == 1) {
@@ -167,7 +167,7 @@ void FreqChoiceGui::listUI()
}
else
{
unsafe_cpu = this->configList->values[KipConfigValue_eristaCpuUV] ? 1964 : 1786;
unsafe_cpu = this->configList->values[KipConfigValue_eristaCpuUV] ? 2092 : 1786;
if(this->configList->values[KipConfigValue_eristaGpuUV] == 0) {
unsafe_gpu = 922;
} else {

View File

@@ -42,9 +42,10 @@ void GlobalOverrideGui::openFreqChoiceGui(SysClkModule module)
std::map<uint32_t, std::string> labels = {};
if (module == SysClkModule_CPU) {
labels = IsMariko() ? cpu_freq_label_m : cpu_freq_label_e;
bool isUsingUv = IsMariko() ? configList.values[KipConfigValue_marikoCpuUVHigh] : configList.values[KipConfigValue_eristaCpuUV];
labels = IsMariko() ? (isUsingUv ? cpu_freq_label_m_uv : cpu_freq_label_m) : (isUsingUv ? cpu_freq_label_e_uv : cpu_freq_label_e);
} else if (module == SysClkModule_GPU) {
labels = IsMariko() ? gpu_freq_label_m : gpu_freq_label_e;
labels = IsMariko() ? *(marikoUV[configList.values[KipConfigValue_marikoGpuUV]]) : *(eristaUV[configList.values[KipConfigValue_eristaGpuUV]]);
}
tsl::changeTo<FreqChoiceGui>(
this->context->overrideFreqs[module], hzList, hzCount, module,

View File

@@ -29,14 +29,36 @@ std::map<uint32_t, std::string> cpu_freq_label_m = {
{2703000000, "Absolute Max"},
};
std::map<uint32_t, std::string> cpu_freq_label_m_uv = {
{612000000, "Sleep Mode"},
{1020000000, "Stock"},
{1224000000, "Dev OC"},
{1785000000, "Boost Mode"},
{2397000000, "Safe Max"},
{2601000000, "Unsafe Max"},
{2703000000, "Absolute Max"},
};
std::map<uint32_t, std::string> cpu_freq_label_e = {
{612000000, "Sleep Mode"},
{1020000000, "Stock"},
{1224000000, "Dev OC"},
{1785000000, "Boost Mode & Safe Max"},
{1785000000, "Safe Max"},
{2091000000, "Unsafe Max"},
{2397000000, "Absolute Max"},
};
std::map<uint32_t, std::string> cpu_freq_label_e_uv = {
{612000000, "Sleep Mode"},
{1020000000, "Stock"},
{1224000000, "Dev OC"},
{1785000000, "Boost Mode"},
{2091000000, "Safe Max"},
{2193000000, "Unsafe Max"},
{2397000000, "Absolute Max"},
};
std::map<uint32_t, std::string> gpu_freq_label_e = {
{76800000, "Boost Mode"},
{307200000, "Handheld"},
@@ -50,6 +72,18 @@ std::map<uint32_t, std::string> gpu_freq_label_e = {
{1075200000, "Absolute Max"},
};
std::map<uint32_t, std::string> gpu_freq_label_e_uv = {
{76800000, "Boost Mode"},
{307200000, "Handheld"},
{345600000, "Handheld"},
{384000000, "Handheld"},
{422400000, "Handheld"},
{460800000, "Handheld Safe Max"},
{768000000, "Docked"},
{960000000, "Safe Max"},
{1075200000, "Absolute Max"},
};
std::map<uint32_t, std::string> gpu_freq_label_m = {
{76800000, "Boost Mode"},
{307200000, "Handheld"},
@@ -60,5 +94,41 @@ std::map<uint32_t, std::string> gpu_freq_label_m = {
{1075200000, "Safe Max"},
{1305600000, "Unsafe Max"},
{1536000000, "Absolute Max"},
};
std::map<uint32_t, std::string> gpu_freq_label_m_slt = {
{76800000, "Boost Mode"},
{307200000, "Handheld"},
{384000000, "Handheld"},
{460800000, "Handheld"},
{614400000, "Handheld Safe Max"},
{768000000, "Docked"},
{1152200000, "Safe Max"},
{1305600000, "Unsafe Max"},
{1536000000, "Absolute Max"},
};
std::map<uint32_t, std::string> gpu_freq_label_m_hiopt = {
{76800000, "Boost Mode"},
{307200000, "Handheld"},
{384000000, "Handheld"},
{460800000, "Handheld"},
{614400000, "Handheld Safe Max"},
{768000000, "Docked"},
{1228800000, "Safe Max"},
{1305600000, "Unsafe Max"},
{1536000000, "Absolute Max"},
};
std::map<uint32_t, std::string>* marikoUV[3] {
&gpu_freq_label_m,
&gpu_freq_label_m_slt,
&gpu_freq_label_m_hiopt,
};
std::map<uint32_t, std::string>* eristaUV[3] {
&gpu_freq_label_e,
&gpu_freq_label_e_uv,
&gpu_freq_label_e_uv,
};

View File

@@ -21,6 +21,14 @@
#include <string>
extern std::map<uint32_t, std::string> cpu_freq_label_m;
extern std::map<uint32_t, std::string> cpu_freq_label_m_uv;
extern std::map<uint32_t, std::string> cpu_freq_label_e;
extern std::map<uint32_t, std::string> cpu_freq_label_e_uv;
extern std::map<uint32_t, std::string> gpu_freq_label_m;
extern std::map<uint32_t, std::string> gpu_freq_label_e;
extern std::map<uint32_t, std::string> gpu_freq_label_m_slt;
extern std::map<uint32_t, std::string> gpu_freq_label_m_hiopt;
extern std::map<uint32_t, std::string> gpu_freq_label_e;
extern std::map<uint32_t, std::string> gpu_freq_label_e_uv;
extern std::map<uint32_t, std::string>* marikoUV[3];
extern std::map<uint32_t, std::string>* eristaUV[3];

View File

@@ -921,7 +921,17 @@ public:
protected:
void listUI() override {
Result rc = sysclkIpcGetConfigValues(this->configList); // populate config list early otherwise wont work
if (R_FAILED(rc)) [[unlikely]] {
FatalGui::openWithResultCode("sysclkIpcGetConfigValues", rc);
return;
}
ValueThresholds thresholdsDisabled(0, 0);
ValueThresholds mCpuClockThresholds(1963000, 2397000);
ValueThresholds mCpuClockThresholdsUV(2397000, 2499000);
ValueThresholds eCpuClockThresholds(1785000, 2091000);
ValueThresholds eCpuClockThresholdsUV(2091000, 2193000);
this->listElement->addItem(new tsl::elm::CategoryHeader("CPU Settings"));
if(IsMariko()) {
@@ -935,13 +945,13 @@ protected:
NamedValue("2601 MHz", 2601000),
NamedValue("2703 MHz", 2703000),
};
ValueThresholds mCpuClockThresholds(1963000, 2397000);
addConfigButton(
KipConfigValue_marikoCpuBoostClock,
"CPU Boost Clock",
ValueRange(0, 0, 1, "", 1),
"CPU Boost Clock",
&mCpuClockThresholds,
this->configList->values[KipConfigValue_marikoCpuUVHigh] ? &mCpuClockThresholdsUV : &mCpuClockThresholds,
{},
ClkOptions,
false
@@ -956,13 +966,12 @@ protected:
NamedValue("2295 MHz", 2295000),
NamedValue("2397 MHz", 2397000),
};
ValueThresholds eCpuClockThresholds(1785000, 2091000);
addConfigButton(
KipConfigValue_eristaCpuBoostClock,
"CPU Boost Clock",
ValueRange(0, 0, 1, "", 1),
"CPU Boost Clock",
&eCpuClockThresholds,
this->configList->values[KipConfigValue_eristaCpuUV] ? &eCpuClockThresholdsUV : &eCpuClockThresholds,
{},
ClkOptionsE,
false
@@ -1076,13 +1085,13 @@ protected:
NamedValue("2601 MHz", 2601000),
NamedValue("2703 MHz", 2703000),
};
ValueThresholds mCpuMaxClockThresholds(1963000, 2397000);
addConfigButton(
KipConfigValue_marikoCpuMaxClock,
"CPU Max Clock",
ValueRange(0, 0, 1, "", 1),
"CPU Max Clock",
&mCpuMaxClockThresholds,
this->configList->values[KipConfigValue_marikoCpuUVHigh] ? &mCpuClockThresholdsUV : &mCpuClockThresholds,
{},
maxClkOptions,
false