AUTO_ADJ_PERF mode
This commit is contained in:
@@ -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];
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -163,8 +163,9 @@ var CustTable: Array<CustEntry> = [
|
||||
CustPlatform.Mariko,
|
||||
4,
|
||||
["<b>0</b>: AUTO_ADJ_SAFE_MARIKO: Auto adjust timings for LPDDR4 ≤3733 Mbps specs, 8Gb density. (Default)",
|
||||
"<b>1</b>: CUSTOM_ADJ_MARIKO_ONLY: Basically same as NO_ADJ_ALL, with only core timing adjustments (Use advanced config)",
|
||||
"<b>2</b>: NO_ADJ_ALL: No timing adjustment for both Erista and Mariko. Might achieve better performance on Mariko but lower maximum frequency is expected."],
|
||||
"<b>1</b>: AUTO_ADJ_PERF_MARIKO: Auto adjust with tightened timings for best performance",
|
||||
"<b>2</b>: CUSTOM_ADJ_MARIKO: Basically same as NO_ADJ_ALL, with only core timing adjustments (Use advanced config)",
|
||||
"<b>3</b>: 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
|
||||
|
||||
Reference in New Issue
Block a user