diff --git a/README.md b/README.md index 8c3a6587..fbc0ef55 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ Overclocking suite for Switch **(Mariko Only)** running on Atmosphere CFW. Support Horizon OS 11.0.0-13.2.0. +This project will not be actively maintained by me and I'm looking for collaborators. Open an issue if you are interested and would like to be added into the maintainer list. + ## Disclaimer @@ -35,30 +37,31 @@ Overclocking suite for Switch **(Mariko Only)** running on Atmosphere CFW. Suppo - **Official X1+ CPU/GPU Max clock: 1963.5/1267.2 MHz**. - Anything above that are not in the table of official module. ([issue #4](https://github.com/KazushiMe/Switch-OC-Suite/issues/4)) - - **Recommended RAM clock: 1862.4 MHz** @ 600mV, (**1795.2 MHz for Hynix** ones @ 600mV). - - Only 1331.2 MHz and Max MHz are available in sys-clk-OC settings. - - Use Hekate to check out the brand and of your RAM chips. - - EM shielding & thermal paste for RAM chips and testing with emuNAND before long-term usage. + - **Recommended RAM clock: 1862.4 MHz**. + - **RAM clock is set permanently** via patching ptm module, rather than sys-clk. + - Apply thermal paste on RAM chips and test with emuNAND before long-term usage. + - DRAM Timing Table Adjustment: + - 2131.2 MHz should be usable and stable for all, with throughput reached about 24.7GiB/s. (theoretical bandwidth: 31.76GiB/s @ 2131.2 MHz) + + - See [issue #5](https://github.com/KazushiMe/Switch-OC-Suite/issues/5) for more info on DRAM OC and timings - For more info on available clock rates, see [README.md](https://github.com/KazushiMe/Switch-OC-Suite/tree/master/Source/sys-clk-OC) in sys-clk-OC. -- **Overvolt and Extreme Overclock** +- **Overvolt** - CPU overvolting: 1220 mV, up from default 1120 mV. Frequencies ≥ 2193 MHz will enable overvolting. - GPU overvolting: 1170 mV, default 1050 mV. Frequencies ≥ 1420 Mhz trigger overvolting. ([issue #4](https://github.com/KazushiMe/Switch-OC-Suite/issues/4)) - You cannot set ≥ 1344 MHz without official chargers. - - RAM - - Overvolting: precompiled hekate bootloader is provided - - Edit `oc.ini` to change Vddq voltage value: - ```ini - [emc] - volt=600000 - ``` - - Overvolting beyond 650mV is not safe and proved to be not much helpful. - - Timings: [EXPERIMENTAL] source codes, definitions and examples are provided. - - See [issue #5](https://github.com/KazushiMe/Switch-OC-Suite/issues/5) for more info on DRAM OC and timings + - RAM [NOT RECOMMENDED] + - Only diff patch for hekate bootloader is provided. + - Edit `oc.ini` to change Vddq voltage value: + ```ini + [emc] + volt=600000 + ``` + - Overvolting beyond 650mV is not safe and proved to be not much helpful. - **Fan Control Optimization** at high load - Higher tolerable temperature and smoother fan curve. Set `holdable_tskin` to 56˚C. Previously it's set to 48˚C, so by default the fan would go crazy (80~100%) easily with a slight degree of OC. @@ -118,12 +121,11 @@ Overclocking suite for Switch **(Mariko Only)** running on Atmosphere CFW. Suppo 2. Copy all the files in `SdOut` to the root of SD card. `system_settings.ini` should be edited manually. -3. Grab `x.x.x_loader_xxxx.x.kip` for your Atmosphere version and desired RAM frequency (according to DRAM manufacturer), rename it to `loader.kip` and place it in `/atmosphere/kips/`. +3. Grab `x.x.x_loader_xxxx.x.kip` for your Atmosphere version and desired RAM frequency, rename it to `loader.kip` and place it in `/atmosphere/kips/`. 4. **Hekate-ipl bootloader:** - Rename the kip to `loader.kip` and add `kip1=atmosphere/kips/loader.kip` in `bootloader/hekate_ipl.ini` - - Set DRAM voltage in `/oc.ini` **Atmosphere Fusee bootloader:** diff --git a/SdOut/atmosphere/1.2.5_loader_1795.2_hynix.kip b/SdOut/atmosphere/1.2.5_loader_1795.2_hynix.kip deleted file mode 100644 index 1926ec11..00000000 Binary files a/SdOut/atmosphere/1.2.5_loader_1795.2_hynix.kip and /dev/null differ diff --git a/SdOut/atmosphere/1.2.5_loader_1862.4_hynix.kip b/SdOut/atmosphere/1.2.5_loader_1862.4_hynix.kip deleted file mode 100644 index a662950b..00000000 Binary files a/SdOut/atmosphere/1.2.5_loader_1862.4_hynix.kip and /dev/null differ diff --git a/SdOut/atmosphere/1.2.5_loader_1862.4_timing_adjusted.kip b/SdOut/atmosphere/1.2.5_loader_1862.4_timing_adjusted.kip new file mode 100644 index 00000000..33183fc0 Binary files /dev/null and b/SdOut/atmosphere/1.2.5_loader_1862.4_timing_adjusted.kip differ diff --git a/SdOut/atmosphere/1.2.5_loader_1996.8_micron_samsung.kip b/SdOut/atmosphere/1.2.5_loader_1996.8_micron_samsung.kip deleted file mode 100644 index f5ff384b..00000000 Binary files a/SdOut/atmosphere/1.2.5_loader_1996.8_micron_samsung.kip and /dev/null differ diff --git a/SdOut/atmosphere/1.2.5_loader_2064.0_samsung.kip b/SdOut/atmosphere/1.2.5_loader_2064.0_samsung.kip deleted file mode 100644 index 17595939..00000000 Binary files a/SdOut/atmosphere/1.2.5_loader_2064.0_samsung.kip and /dev/null differ diff --git a/SdOut/atmosphere/1.2.5_loader_2131.2_timing_adjusted.kip b/SdOut/atmosphere/1.2.5_loader_2131.2_timing_adjusted.kip new file mode 100644 index 00000000..6b1a33e8 Binary files /dev/null and b/SdOut/atmosphere/1.2.5_loader_2131.2_timing_adjusted.kip differ diff --git a/SdOut/atmosphere/contents/00FF0000636C6BFF/exefs.nsp b/SdOut/atmosphere/contents/00FF0000636C6BFF/exefs.nsp index c9a6ce54..c632ad73 100644 Binary files a/SdOut/atmosphere/contents/00FF0000636C6BFF/exefs.nsp and b/SdOut/atmosphere/contents/00FF0000636C6BFF/exefs.nsp differ diff --git a/SdOut/atmosphere/old_1.2.5_loader_1795.2_hynix.kip b/SdOut/atmosphere/old_1.2.5_loader_1795.2_hynix.kip new file mode 100644 index 00000000..0eaa6de2 Binary files /dev/null and b/SdOut/atmosphere/old_1.2.5_loader_1795.2_hynix.kip differ diff --git a/SdOut/atmosphere/old_1.2.5_loader_1862.4_hynix.kip b/SdOut/atmosphere/old_1.2.5_loader_1862.4_hynix.kip new file mode 100644 index 00000000..bce9f301 Binary files /dev/null and b/SdOut/atmosphere/old_1.2.5_loader_1862.4_hynix.kip differ diff --git a/SdOut/atmosphere/old_1.2.5_loader_1996.8_micron_samsung.kip b/SdOut/atmosphere/old_1.2.5_loader_1996.8_micron_samsung.kip new file mode 100644 index 00000000..23bd7eb1 Binary files /dev/null and b/SdOut/atmosphere/old_1.2.5_loader_1996.8_micron_samsung.kip differ diff --git a/SdOut/atmosphere/old_1.2.5_loader_2064.0_samsung.kip b/SdOut/atmosphere/old_1.2.5_loader_2064.0_samsung.kip new file mode 100644 index 00000000..fe831139 Binary files /dev/null and b/SdOut/atmosphere/old_1.2.5_loader_2064.0_samsung.kip differ diff --git a/SdOut/bootloader/update.bin b/SdOut/bootloader/update.bin deleted file mode 100755 index 2836abfa..00000000 Binary files a/SdOut/bootloader/update.bin and /dev/null differ diff --git a/SdOut/switch/.overlays/sys-clk-overlay.ovl b/SdOut/switch/.overlays/sys-clk-overlay.ovl index 9706dee0..01b080c0 100644 Binary files a/SdOut/switch/.overlays/sys-clk-overlay.ovl and b/SdOut/switch/.overlays/sys-clk-overlay.ovl differ diff --git a/SdOut/switch/sys-clk-manager.nro b/SdOut/switch/sys-clk-manager.nro index 680dc456..a7fa84a5 100644 Binary files a/SdOut/switch/sys-clk-manager.nro and b/SdOut/switch/sys-clk-manager.nro differ diff --git a/Source/Atmosphere/stratosphere/loader/source/ldr_oc_patch.hpp b/Source/Atmosphere/stratosphere/loader/source/ldr_oc_patch.hpp index de676dbd..ec4628b2 100644 --- a/Source/Atmosphere/stratosphere/loader/source/ldr_oc_patch.hpp +++ b/Source/Atmosphere/stratosphere/loader/source/ldr_oc_patch.hpp @@ -256,8 +256,8 @@ namespace pcv { // Mariko mtc tables starting from rev, see mtc_timing_table.hpp for parameters. // All mariko mtc tables will be patched to simplify the procedure. - constexpr u32 MtcTable_1600[13] = { - 0x1012D8, 0x11C63C, 0x11F8A0, 0x122B04, 0x125D68, 0x128FCC, 0x12C230, 0x12F494, 0x1326F8, 0x13595C, 0x138BC0, 0x13BE24, 0x13F088 + constexpr u32 MtcTable_1600[][13] = { + { 0x1012D8, 0x11C63C, 0x11F8A0, 0x122B04, 0x125D68, 0x128FCC, 0x12C230, 0x12F494, 0x1326F8, 0x13595C, 0x138BC0, 0x13BE24, 0x13F088 }, // 13.x }; constexpr u32 MtcTableOffset = 0x10CC; diff --git a/Source/Atmosphere/stratosphere/loader/source/ldr_patcher.cpp b/Source/Atmosphere/stratosphere/loader/source/ldr_patcher.cpp index 25412e3c..80fcde90 100644 --- a/Source/Atmosphere/stratosphere/loader/source/ldr_patcher.cpp +++ b/Source/Atmosphere/stratosphere/loader/source/ldr_patcher.cpp @@ -15,7 +15,7 @@ */ #include #include "ldr_patcher.hpp" -//#define ADJUST_TIMING +#define ADJUST_TIMING namespace ams::ldr { @@ -68,10 +68,11 @@ namespace ams::ldr { } u32 GetEmcClock() { - // RAM freqs to choose: 1600000, 1728000, 1795200, 1862400, 1894400, 1932800, 1996800, 2064000, 2099200, 2131200 - // RAM overclock could be UNSTABLE on some RAM without bumping up voltage, - // and therefore show graphical glitches, hang randomly or even worse, corrupt your NAND - return 1862400; + // RAM freqs from Hekate: + // 1600000, 1728000, 1795200, 1862400, 1894400, 1932800, 1996800, 2064000, 2099200, 2131200 + // Other values might work as well + // RAM overclock could be UNSTABLE and generate graphical glitches / instabilities / NAND corruption + return 2131200; } u32 GetCpuBoostClock() { @@ -185,8 +186,8 @@ namespace ams::ldr { } #ifdef ADJUST_TIMING - /* Adjust timing parameters in 1600MHz mtc tables */ u32 param_1331, param_1600; + #define ADJUST_PROPORTIONAL(TARGET_TABLE, REF_TABLE, PARAM) \ param_1331 = REF_TABLE->PARAM; \ param_1600 = TARGET_TABLE->PARAM; \ @@ -207,10 +208,10 @@ namespace ams::ldr { divn = divn * 2 + 1; } - if (i == 2) { - for (u32 j = 0; j < sizeof(pcv::MtcTable_1600)/sizeof(u32); j++) { - pcv::MarikoMtcTable* mtc_table_1600 = reinterpret_cast(mapped_nso + pcv::MtcTable_1600[j]); - pcv::MarikoMtcTable* mtc_table_1331 = reinterpret_cast(mapped_nso + pcv::MtcTable_1600[j] - pcv::MtcTableOffset); + if (i >= 2) { + for (u32 j = 0; j < sizeof(pcv::MtcTable_1600[i-2])/sizeof(u32); j++) { + pcv::MarikoMtcTable* mtc_table_1600 = reinterpret_cast(mapped_nso + pcv::MtcTable_1600[i-2][j]); + pcv::MarikoMtcTable* mtc_table_1331 = reinterpret_cast(mapped_nso + pcv::MtcTable_1600[i-2][j] - pcv::MtcTableOffset); /* Patch parameters that seem like timings */ ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_rc); @@ -228,27 +229,17 @@ namespace ams::ldr { ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_rd_rcd); ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_wr_rcd); ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_rrd); - ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_wdv); - ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_wsv); - ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_wev); - ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_wdv_mask); //? - ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_quse); - ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_quse_width); - ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_einput); - ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_einput_duration); - ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_qsafe); - ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_rdv); - ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_rdv_mask); //? - ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_rdv_early); - ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_rdv_early_mask); //? + ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_refresh); ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_pre_refresh_req_cnt); + ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_pdex2wr); ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_pdex2rd); ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_act2pden); ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_rw2pden); ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_cke2pden); ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_pdex2mrr); + ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_txsr); ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_txsrdll); ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_tcke); @@ -258,15 +249,11 @@ namespace ams::ldr { ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_trpab); ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_tclkstop); ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_trefbw); - //ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_pmacro_ddll_long_cmd_4); //? + ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_pmacro_dll_cfg_2); - ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_qpop); - ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_tr_rdv); - ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_tr_qpop); - ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_tr_rdv_mask); //? - ADJUST_PROP_WITHIN_ALL_REG(mtc_table_1600, mtc_table_1331, emc_tr_qsafe); ADJUST_PROPORTIONAL(mtc_table_1600, mtc_table_1331, dram_timings.rl); + ADJUST_PROPORTIONAL(mtc_table_1600, mtc_table_1331, burst_mc_regs.mc_emem_arb_timing_rcd); ADJUST_PROPORTIONAL(mtc_table_1600, mtc_table_1331, burst_mc_regs.mc_emem_arb_timing_rp); ADJUST_PROPORTIONAL(mtc_table_1600, mtc_table_1331, burst_mc_regs.mc_emem_arb_timing_rc); @@ -276,7 +263,10 @@ namespace ams::ldr { ADJUST_PROPORTIONAL(mtc_table_1600, mtc_table_1331, burst_mc_regs.mc_emem_arb_timing_r2w); ADJUST_PROPORTIONAL(mtc_table_1600, mtc_table_1331, burst_mc_regs.mc_emem_arb_timing_w2r); ADJUST_PROPORTIONAL(mtc_table_1600, mtc_table_1331, burst_mc_regs.mc_emem_arb_timing_rfcpb); + ADJUST_PROPORTIONAL(mtc_table_1600, mtc_table_1331, la_scale_regs.mc_mll_mpcorer_ptsa_rate); + ADJUST_PROPORTIONAL(mtc_table_1600, mtc_table_1331, la_scale_regs.mc_ptsa_grant_decrement); + ADJUST_PROPORTIONAL(mtc_table_1600, mtc_table_1331, min_mrs_wait); ADJUST_PROPORTIONAL(mtc_table_1600, mtc_table_1331, latency); @@ -289,16 +279,16 @@ namespace ams::ldr { } } - // u32 PtmEmcClock = GetEmcClock() * 1000; + u32 PtmEmcClock = GetEmcClock() * 1000; u32 CpuBoostClock = GetCpuBoostClock() * 1000; for (u32 i = 0; i < sizeof(PtmModuleId)/sizeof(ro::ModuleId); i++) { if (std::memcmp(std::addressof(PtmModuleId[i]), std::addressof(module_id), sizeof(module_id)) == 0) { - // for (u32 j = 0; j < 16; j++) { - // std::memcpy(reinterpret_cast(mapped_nso + ptm::EmcOffsetStart[i] + ptm::OffsetInterval * j), &PtmEmcClock, sizeof(PtmEmcClock)); - // std::memcpy(reinterpret_cast(mapped_nso + ptm::EmcOffsetStart[i] + ptm::OffsetInterval * j + 0x4), &PtmEmcClock, sizeof(PtmEmcClock)); - // } + for (u32 j = 0; j < 16; j++) { + std::memcpy(reinterpret_cast(mapped_nso + ptm::EmcOffsetStart[i] + ptm::OffsetInterval * j), &PtmEmcClock, sizeof(PtmEmcClock)); + std::memcpy(reinterpret_cast(mapped_nso + ptm::EmcOffsetStart[i] + ptm::OffsetInterval * j + 0x4), &PtmEmcClock, sizeof(PtmEmcClock)); + } for (u32 j = 0; j < 2; j++) { std::memcpy(reinterpret_cast(mapped_nso + ptm::EmcOffsetStart[i] + ptm::CpuBoostOffset + ptm::OffsetInterval * j), &CpuBoostClock, sizeof(CpuBoostClock)); std::memcpy(reinterpret_cast(mapped_nso + ptm::EmcOffsetStart[i] + ptm::CpuBoostOffset + ptm::OffsetInterval * j + 0x4), &CpuBoostClock, sizeof(CpuBoostClock)); diff --git a/Source/sys-clk-OC/README.md b/Source/sys-clk-OC/README.md index 08cb7974..5005468e 100644 --- a/Source/sys-clk-OC/README.md +++ b/Source/sys-clk-OC/README.md @@ -65,7 +65,7 @@ From Hekate Minerva module [sys_sdrammtc.c](https://github.com/CTCaer/hekate/blo - 1996 - 1932 - 1894 -- 1862 → official max for Erista; Mariko (stable on most DRAM chips except Hynix ones) (with timings for 1600MHz and no overvolting – capped at 600 mV) +- 1862 → official max for Erista; Mariko without timing adjustment (stable on most DRAM chips except Hynix ones) - 1795 - 1728 - 1600 → official docked & official boost mode @@ -131,19 +131,14 @@ Presets can be customized by adding them to the ini config file located at `/con [Application Title ID] docked_cpu= docked_gpu= -docked_mem= handheld_charging_cpu= handheld_charging_gpu= -handheld_charging_mem= handheld_charging_usb_cpu= handheld_charging_usb_gpu= -handheld_charging_usb_mem= handheld_charging_official_cpu= handheld_charging_official_gpu= -handheld_charging_official_mem= handheld_cpu= handheld_gpu= -handheld_mem= ``` * Replace `Application Title ID` with the title id of the game/application you're interested in customizing. @@ -165,7 +160,6 @@ Leads to a smoother framerate overall (ex: in the korok forest) [01007EF00011E000] docked_cpu=1224 handheld_charging_cpu=1224 -handheld_mem=1600 ``` ### Example 2: Picross diff --git a/Source/sys-clk-OC/manager/src/advanced_settings_tab.cpp b/Source/sys-clk-OC/manager/src/advanced_settings_tab.cpp index 9b11f643..6d9725e2 100644 --- a/Source/sys-clk-OC/manager/src/advanced_settings_tab.cpp +++ b/Source/sys-clk-OC/manager/src/advanced_settings_tab.cpp @@ -77,7 +77,7 @@ AdvancedSettingsTab::AdvancedSettingsTab() }); // MEM - brls::SelectListItem *memFreqListItem = createFreqListItem(SysClkModule_MEM, context.overrideFreqs[SysClkModule_MEM] / 1000000); + /*brls::SelectListItem *memFreqListItem = createFreqListItem(SysClkModule_MEM, context.overrideFreqs[SysClkModule_MEM] / 1000000); memFreqListItem->getValueSelectedEvent()->subscribe([](int result) { Result rc = result == 0 ? @@ -90,7 +90,7 @@ AdvancedSettingsTab::AdvancedSettingsTab() errorResult(result == 0 ? "sysclkIpcRemoveOverride" : "sysclkIpcSetOverride", rc); // TODO: Reset selected value } - }); + });*/ this->addView(cpuFreqListItem); this->addView(gpuFreqListItem); diff --git a/Source/sys-clk-OC/manager/src/app_profile_frame.cpp b/Source/sys-clk-OC/manager/src/app_profile_frame.cpp index 4ad95451..0ea6af3e 100644 --- a/Source/sys-clk-OC/manager/src/app_profile_frame.cpp +++ b/Source/sys-clk-OC/manager/src/app_profile_frame.cpp @@ -116,7 +116,7 @@ void AppProfileFrame::addFreqs(brls::List* list, SysClkProfile profile) list->addView(gpuListItem); // MEM - brls::SelectListItem* memListItem = createFreqListItem(SysClkModule_MEM, this->profiles.mhzMap[profile][SysClkModule_MEM]); + /*brls::SelectListItem* memListItem = createFreqListItem(SysClkModule_MEM, this->profiles.mhzMap[profile][SysClkModule_MEM]); this->profiles.mhzMap[profile][SysClkModule_MEM] *= 1000000; @@ -126,7 +126,7 @@ void AppProfileFrame::addFreqs(brls::List* list, SysClkProfile profile) brls::Logger::debug("Caching freq for module %d and profile %d to %" PRIu32, SysClkModule_MEM, profile, this->profiles.mhzMap[profile][SysClkModule_MEM]); }); - list->addView(memListItem); + list->addView(memListItem);*/ } void AppProfileFrame::onProfileChanged() diff --git a/Source/sys-clk-OC/manager/src/utils.cpp b/Source/sys-clk-OC/manager/src/utils.cpp index 0f3e66fa..fd27e929 100644 --- a/Source/sys-clk-OC/manager/src/utils.cpp +++ b/Source/sys-clk-OC/manager/src/utils.cpp @@ -110,10 +110,7 @@ brls::SelectListItem* createFreqListItem(SysClkModule module, uint32_t selectedF selected = i + 1; char clock[16]; - if (freq == 1600000000) - snprintf(clock, sizeof(clock), "Max MHz"); - else - snprintf(clock, sizeof(clock), "%d MHz", freq / 1000000); + snprintf(clock, sizeof(clock), "%d MHz", freq / 1000000); clocks.push_back(std::string(clock)); diff --git a/Source/sys-clk-OC/overlay/src/ui/format.h b/Source/sys-clk-OC/overlay/src/ui/format.h index a0f65333..f8d81101 100644 --- a/Source/sys-clk-OC/overlay/src/ui/format.h +++ b/Source/sys-clk-OC/overlay/src/ui/format.h @@ -20,10 +20,6 @@ static inline std::string formatListFreqMhz(std::uint32_t mhz) { return FREQ_DEFAULT_TEXT; } - else if (mhz == 1600) - { - return "Max MHz"; - } char buf[10]; return std::string(buf, snprintf(buf, sizeof(buf), "%u MHz", mhz)); diff --git a/Source/sys-clk-OC/overlay/src/ui/gui/app_profile_gui.cpp b/Source/sys-clk-OC/overlay/src/ui/gui/app_profile_gui.cpp index 16a9b1f0..c467e6e9 100644 --- a/Source/sys-clk-OC/overlay/src/ui/gui/app_profile_gui.cpp +++ b/Source/sys-clk-OC/overlay/src/ui/gui/app_profile_gui.cpp @@ -62,7 +62,7 @@ void AppProfileGui::addProfileUI(SysClkProfile profile) this->listElement->addItem(new tsl::elm::CategoryHeader(sysclkFormatProfile(profile, true))); this->addModuleListItem(profile, SysClkModule_CPU, &sysclk_g_freq_table_cpu_hz[0]); this->addModuleListItem(profile, SysClkModule_GPU, &sysclk_g_freq_table_gpu_hz[0]); - this->addModuleListItem(profile, SysClkModule_MEM, &sysclk_g_freq_table_mem_hz[0]); + //this->addModuleListItem(profile, SysClkModule_MEM, &sysclk_g_freq_table_mem_hz[0]); } void AppProfileGui::listUI() diff --git a/Source/sys-clk-OC/overlay/src/ui/gui/global_override_gui.cpp b/Source/sys-clk-OC/overlay/src/ui/gui/global_override_gui.cpp index a360d87c..b07fa2dd 100644 --- a/Source/sys-clk-OC/overlay/src/ui/gui/global_override_gui.cpp +++ b/Source/sys-clk-OC/overlay/src/ui/gui/global_override_gui.cpp @@ -62,7 +62,7 @@ void GlobalOverrideGui::listUI() { this->addModuleListItem(SysClkModule_CPU, &sysclk_g_freq_table_cpu_hz[0]); this->addModuleListItem(SysClkModule_GPU, &sysclk_g_freq_table_gpu_hz[0]); - this->addModuleListItem(SysClkModule_MEM, &sysclk_g_freq_table_mem_hz[0]); + //this->addModuleListItem(SysClkModule_MEM, &sysclk_g_freq_table_mem_hz[0]); } void GlobalOverrideGui::refresh() diff --git a/Source/sys-clk-OC/sysmodule/src/clock_manager.cpp b/Source/sys-clk-OC/sysmodule/src/clock_manager.cpp index e611b566..fcdd83e5 100644 --- a/Source/sys-clk-OC/sysmodule/src/clock_manager.cpp +++ b/Source/sys-clk-OC/sysmodule/src/clock_manager.cpp @@ -247,10 +247,6 @@ void ClockManager::Tick() if (hz) { hz = Clocks::GetNearestHz((SysClkModule)module, isEnabledReverseNX ? RealProfile : this->context->profile, hz); - if (module == SysClkModule_MEM && hz == 1600'000'000 && this->context->freqs[module] >= hz) - { - continue; - } if (hz != this->context->freqs[module] && this->context->enabled) { @@ -446,6 +442,13 @@ bool ClockManager::RefreshContext() { hz = Clocks::GetCurrentHz((SysClkModule)module); + // Skip MEM freq check + if (module == SysClkModule_MEM) + { + this->context->freqs[module] = hz; + break; + } + // Round to MHz uint32_t cur_mhz = hz/1000'000; uint32_t be4_mhz = this->context->freqs[module]/1000'000; diff --git a/Source/sys-clk-OC/sysmodule/src/clocks.cpp b/Source/sys-clk-OC/sysmodule/src/clocks.cpp index f5a98bea..fe02eb44 100644 --- a/Source/sys-clk-OC/sysmodule/src/clocks.cpp +++ b/Source/sys-clk-OC/sysmodule/src/clocks.cpp @@ -179,10 +179,10 @@ void Clocks::ResetToStock(unsigned int module) { Clocks::SetHz(SysClkModule_GPU, apmConfiguration->gpu_hz); } - if (module == SysClkModule_EnumMax || module == SysClkModule_MEM) - { - Clocks::SetHz(SysClkModule_MEM, apmConfiguration->mem_hz); - } + // if (module == SysClkModule_EnumMax || module == SysClkModule_MEM) + // { + // Clocks::SetHz(SysClkModule_MEM, apmConfiguration->mem_hz); + // } } else { @@ -225,6 +225,9 @@ SysClkProfile Clocks::GetCurrentProfile() void Clocks::SetHz(SysClkModule module, std::uint32_t hz) { + if (module == SysClkModule_MEM) + return; + Result rc = 0; if(hosversionAtLeast(8,0,0))