all: new GPU UV features

This commit is contained in:
souldbminersmwc
2026-05-30 17:32:06 -04:00
parent 0d5558f876
commit 5540a96af1
12 changed files with 159 additions and 54 deletions

View File

@@ -457,6 +457,47 @@ volatile CustomizeTable C = {
},
.marikoGpuDvfsTable = {
{ 76800, {}, { 610000, } },
{ 153600, {}, { 610000, } },
{ 230400, {}, { 610000, } },
{ 307200, {}, { 610000, } },
{ 384000, {}, { 610000, } },
{ 460800, {}, { 610000, } },
{ 537600, {}, { 801688, -10900, -163, 298, -10599, 162 } },
{ 614400, {}, { 824214, -5743, -452, 238, -6325, 81 } },
{ 691200, {}, { 848830, -3903, -552, 119, -4030, -2 } },
{ 768000, {}, { 891575, -4409, -584, 0, -2849, 39 } },
{ 844800, {}, { 940071, -5367, -602, -60, -63, -93 } },
{ 921600, {}, { 986765, -6637, -614, -179, 1905, -13 } },
{ 998400, {}, { 1098475, -13529, -497, -179, 3626, 9 } },
// { 1075200, {}, { 1163644, -12688, -648, 0, 1077, 40 } },
// { 1152000, {}, { 1204812, -9908, -830, 0, 1469, 110 } },
// { 1228800, {}, { 1277303, -11675, -859, 0, 3722, 313 } },
// { 1267200, {}, { 1335531, -12567, -867, 0, 3681, 559 } },
// { 1305600, {}, { 1374130, -13725, -859, 0, 4442, 576 } },
},
.marikoGpuDvfsTableSLT = {
{ 76800, {}, { 590000, } },
{ 153600, {}, { 590000, } },
{ 230400, {}, { 590000, } },
{ 307200, {}, { 590000, } },
{ 384000, {}, { 590000, } },
{ 460800, {}, { 795089, -11096, -163, 298, -10421, 162 } },
{ 537600, {}, { 795089, -11096, -163, 298, -10421, 162 } },
{ 614400, {}, { 820606, -6285, -452, 238, -6182, 81 } },
{ 691200, {}, { 846289, -4565, -552, 119, -3958, -2 } },
{ 768000, {}, { 888720, -5110, -584, 0, -2849, 39 } },
{ 844800, {}, { 936634, -6089, -602, -60, -99, -93 } },
{ 921600, {}, { 982562, -7373, -614, -179, 1797, -13 } },
{ 998400, {}, { 1090179, -14125, -497, -179, 3518, 9 } },
{ 1075200, {}, { 1155798, -13465, -648, 0, 1077, 40 } },
// { 1152000, {}, { 1198568, -10904, -830, 0, 1469, 110 } },
// { 1228800, {}, { 1269988, -12707, -859, 0, 3722, 313 } },
// { 1267200, {}, { 1308155, -13694, -867, 0, 3681, 559 } },
},
.marikoGpuDvfsTableHiOPT = {
{ 76800, { }, { GPU_MIN_MIN_VOLT, } },
{ 153600, { }, { GPU_MIN_MIN_VOLT, } },
{ 230400, { }, { GPU_MIN_MIN_VOLT, } },
@@ -471,12 +512,12 @@ volatile CustomizeTable C = {
{ 921600, { }, { 970060,-10108, -614,-179, 1508, -13 } },
{ 998400, { }, { 1065665,-16075, -497,-179, 3213, 9 } },
{ 1075200, { }, { 1132576,-16093, -648, 0, 1077, 40 } },
// { 1152000, { }, { 1180029,-14534, -830, 0, 1469, 110 } },
{ 1152000, { }, { 1180029,-14534, -830, 0, 1469, 110 } },
// { 1228800, { }, { 1248293,-16383, -859, 0, 3722, 313 } },
// { 1267200, { }, { 1286399,-17475, -867, 0, 3681, 559 } },
},
.marikoGpuDvfsTableSLT = {
.marikoGpuDvfsTableHiOPT15 = {
{ 76800, { }, { GPU_MIN_MIN_VOLT, } },
{ 153600, { }, { GPU_MIN_MIN_VOLT, } },
{ 230400, { }, { GPU_MIN_MIN_VOLT, } },
@@ -492,11 +533,11 @@ volatile CustomizeTable C = {
{ 998400, { }, { 1065665, -16075, -497, -179, 3213, 9 } },
{ 1075200, { }, { 1132576, -16093, -648, 0, 1077, 40 } },
{ 1152000, { }, { 1180029, -14534, -830, 0, 1469, 110 } },
{ 1228800, { }, { 1238293, -16383, -859, 0, 3722, 313 } },
// { 1228800, { }, { 1238293, -16383, -859, 0, 3722, 313 } },
// { 1267200, { }, { 1276399, -17475, -867, 0, 3681, 559 } },
},
.marikoGpuDvfsTableHiOPT = {
.marikoGpuDvfsTableHighUV = {
{ 76800, { }, { GPU_MIN_MIN_VOLT, } },
{ 153600, { }, { GPU_MIN_MIN_VOLT, } },
{ 230400, { }, { GPU_MIN_MIN_VOLT, } },

View File

@@ -119,7 +119,7 @@ struct CustomizeTable {
u32 marikoGpuBootVolt;
u32 marikoGpuVmax;
u32 commonGpuVoltOffset;
s32 commonGpuVoltOffset;
u32 eristaGpuVoltArray[27];
u32 marikoGpuVoltArray[24];
@@ -145,6 +145,8 @@ struct CustomizeTable {
CustomizeGpuDvfsTable marikoGpuDvfsTable;
CustomizeGpuDvfsTable marikoGpuDvfsTableSLT;
CustomizeGpuDvfsTable marikoGpuDvfsTableHiOPT;
CustomizeGpuDvfsTable marikoGpuDvfsTableHiOPT15;
CustomizeGpuDvfsTable marikoGpuDvfsTableHighUV;
};

View File

@@ -134,8 +134,14 @@ namespace ams::ldr::hoc::pcv {
case 2:
marikoGpuDvfsMaxFreq = static_cast<u32>(GetDvfsTableLastEntry(C.marikoGpuDvfsTableHiOPT)->freq);
break;
case 3:
marikoGpuDvfsMaxFreq = static_cast<u32>(GetDvfsTableLastEntry(C.marikoGpuDvfsTableHiOPT15)->freq);
break;
case 4:
marikoGpuDvfsMaxFreq = static_cast<u32>(GetDvfsTableLastEntry(C.marikoGpuDvfsTableHighUV)->freq);
break;
default:
marikoGpuDvfsMaxFreq = static_cast<u32>(GetDvfsTableLastEntry(C.marikoGpuDvfsTable)->freq);
marikoGpuDvfsMaxFreq = static_cast<u32>(GetDvfsTableLastEntry(C.marikoGpuDvfsTableHiOPT)->freq);
break;
}

View File

@@ -127,8 +127,14 @@ namespace ams::ldr::hoc::pcv {
case 2:
customize_table = const_cast<cvb_entry_t *>(C.marikoGpuDvfsTableHiOPT);
break;
case 3:
customize_table = const_cast<cvb_entry_t *>(C.marikoGpuDvfsTableHiOPT15);
break;
case 4:
customize_table = const_cast<cvb_entry_t *>(C.marikoGpuDvfsTableHighUV);
break;
default:
customize_table = const_cast<cvb_entry_t *>(C.marikoGpuDvfsTable);
customize_table = const_cast<cvb_entry_t *>(C.marikoGpuDvfsTableHiOPT);
break;
}
} else {

View File

@@ -301,8 +301,14 @@ namespace ams::ldr::hoc::pcv::mariko {
case 2:
max_clock = GetDvfsTableLastEntry(C.marikoGpuDvfsTableHiOPT)->freq;
break;
case 3:
max_clock = GetDvfsTableLastEntry(C.marikoGpuDvfsTableHiOPT15)->freq;
break;
case 4:
max_clock = GetDvfsTableLastEntry(C.marikoGpuDvfsTableHighUV)->freq;
break;
default:
max_clock = GetDvfsTableLastEntry(C.marikoGpuDvfsTable)->freq;
max_clock = GetDvfsTableLastEntry(C.marikoGpuDvfsTableHiOPT)->freq;
break;
}

View File

@@ -137,13 +137,17 @@ std::vector<std::string> ConfigInfoStrings(HocClkConfigValue val, bool isMariko,
"Warning: Enabling this may cause damage to your device without a proper undervolt. Use with caution!",
"Clock cappings:",
"- Handheld:",
" - GPU (HiOPT): 614 MHz",
" - GPU (HiOPT - 15mV): 691 MHz",
" - GPU (High UV): 768 MHz",
" - GPU (No UV): 614 MHz",
" - GPU (SLT): 691 MHz",
" - GPU (HiOPT): 768 MHz",
" - GPU (HiOPT - 15mV): 844 MHz",
" - GPU (High UV): 921 MHz",
"- USB Charger",
" - GPU (HiOPT): 844 MHz",
" - GPU (HiOPT - 15mV): 921 MHz",
" - GPU (High UV): 998 MHz",
" - GPU (No UV): 844 MHz",
" - GPU (SLT): 921 MHz",
" - GPU (HiOPT): 998 MHz",
" - GPU (HiOPT - 15mV): 1075 MHz",
" - GPU (High UV): 1152 MHz",
"- PD Charger / Docked:",
" - No capping applied",
"Default: OFF"
@@ -463,10 +467,12 @@ std::vector<std::string> ConfigInfoStrings(HocClkConfigValue val, bool isMariko,
return {
"GPU undervolt level",
"Options:",
" - No Undervolt: No Undervolt...",
" - SLT Table: NVIDIA custom SLT Table",
" - HiOPT: L4T Custom HiOPT table",
" - HiOPT - 15mV: L4T Custom HiOPT table with a 15mV offset",
" - High UV: The highest undervolt table, recommended",
"Default: HiOPT"
" - High UV: The highest undervolt table",
"Default: No Undervolt"
};
case KipConfigValue_marikoGpuVmin:
@@ -502,10 +508,10 @@ std::vector<std::string> ConfigInfoStrings(HocClkConfigValue val, bool isMariko,
return {
"GPU undervolt level",
"Options:",
" - No Undervolt: No Undervolt...",
" - SLT Table: NVIDIA custom SLT Table",
" - HiOPT: L4T Custom HiOPT table",
" - HiOPT - 15mV: L4T Custom HiOPT table with a 15mV offset",
" - High UV: The highest undervolt table, recommended",
"Default: HiOPT"
"Default: No Undervolt"
};
case KipConfigValue_eristaGpuVmin:
@@ -516,7 +522,7 @@ std::vector<std::string> ConfigInfoStrings(HocClkConfigValue val, bool isMariko,
case KipConfigValue_commonGpuVoltOffset:
return {
"The offset added/subtracted to all AUTO GPU voltages",
"The offset added/subtracted to all GPU voltages marked as \"auto\"",
"Default: 0 mV (Disabled)"
};

View File

@@ -2246,12 +2246,19 @@ protected:
this->listElement->addItem(new CompactCategoryHeader("GPU Settings"));
std::vector<NamedValue> gpuUvConf = {
NamedValue("HiOPT", 0),
NamedValue("HiOPT - 15mV", 1),
NamedValue("High UV Table", 2),
std::vector<NamedValue> gpuUvConfM = {
NamedValue("No Undervolt", 0),
NamedValue("SLT Table", 1),
NamedValue("HiOPT Table", 2),
NamedValue("HiOPT - 15mV", 3),
NamedValue("High UV Table", 4),
};
std::vector<NamedValue> gpuUvConfE = {
NamedValue("No Undervolt", 0),
NamedValue("SLT Table", 1),
NamedValue("HiOPT Table", 2),
};
std::vector<NamedValue> mGpuVoltsVmin = {
NamedValue("480mV", 480), NamedValue("485mV", 485), NamedValue("490mV", 490),
NamedValue("495mV", 495), NamedValue("500mV", 500), NamedValue("505mV", 505),
@@ -2285,7 +2292,7 @@ protected:
"GPU Undervolt Table",
&thresholdsDisabled,
{},
gpuUvConf,
gpuUvConfE,
false,
true
);
@@ -2308,7 +2315,7 @@ protected:
"GPU Undervolt Table",
&thresholdsDisabled,
{},
gpuUvConf,
gpuUvConfM,
false,
true
);
@@ -2343,16 +2350,27 @@ protected:
}
std::vector<NamedValue> gpuOffset = {
NamedValue("-50 mV", 50),
NamedValue("-45 mV", 45),
NamedValue("-40 mV", 40),
NamedValue("-30 mV", 30),
NamedValue("-25 mV", 25),
NamedValue("-20 mV", 20),
NamedValue("-15 mV", 15),
NamedValue("-10 mV", 10),
NamedValue(" -5 mV", 5),
NamedValue("Disabled", 0),
NamedValue("-50 mV", static_cast<u32>(-50)),
NamedValue("-45 mV", static_cast<u32>(-45)),
NamedValue("-40 mV", static_cast<u32>(-40)),
NamedValue("-35 mV", static_cast<u32>(-35)),
NamedValue("-30 mV", static_cast<u32>(-30)),
NamedValue("-25 mV", static_cast<u32>(-25)),
NamedValue("-20 mV", static_cast<u32>(-20)),
NamedValue("-15 mV", static_cast<u32>(-15)),
NamedValue("-10 mV", static_cast<u32>(-10)),
NamedValue("-5 mV", static_cast<u32>(-5)),
NamedValue("0 mV", 0),
NamedValue("5 mV", 5),
NamedValue("10 mV", 10),
NamedValue("15 mV", 15),
NamedValue("20 mV", 20),
NamedValue("25 mV", 25),
NamedValue("30 mV", 30),
NamedValue("35 mV", 35),
NamedValue("40 mV", 40),
NamedValue("45 mV", 45),
NamedValue("50 mV", 50),
};
addConfigButton(

View File

@@ -318,6 +318,8 @@ namespace kip {
// add marikoGpuBootVolt with default value of 800mV
configValues.values[KipConfigValue_marikoGpuBootVolt] = 800;
configValues.values[KipConfigValue_marikoGpuUV] += 2; // Raise UV levels
configValues.values[KipConfigValue_commonGpuVoltOffset] = (u32)(-(s64)(configValues.values[KipConfigValue_commonGpuVoltOffset])); // Migrate GPU Volt Offset
// Raise min cpu vmin
if(configValues.values[KipConfigValue_eristaCpuVmin] < 750) {
configValues.values[KipConfigValue_eristaCpuVmin] = 750;

View File

@@ -82,33 +82,51 @@ namespace clockManager {
case HocClkSocType_Erista:
return 460800000;
case HocClkSocType_Mariko:
switch (config::GetConfigValue(KipConfigValue_marikoGpuUV)) {
case 0:
return 614400000;
case 1:
return 691200000;
case 2:
return 768000000;
default:
return 614400000;
if(board::GetConsoleType() == HocClkConsoleType_Hoag) {
switch (config::GetConfigValue(KipConfigValue_marikoGpuUV)) {
case 0 ... 2:
return 614400000;
case 3 ... 4:
return 768000000;
default:
return 614400000;
}
} else {
switch (config::GetConfigValue(KipConfigValue_marikoGpuUV)) {
case 0:
return 614400000;
case 1:
return 691200000;
case 2:
return 768000000;
case 3:
return 844800000;
case 4:
return 921600000;
default:
return 614400000;
}
}
default:
return 460800000;
}
} else if (profile <= HocClkProfile_HandheldChargingUSB) {
switch (board::GetSocType()) {
case HocClkSocType_Erista:
return 768000000;
case HocClkSocType_Mariko:
switch (config::GetConfigValue(KipConfigValue_marikoGpuUV)) {
case 0:
return 844800000;
case 1:
return 921600000;
case 2:
return 998400000;
default:
return 844800000;
case 0:
return 844800000;
case 1:
return 921600000;
case 2:
return 998400000;
case 3:
return 1075200000;
case 4:
return 1152000000;
default:
return 844800000;
}
default:
return 768000000;

Binary file not shown.

Binary file not shown.