diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/customize.hpp b/Source/Atmosphere/stratosphere/loader/source/oc/customize.hpp index b5ceb5e8..1c434210 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/customize.hpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/customize.hpp @@ -26,10 +26,11 @@ namespace ams::ldr::oc { #include "mtc_timing_table.hpp" enum MtcConfig: u32 { - AUTO_ADJ_SAFE_MARIKO_ONLY = 0, - CUSTOM_ADJ_MARIKO_ONLY = 1, - NO_ADJ_ALL = 2, - CUSTOMIZED_ALL = 3, + AUTO_ADJ_SAFE_MARIKO = 0, + AUTO_ADJ_PERF_MARIKO = 1, + CUSTOM_ADJ_MARIKO = 2, + NO_ADJ_ALL = 3, + CUSTOMIZED_ALL = 4, }; using CustomizeCpuDvfsTable = pcv::cvb_entry_t[pcv::DvfsTableEntryLimit]; diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_mariko.cpp b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_mariko.cpp index a095787d..c906e14f 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_mariko.cpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_mariko.cpp @@ -108,11 +108,11 @@ void MemMtcTableAutoAdjust(MarikoMtcTable* table, const MarikoMtcTable* ref) { * you'd better calculate timings yourself rather than relying on following algorithm. */ - if (C.mtcConf != AUTO_ADJ_SAFE_MARIKO_ONLY) + if (C.mtcConf != AUTO_ADJ_SAFE_MARIKO && C.mtcConf != AUTO_ADJ_PERF_MARIKO) return; #define ADJUST_PROP(TARGET, REF) \ - (u32)(std::ceil(REF + ((C.marikoEmcMaxClock-EmcClkOSAlt)*(TARGET-REF))/(EmcClkOSLimit-EmcClkOSAlt))) + (u32)(std::ceil( 0.65 * C.mtcConf * (REF + ((C.marikoEmcMaxClock-EmcClkOSAlt)*(TARGET-REF))/(EmcClkOSLimit-EmcClkOSAlt)))) #define ADJUST_PARAM(TARGET, REF) \ TARGET = ADJUST_PROP(TARGET, REF); @@ -221,7 +221,7 @@ void MemMtcTableAutoAdjust(MarikoMtcTable* table, const MarikoMtcTable* ref) { // Valid Clock requirement before CKE Input HIGH in ns const double tCKCKEH = MAX(1.75, 3*tCK_avg); - #define GET_CYCLE_CEIL(PARAM) u32(std::ceil(double(PARAM) / tCK_avg)) + #define GET_CYCLE_CEIL(PARAM) C.mtcConf ? u32(std::ceil(double(PARAM) / 1.2* tCK_avg)) : u32(std::ceil(double(PARAM) / tCK_avg)) WRITE_PARAM_ALL_REG(table, emc_rc, GET_CYCLE_CEIL(tRC)); //0x124 WRITE_PARAM_ALL_REG(table, emc_rfc, GET_CYCLE_CEIL(tRFCab)); //0x128 diff --git a/pages/src/main.ts b/pages/src/main.ts index d1cfcaca..78ef49b4 100644 --- a/pages/src/main.ts +++ b/pages/src/main.ts @@ -163,8 +163,9 @@ var CustTable: Array = [ CustPlatform.Mariko, 4, ["0: AUTO_ADJ_SAFE_MARIKO: Auto adjust timings for LPDDR4 ≤3733 Mbps specs, 8Gb density. (Default)", - "1: CUSTOM_ADJ_MARIKO_ONLY: Basically same as NO_ADJ_ALL, with only core timing adjustments (Use advanced config)", - "2: NO_ADJ_ALL: No timing adjustment for both Erista and Mariko. Might achieve better performance on Mariko but lower maximum frequency is expected."], + "1: AUTO_ADJ_PERF_MARIKO: Auto adjust with tightened timings for best performance", + "2: CUSTOM_ADJ_MARIKO: Basically same as NO_ADJ_ALL, with only core timing adjustments (Use advanced config)", + "3: NO_ADJ_ALL: No timing adjustment for both Erista and Mariko. Might achieve better performance on Mariko but lower maximum frequency is expected."], 0, [0, 2], 1