From 26c6c6372db0e59cb7906ad774b0dcbe90f354ae Mon Sep 17 00:00:00 2001 From: CTCaer Date: Sun, 2 Jun 2024 08:05:50 +0300 Subject: [PATCH] bdk: display: rename window setup arrays Add window number info and remove the fb naming --- bdk/display/di.c | 10 +++++----- bdk/display/di.inl | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/bdk/display/di.c b/bdk/display/di.c index 13157e7..89f022c 100644 --- a/bdk/display/di.c +++ b/bdk/display/di.c @@ -870,7 +870,7 @@ u32 *display_init_framebuffer_pitch() memset((u32 *)IPL_FB_ADDRESS, 0, IPL_FB_SZ); // This configures the framebuffer @ IPL_FB_ADDRESS with a resolution of 720x1280 (line stride 720). - exec_cfg((u32 *)DISPLAY_A_BASE, _di_win_framebuffer_pitch, ARRAY_SIZE(_di_win_framebuffer_pitch)); + exec_cfg((u32 *)DISPLAY_A_BASE, _di_winA_pitch, ARRAY_SIZE(_di_winA_pitch)); //usleep(35000); // Wait 2 frames. No need on Aula. return (u32 *)DISPLAY_A(_DIREG(DC_WINBUF_START_ADDR)); @@ -881,7 +881,7 @@ u32 *display_init_framebuffer_pitch_vic() // This configures the framebuffer @ NYX_FB_ADDRESS with a resolution of 720x1280 (line stride 720). if (_display_id != PANEL_SAM_AMS699VC01) usleep(8000); // Wait half frame for PWM to apply. - exec_cfg((u32 *)DISPLAY_A_BASE, _di_win_framebuffer_pitch_vic, ARRAY_SIZE(_di_win_framebuffer_pitch_vic)); + exec_cfg((u32 *)DISPLAY_A_BASE, _di_winA_pitch_vic, ARRAY_SIZE(_di_winA_pitch_vic)); if (_display_id != PANEL_SAM_AMS699VC01) usleep(35000); // Wait 2 frames. @@ -891,7 +891,7 @@ u32 *display_init_framebuffer_pitch_vic() u32 *display_init_framebuffer_pitch_inv() { // This configures the framebuffer @ NYX_FB_ADDRESS with a resolution of 720x1280 (line stride 720). - exec_cfg((u32 *)DISPLAY_A_BASE, _di_win_framebuffer_pitch_inv, ARRAY_SIZE(_di_win_framebuffer_pitch_inv)); + exec_cfg((u32 *)DISPLAY_A_BASE, _di_winA_pitch_inv, ARRAY_SIZE(_di_winA_pitch_inv)); usleep(35000); // Wait 2 frames. No need on Aula. return (u32 *)DISPLAY_A(_DIREG(DC_WINBUF_START_ADDR)); @@ -900,7 +900,7 @@ u32 *display_init_framebuffer_pitch_inv() u32 *display_init_framebuffer_block() { // This configures the framebuffer @ NYX_FB_ADDRESS with a resolution of 720x1280. - exec_cfg((u32 *)DISPLAY_A_BASE, _di_win_framebuffer_block, ARRAY_SIZE(_di_win_framebuffer_block)); + exec_cfg((u32 *)DISPLAY_A_BASE, _di_winA_block, ARRAY_SIZE(_di_winA_block)); usleep(35000); // Wait 2 frames. No need on Aula. return (u32 *)DISPLAY_A(_DIREG(DC_WINBUF_START_ADDR)); @@ -909,7 +909,7 @@ u32 *display_init_framebuffer_block() 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, _di_win_framebuffer_log, ARRAY_SIZE(_di_win_framebuffer_log)); + exec_cfg((u32 *)DISPLAY_A_BASE, _di_winD_log, ARRAY_SIZE(_di_winD_log)); return (u32 *)DISPLAY_A(_DIREG(DC_WINBUF_START_ADDR)); } diff --git a/bdk/display/di.inl b/bdk/display/di.inl index 56202a7..99d558b 100644 --- a/bdk/display/di.inl +++ b/bdk/display/di.inl @@ -1,6 +1,6 @@ /* * Copyright (c) 2018 naehrwert -* Copyright (c) 2018-2022 CTCaer +* Copyright (c) 2018-2024 CTCaer * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -479,7 +479,7 @@ static const cfg_op_t _di_win_one_color[] = { }; // Display A Window A linear pitch config. -static const cfg_op_t _di_win_framebuffer_pitch[] = { +static const cfg_op_t _di_winA_pitch[] = { {DC_CMD_DISPLAY_WINDOW_HEADER, WINDOW_C_SELECT | WINDOW_B_SELECT}, {DC_WIN_WIN_OPTIONS, 0}, {DC_CMD_DISPLAY_WINDOW_HEADER, WINDOW_A_SELECT}, @@ -505,7 +505,7 @@ static const cfg_op_t _di_win_framebuffer_pitch[] = { }; // Display A Window A linear pitch + Win D support config. -static const cfg_op_t _di_win_framebuffer_pitch_vic[] = { +static const cfg_op_t _di_winA_pitch_vic[] = { {DC_CMD_DISPLAY_WINDOW_HEADER, WINDOW_D_SELECT | WINDOW_C_SELECT | WINDOW_B_SELECT}, {DC_WIN_WIN_OPTIONS, 0}, {DC_CMD_DISPLAY_WINDOW_HEADER, WINDOW_A_SELECT}, @@ -531,7 +531,7 @@ static const cfg_op_t _di_win_framebuffer_pitch_vic[] = { }; // Display A Window A linear pitch inverse + Win D support config. -static const cfg_op_t _di_win_framebuffer_pitch_inv[] = { +static const cfg_op_t _di_winA_pitch_inv[] = { {DC_CMD_DISPLAY_WINDOW_HEADER, WINDOW_D_SELECT | WINDOW_C_SELECT | WINDOW_B_SELECT}, {DC_WIN_WIN_OPTIONS, 0}, {DC_CMD_DISPLAY_WINDOW_HEADER, WINDOW_A_SELECT}, @@ -557,7 +557,7 @@ static const cfg_op_t _di_win_framebuffer_pitch_inv[] = { }; // Display A Window A block linear config. -static const cfg_op_t _di_win_framebuffer_block[] = { +static const cfg_op_t _di_winA_block[] = { {DC_CMD_DISPLAY_WINDOW_HEADER, WINDOW_D_SELECT | WINDOW_C_SELECT | WINDOW_B_SELECT}, {DC_WIN_WIN_OPTIONS, 0}, {DC_CMD_DISPLAY_WINDOW_HEADER, WINDOW_A_SELECT}, @@ -583,7 +583,7 @@ static const cfg_op_t _di_win_framebuffer_block[] = { }; // Display A Window D config. -static const cfg_op_t _di_win_framebuffer_log[] = { +static const cfg_op_t _di_winD_log[] = { {DC_CMD_DISPLAY_WINDOW_HEADER, WINDOW_D_SELECT}, {DC_WIN_WIN_OPTIONS, 0}, {DC_WIN_COLOR_DEPTH, WIN_COLOR_DEPTH_B8G8R8A8},