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();
};