fusee_cpp: implement bpmp overclock

This commit is contained in:
Michael Scire 2021-08-23 15:10:24 -07:00 committed by SciresM
parent 1a8f886a6e
commit 4480e7a8a5
7 changed files with 191 additions and 16 deletions

View file

@ -572,6 +572,16 @@ namespace ams::nxboot {
g_display_initialized = false;
}
void ShowDisplay() {
/* Enable backlight. */
constexpr auto DisplayBrightness = 100;
if (g_lcd_vendor == 0x2050) {
EnableBacklightForVendor2050ForAula(DisplayBrightness);
} else {
EnableBacklightForGeneric(DisplayBrightness);
}
}
void ShowFatalError(const ams::impl::FatalErrorContext *f_ctx, const Result save_result) {
/* If needed, initialize the display. */
if (!IsDisplayInitialized()) {
@ -601,13 +611,8 @@ namespace ams::nxboot {
/* Ensure the device will see consistent data. */
hw::FlushDataCache(g_frame_buffer, FrameBufferSize);
/* Enable backlight. */
constexpr auto DisplayBrightness = 100;
if (g_lcd_vendor == 0x2050) {
EnableBacklightForVendor2050ForAula(DisplayBrightness);
} else {
EnableBacklightForGeneric(DisplayBrightness);
}
/* Show the console. */
ShowDisplay();
}
void ShowFatalError(const char *fmt, ...) {
@ -635,13 +640,8 @@ namespace ams::nxboot {
/* Ensure the device will see consistent data. */
hw::FlushDataCache(g_frame_buffer, FrameBufferSize);
/* Enable backlight. */
constexpr auto DisplayBrightness = 100;
if (g_lcd_vendor == 0x2050) {
EnableBacklightForVendor2050ForAula(DisplayBrightness);
} else {
EnableBacklightForGeneric(DisplayBrightness);
}
/* Show the console. */
ShowDisplay();
WaitForReboot();
}