mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-26 13:52:21 +00:00
fusee: don't flicker as we turn the display on
Defers backlight init until the framebuffer's fully set up.
This commit is contained in:
parent
2d8812ac6e
commit
3f40a89316
3 changed files with 15 additions and 3 deletions
|
@ -28,6 +28,9 @@ void display_color_screen(u32 color);
|
|||
/*! Init display in full 1280x720 resolution (32bpp, line stride 768, framebuffer size = 1280*768*4 bytes). */
|
||||
u32 *display_init_framebuffer();
|
||||
|
||||
/*! Enable or disable the backlight. Should only be called when the screen is completely set up, to avoid flickering. */
|
||||
void display_enable_backlight(bool on);
|
||||
|
||||
void cluster_boot_cpu0(u64 entry, u32 ns_disable);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -183,14 +183,19 @@ void display_color_screen(u32 color)
|
|||
GPIO_6(0x24) = GPIO_6(0x24) & 0xFFFFFFFE | 1;
|
||||
}
|
||||
|
||||
void display_enable_backlight(bool on) {
|
||||
GPIO_6(0x24) = GPIO_6(0x24) & 0xFFFFFFFE | !!on;
|
||||
}
|
||||
|
||||
|
||||
u32 *display_init_framebuffer(void)
|
||||
{
|
||||
u32 *lfb_addr = (u32 *)0xC0000000;
|
||||
|
||||
//This configures the framebuffer @ 0xC0000000 with a resolution of 1280x720 (line stride 768).
|
||||
exec_cfg((u32 *)DISPLAY_A_BASE, cfg_display_framebuffer, 32);
|
||||
|
||||
sleep(35000);
|
||||
|
||||
GPIO_6(0x24) = GPIO_6(0x24) & 0xFFFFFFFE | 1;
|
||||
|
||||
return (u32 *)0xC0000000;
|
||||
return lfb_addr;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define _DI_H_
|
||||
|
||||
#include "types.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
/*! Display registers. */
|
||||
#define _DIREG(reg) ((reg) * 4)
|
||||
|
@ -53,4 +54,7 @@ void display_color_screen(u32 color);
|
|||
/*! Init display in full 1280x720 resolution (32bpp, line stride 768, framebuffer size = 1280*768*4 bytes). */
|
||||
u32 *display_init_framebuffer(void);
|
||||
|
||||
/*! Enable or disable the backlight. Should only be called when the screen is completely set up, to avoid flickering. */
|
||||
void display_enable_backlight(bool on);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue