Actually use the tables :P
This commit is contained in:
@@ -62,7 +62,7 @@ volatile CustomizeTable C = {
|
||||
|
||||
.marikoCpuUVLow = 8, // No undervolt
|
||||
.marikoCpuUVHigh = 1, // No undervolt
|
||||
.tableConf = AUTO,
|
||||
.tableConf = TBREAK_1683, /* TODO: Add AUTO */
|
||||
.marikoCpuLowVmin = 590,
|
||||
.marikoCpuHighVmin = 735,
|
||||
.marikoCpuMaxVolt = 1180,
|
||||
|
||||
@@ -35,7 +35,7 @@ enum MtcConfig: u32 {
|
||||
};
|
||||
|
||||
enum TableConfig: u32 {
|
||||
AUTO = 0,
|
||||
AUTO = 0, /* Auto is not supported yet. */
|
||||
DEFAULT_TABLE = 1,
|
||||
TBREAK_1581 = 2,
|
||||
TBREAK_1683 = 3,
|
||||
|
||||
@@ -236,7 +236,30 @@ namespace ams::ldr::oc::pcv {
|
||||
template <bool isMariko>
|
||||
Result CpuFreqCvbTable(u32 *ptr) {
|
||||
cvb_entry_t *default_table = isMariko ? (cvb_entry_t *)(&mariko::CpuCvbTableDefault) : (cvb_entry_t *)(&erista::CpuCvbTableDefault);
|
||||
cvb_entry_t* customize_table = const_cast<cvb_entry_t *>(C.marikoCpuDvfsTableHelios);
|
||||
cvb_entry_t *customize_table = const_cast<cvb_entry_t *>(C.marikoCpuDvfsTableHelios);
|
||||
|
||||
if (isMariko) {
|
||||
switch (C.tableConf) {
|
||||
case AUTO:
|
||||
case TBREAK_1683: {
|
||||
customize_table = const_cast<cvb_entry_t *>(C.marikoCpuDvfsTable1683Tbreak);
|
||||
break;
|
||||
}
|
||||
case TBREAK_1581: {
|
||||
customize_table = const_cast<cvb_entry_t *>(C.marikoCpuDvfsTable1581Tbreak);
|
||||
break;
|
||||
}
|
||||
case HELIOS_TABLE: {
|
||||
customize_table = const_cast<cvb_entry_t *>(C.marikoCpuDvfsTableHelios);
|
||||
break;
|
||||
}
|
||||
case DEFAULT_TABLE:
|
||||
default: {
|
||||
customize_table = default_table;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
u32 cpu_max_volt = isMariko ? C.marikoCpuMaxVolt : C.eristaCpuMaxVolt;
|
||||
u32 cpu_freq_threshold = 1020'000;
|
||||
|
||||
Reference in New Issue
Block a user