From 4628ee6dc57104b5252859249d0f2e003ec194e1 Mon Sep 17 00:00:00 2001 From: CTCaer Date: Thu, 20 Jan 2022 12:12:19 +0200 Subject: [PATCH] bdk: di: window fb changes - Get fb address from in window regs - Remove 2 frames wait --- bdk/display/di.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bdk/display/di.c b/bdk/display/di.c index ee6e47a..061a0ca 100644 --- a/bdk/display/di.c +++ b/bdk/display/di.c @@ -768,31 +768,31 @@ void display_color_screen(u32 color) u32 *display_init_framebuffer_pitch() { // Sanitize framebuffer area. - memset((u32 *)IPL_FB_ADDRESS, 0, 0x3C0000); + memset((u32 *)IPL_FB_ADDRESS, 0, IPL_FB_SZ); // This configures the framebuffer @ IPL_FB_ADDRESS with a resolution of 1280x720 (line stride 720). exec_cfg((u32 *)DISPLAY_A_BASE, cfg_display_framebuffer_pitch, 32); - usleep(35000); // No need to wait on Aula. + //usleep(35000); // No need to wait on Aula. - return (u32 *)IPL_FB_ADDRESS; + return (u32 *)DISPLAY_A(_DIREG(DC_WINBUF_START_ADDR)); } u32 *display_init_framebuffer_pitch_inv() { // This configures the framebuffer @ NYX_FB_ADDRESS with a resolution of 1280x720 (line stride 720). exec_cfg((u32 *)DISPLAY_A_BASE, cfg_display_framebuffer_pitch_inv, 34); - usleep(35000); // No need to wait on Aula. + //usleep(35000); // No need to wait on Aula. - return (u32 *)NYX_FB_ADDRESS; + return (u32 *)DISPLAY_A(_DIREG(DC_WINBUF_START_ADDR)); } u32 *display_init_framebuffer_block() { // This configures the framebuffer @ NYX_FB_ADDRESS with a resolution of 1280x720 (line stride 720). exec_cfg((u32 *)DISPLAY_A_BASE, cfg_display_framebuffer_block, 34); - usleep(35000); // No need to wait on Aula. + //usleep(35000); // No need to wait on Aula. - return (u32 *)NYX_FB_ADDRESS; + return (u32 *)DISPLAY_A(_DIREG(DC_WINBUF_START_ADDR)); } u32 *display_init_framebuffer_log() @@ -800,7 +800,7 @@ u32 *display_init_framebuffer_log() // This configures the framebuffer @ LOG_FB_ADDRESS with a resolution of 1280x720 (line stride 720). exec_cfg((u32 *)DISPLAY_A_BASE, cfg_display_framebuffer_log, 20); - return (u32 *)LOG_FB_ADDRESS; + return (u32 *)DISPLAY_A(_DIREG(DC_WINBUF_START_ADDR)); } void display_activate_console()