loader: add customizable gpu volt offset

This commit is contained in:
hanabbi
2023-10-30 15:07:39 +09:00
parent 65930ede28
commit ffa7a4f771
3 changed files with 20 additions and 0 deletions

View File

@@ -54,6 +54,7 @@ typedef struct CustomizeTable {
u32 marikoEmcVddqVolt;
u32 marikoCpuUV;
u32 marikoGpuUV;
u32 commonGpuVoltOffset;
// advanced config
u32 marikoEmcDvbShift;
u32 ramTimingPresetOne;

View File

@@ -289,6 +289,13 @@ Result GpuFreqCvbTable(u32* ptr) {
entry++;
}
}
else if (C.commonGpuVoltOffset) {
cvb_entry_t* entry = static_cast<cvb_entry_t *>(gpu_cvb_table_head);
for (size_t i = 0; i < customize_entry_count; i++) {
PATCH_OFFSET(&(entry->cvb_pll_param.c0), (entry->cvb_pll_param.c0 - C.commonGpuVoltOffset*1000));
entry++;
}
}
R_SUCCEED();
};

View File

@@ -334,6 +334,18 @@ var CustTable: Array<CustEntry> = [
[0,3],
1,
),
new CustEntry(
"commonGpuVoltOffset",
"GPU Volt Offset",
CustPlatform.All,
4,
["Negative Voltage offset value for gpu dynamic voltage calculation",
"For example, value of 10 will decrease 10mV gpu volt from all frequencies",
"Acceptable range: 0 ~ 100"],
0,
[0,100],
1,
),
];
var AdvTable: Array<AdvEntry> = [