sysclk/ldr: remove marikogpufullunlock option
gpu pll limit is now patched by default, this does not mean those clocks will be enabled by default, they require special settings to be enabled
This commit is contained in:
@@ -92,13 +92,6 @@ volatile CustomizeTable C = {
|
||||
|
||||
.gpuSpeedo = 1450,
|
||||
|
||||
/* >1305 GPU unlock. */
|
||||
/* WARNING! This removes ALL gpu frequency limits and risks permanent hardware damage. */
|
||||
/* This setting is very dangerous and can damage your pmic, degrade your soc, damage the voltage rails and can cause various other damage. */
|
||||
/* Even with all of that said, if you still decide to use this despite all the warnings, use it at your own risk. */
|
||||
/* No warranty is provided in any way whatsoever. */
|
||||
.marikoGpuFullUnlock = DISABLED,
|
||||
|
||||
/* This table is used with a gpu uv mode of 2. */
|
||||
/* Setting DEACTIVATED_GPU_FREQ on any freq will disable it and all freqs greater than it. (the latter is a bug :/) */
|
||||
/* AUTO: Voltage is optimally chosen; with commonGpuVoltOffset applied. */
|
||||
|
||||
@@ -104,8 +104,6 @@ typedef struct CustomizeTable {
|
||||
/* TODO: Automatically detect speedo. */
|
||||
u32 gpuSpeedo;
|
||||
|
||||
u32 marikoGpuFullUnlock;
|
||||
|
||||
u32 eristaGpuVoltArray[27];
|
||||
u32 marikoGpuVoltArray[24];
|
||||
|
||||
|
||||
@@ -378,11 +378,8 @@ namespace ams::ldr::oc::pcv::mariko {
|
||||
if (prev_freq != 128000 && prev_freq != 1300000 && prev_freq != 76800) {
|
||||
R_THROW(ldr::ResultInvalidGpuPllEntry());
|
||||
}
|
||||
|
||||
if (C.marikoGpuFullUnlock) {
|
||||
/* Removes all limits - dangerous. */
|
||||
*ptr = 3600000;
|
||||
}
|
||||
|
||||
PATCH_OFFSET(ptr, 3600000);
|
||||
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
@@ -111,7 +111,6 @@ typedef enum {
|
||||
|
||||
KipConfigValue_commonGpuVoltOffset,
|
||||
KipConfigValue_gpuSpeedo,
|
||||
KipConfigValue_marikoGpuFullUnlock,
|
||||
|
||||
KipConfigValue_g_volt_76800,
|
||||
KipConfigValue_g_volt_153600,
|
||||
@@ -332,8 +331,6 @@ static inline const char* sysclkFormatConfigValue(SysClkConfigValue val, bool pr
|
||||
return pretty ? "Common GPU Voltage Offset" : "common_gpu_volt_offset";
|
||||
case KipConfigValue_gpuSpeedo:
|
||||
return pretty ? "GPU Speedo" : "gpu_speedo";
|
||||
case KipConfigValue_marikoGpuFullUnlock:
|
||||
return pretty ? "Mariko GPU Full Unlock" : "mariko_gpu_full_unlock";
|
||||
|
||||
// Mariko GPU voltages (24)
|
||||
case KipConfigValue_g_volt_76800: return pretty ? "Mariko GPU Volt 76 MHz" : "g_volt_76800";
|
||||
@@ -509,7 +506,6 @@ static inline uint64_t sysclkValidConfigValue(SysClkConfigValue val, uint64_t in
|
||||
case KipConfigValue_marikoGpuVmax:
|
||||
case KipConfigValue_commonGpuVoltOffset:
|
||||
case KipConfigValue_gpuSpeedo:
|
||||
case KipConfigValue_marikoGpuFullUnlock:
|
||||
case KipConfigValue_g_volt_76800:
|
||||
case KipConfigValue_g_volt_153600:
|
||||
case KipConfigValue_g_volt_230400:
|
||||
|
||||
@@ -935,17 +935,6 @@ protected:
|
||||
return false;
|
||||
});
|
||||
this->listElement->addItem(customTableSubmenu);
|
||||
|
||||
addConfigToggle(KipConfigValue_marikoGpuFullUnlock, "GPU Full Unlock");
|
||||
tsl::elm::CustomDrawer* warningText = new tsl::elm::CustomDrawer([](tsl::gfx::Renderer *renderer, s32 x, s32 y, s32 w, s32 h) {
|
||||
renderer->drawString("\uE150 GPU Full Unlock can cause", false, x + 20, y + 30, 18, tsl::style::color::ColorText);
|
||||
renderer->drawString("PERMANANT damage to your Switch!", false, x + 20, y + 50, 18, tsl::style::color::ColorText);
|
||||
renderer->drawString("Only enable if you know what", false, x + 20, y + 80, 16, tsl::style::color::ColorText);
|
||||
renderer->drawString("you're doing. Proceed at your", false, x + 20, y + 100, 16, tsl::style::color::ColorText);
|
||||
renderer->drawString("own risk!", false, x + 20, y + 120, 16, tsl::style::color::ColorText);
|
||||
});
|
||||
warningText->setBoundaries(0, 0, tsl::cfg::FramebufferWidth, 150);
|
||||
this->listElement->addItem(warningText);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1024,6 +1013,17 @@ protected:
|
||||
};
|
||||
|
||||
if (IsMariko()) {
|
||||
|
||||
tsl::elm::CustomDrawer* warningText = new tsl::elm::CustomDrawer([](tsl::gfx::Renderer *renderer, s32 x, s32 y, s32 w, s32 h) {
|
||||
renderer->drawString("\uE150 Setting GPU Clocks past", false, x + 20, y + 30, 18, tsl::style::color::ColorText);
|
||||
renderer->drawString("1075MHz without UV, 1152MHz on SLT or ", false, x + 20, y + 50, 18, tsl::style::color::ColorText);
|
||||
renderer->drawString("1228MHz on HiOPT can cause ", false, x + 20, y + 80, 16, tsl::style::color::ColorText);
|
||||
renderer->drawString("permanent damage to your Switch!", false, x + 20, y + 100, 16, tsl::style::color::ColorText);
|
||||
renderer->drawString("Proceed at your own risk!", false, x + 20, y + 120, 16, tsl::style::color::ColorText);
|
||||
});
|
||||
warningText->setBoundaries(0, 0, tsl::cfg::FramebufferWidth, 150);
|
||||
this->listElement->addItem(warningText);
|
||||
|
||||
addConfigButton(KipConfigValue_g_volt_76800, "76.8MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &MgpuVmaxThresholds, {}, mGpuVolts, false);
|
||||
addConfigButton(KipConfigValue_g_volt_153600, "153.6MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &MgpuVmaxThresholds, {}, mGpuVolts, false);
|
||||
addConfigButton(KipConfigValue_g_volt_230400, "230.4MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &MgpuVmaxThresholds, {}, mGpuVolts, false);
|
||||
@@ -1049,6 +1049,17 @@ protected:
|
||||
addConfigButton(KipConfigValue_g_volt_1497600, "1497.6MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &MgpuVmaxThresholds, {}, mGpuVolts, false);
|
||||
addConfigButton(KipConfigValue_g_volt_1536000, "1536.0MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &MgpuVmaxThresholds, {}, mGpuVolts, false);
|
||||
} else {
|
||||
|
||||
tsl::elm::CustomDrawer* warningText = new tsl::elm::CustomDrawer([](tsl::gfx::Renderer *renderer, s32 x, s32 y, s32 w, s32 h) {
|
||||
renderer->drawString("\uE150 Setting GPU Clocks past", false, x + 20, y + 30, 18, tsl::style::color::ColorText);
|
||||
renderer->drawString("921MHz without UV and 960MHz on", false, x + 20, y + 50, 18, tsl::style::color::ColorText);
|
||||
renderer->drawString("SLT or HiOPT can cause ", false, x + 20, y + 80, 16, tsl::style::color::ColorText);
|
||||
renderer->drawString("permanent damage to your Switch!", false, x + 20, y + 100, 16, tsl::style::color::ColorText);
|
||||
renderer->drawString("Proceed at your own risk!", false, x + 20, y + 120, 16, tsl::style::color::ColorText);
|
||||
});
|
||||
warningText->setBoundaries(0, 0, tsl::cfg::FramebufferWidth, 150);
|
||||
this->listElement->addItem(warningText);
|
||||
|
||||
addConfigButton(KipConfigValue_g_volt_e_76800, "76.8MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &EgpuVmaxThresholds, {}, eGpuVolts, false);
|
||||
addConfigButton(KipConfigValue_g_volt_e_115200, "115.2MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &EgpuVmaxThresholds, {}, eGpuVolts, false);
|
||||
addConfigButton(KipConfigValue_g_volt_e_153600, "153.6MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &EgpuVmaxThresholds, {}, eGpuVolts, false);
|
||||
|
||||
@@ -777,7 +777,6 @@ void ClockManager::SetKipData() {
|
||||
|
||||
CUST_WRITE_FIELD_BATCH(&table, commonGpuVoltOffset, this->config->GetConfigValue(KipConfigValue_commonGpuVoltOffset));
|
||||
CUST_WRITE_FIELD_BATCH(&table, gpuSpeedo, this->config->GetConfigValue(KipConfigValue_gpuSpeedo));
|
||||
CUST_WRITE_FIELD_BATCH(&table, marikoGpuFullUnlock, this->config->GetConfigValue(KipConfigValue_marikoGpuFullUnlock));
|
||||
|
||||
for (int i = 0; i < 24; i++) {
|
||||
table.marikoGpuVoltArray[i] = this->config->GetConfigValue((SysClkConfigValue)(KipConfigValue_g_volt_76800 + i));
|
||||
@@ -856,7 +855,7 @@ void ClockManager::GetKipData() {
|
||||
initialConfigValues[KipConfigValue_marikoCpuLowVmin] = cust_get_mariko_cpu_low_vmin(&table);
|
||||
initialConfigValues[KipConfigValue_marikoCpuHighVmin] = cust_get_mariko_cpu_high_vmin(&table);
|
||||
initialConfigValues[KipConfigValue_marikoCpuMaxVolt] = cust_get_mariko_cpu_max_volt(&table);
|
||||
initialConfigValues[KipConfigValue_marikoGpuFullUnlock] = cust_get_marikoCpuMaxClock(&table) / 1000;
|
||||
initialConfigValues[KipConfigValue_marikoCpuMaxClock] = cust_get_marikoCpuMaxClock(&table) / 1000;
|
||||
initialConfigValues[KipConfigValue_eristaCpuBoostClock] = cust_get_erista_cpu_boost(&table) / 1000;
|
||||
initialConfigValues[KipConfigValue_marikoCpuBoostClock] = cust_get_mariko_cpu_boost(&table) / 1000;
|
||||
|
||||
@@ -867,7 +866,6 @@ void ClockManager::GetKipData() {
|
||||
initialConfigValues[KipConfigValue_marikoGpuVmax] = cust_get_mariko_gpu_vmax(&table);
|
||||
initialConfigValues[KipConfigValue_commonGpuVoltOffset] = cust_get_common_gpu_offset(&table);
|
||||
initialConfigValues[KipConfigValue_gpuSpeedo] = cust_get_gpu_speedo(&table);
|
||||
initialConfigValues[KipConfigValue_marikoGpuFullUnlock] = cust_get_mariko_gpu_unlock(&table);
|
||||
|
||||
for (int i = 0; i < 24; i++) {
|
||||
initialConfigValues[KipConfigValue_g_volt_76800 + i] = cust_get_mariko_gpu_volt(&table, i);
|
||||
@@ -910,7 +908,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_marikoGpuFullUnlock] = cust_get_marikoCpuMaxClock(&table) / 1000;
|
||||
configValues.values[KipConfigValue_marikoCpuMaxClock] = 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;
|
||||
|
||||
@@ -921,7 +919,6 @@ void ClockManager::GetKipData() {
|
||||
configValues.values[KipConfigValue_marikoGpuVmax] = cust_get_mariko_gpu_vmax(&table);
|
||||
configValues.values[KipConfigValue_commonGpuVoltOffset] = cust_get_common_gpu_offset(&table);
|
||||
configValues.values[KipConfigValue_gpuSpeedo] = cust_get_gpu_speedo(&table);
|
||||
configValues.values[KipConfigValue_marikoGpuFullUnlock] = cust_get_mariko_gpu_unlock(&table);
|
||||
|
||||
for (int i = 0; i < 24; i++) {
|
||||
configValues.values[KipConfigValue_g_volt_76800 + i] = cust_get_mariko_gpu_volt(&table, i);
|
||||
|
||||
@@ -67,7 +67,6 @@ typedef struct {
|
||||
u32 marikoGpuVmax;
|
||||
u32 commonGpuVoltOffset;
|
||||
u32 gpuSpeedo;
|
||||
u32 marikoGpuFullUnlock;
|
||||
u32 eristaGpuVoltArray[27];
|
||||
u32 marikoGpuVoltArray[24];
|
||||
} CustomizeTable;
|
||||
@@ -215,7 +214,6 @@ static inline bool cust_set_mariko_gpu_vmin(const char* p, u32 v) { CUST_WRITE_F
|
||||
static inline bool cust_set_mariko_gpu_vmax(const char* p, u32 v) { CUST_WRITE_FIELD(p, marikoGpuVmax, v); }
|
||||
static inline bool cust_set_common_gpu_offset(const char* p, u32 v) { CUST_WRITE_FIELD(p, commonGpuVoltOffset, v); }
|
||||
static inline bool cust_set_gpu_speedo(const char* p, u32 v) { CUST_WRITE_FIELD(p, gpuSpeedo, v); }
|
||||
static inline bool cust_set_mariko_gpu_unlock(const char* p, u32 v) { CUST_WRITE_FIELD(p, marikoGpuFullUnlock, v); }
|
||||
static inline bool cust_set_marikoCpuMaxClock(const char* p, u32 v) { CUST_WRITE_FIELD(p, marikoCpuMaxClock, v); }
|
||||
|
||||
/* GPU VOLT ARRAY HELPERS */
|
||||
@@ -284,7 +282,6 @@ static inline u32 cust_get_mariko_gpu_vmin(const CustomizeTable* t) { return CUS
|
||||
static inline u32 cust_get_mariko_gpu_vmax(const CustomizeTable* t) { return CUST_GET_FIELD(t, marikoGpuVmax); }
|
||||
static inline u32 cust_get_common_gpu_offset(const CustomizeTable* t) { return CUST_GET_FIELD(t, commonGpuVoltOffset); }
|
||||
static inline u32 cust_get_gpu_speedo(const CustomizeTable* t) { return CUST_GET_FIELD(t, gpuSpeedo); }
|
||||
static inline u32 cust_get_mariko_gpu_unlock(const CustomizeTable* t) { return CUST_GET_FIELD(t, marikoGpuFullUnlock); }
|
||||
static inline u32 cust_get_marikoCpuMaxClock(const CustomizeTable* t) { return CUST_GET_FIELD(t, marikoCpuMaxClock); }
|
||||
|
||||
static inline u32 cust_get_erista_gpu_volt(const CustomizeTable* t, int idx) {
|
||||
|
||||
Reference in New Issue
Block a user