mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-06-05 22:31:36 +00:00
lcd: get rid of COLOR_MASK
COLOR_MASK macro doesn't do anything; Remove it to reduce visual complexity. This is a preparatory step for extracting lcd console code into its own file. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Cc: Anatolij Gustschin <agust@denx.de> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
140beb9437
commit
a7de2953f5
1 changed files with 6 additions and 8 deletions
14
common/lcd.c
14
common/lcd.c
|
@ -89,10 +89,8 @@
|
||||||
#define CONSOLE_SIZE (CONSOLE_ROW_SIZE * console_rows)
|
#define CONSOLE_SIZE (CONSOLE_ROW_SIZE * console_rows)
|
||||||
#define CONSOLE_SCROLL_SIZE (CONSOLE_SIZE - CONSOLE_ROW_SIZE)
|
#define CONSOLE_SCROLL_SIZE (CONSOLE_SIZE - CONSOLE_ROW_SIZE)
|
||||||
|
|
||||||
#if (LCD_BPP == LCD_COLOR8) || (LCD_BPP == LCD_COLOR16) || \
|
#if (LCD_BPP != LCD_COLOR8) && (LCD_BPP != LCD_COLOR16) && \
|
||||||
(LCD_BPP == LCD_COLOR32)
|
(LCD_BPP != LCD_COLOR32)
|
||||||
# define COLOR_MASK(c) (c)
|
|
||||||
#else
|
|
||||||
# error Unsupported LCD BPP.
|
# error Unsupported LCD BPP.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -188,7 +186,7 @@ static void console_scrollup(void)
|
||||||
/* Clear the last rows */
|
/* Clear the last rows */
|
||||||
#if (LCD_BPP != LCD_COLOR32)
|
#if (LCD_BPP != LCD_COLOR32)
|
||||||
memset(lcd_console_address + CONSOLE_SIZE - CONSOLE_ROW_SIZE * rows,
|
memset(lcd_console_address + CONSOLE_SIZE - CONSOLE_ROW_SIZE * rows,
|
||||||
COLOR_MASK(lcd_color_bg),
|
lcd_color_bg,
|
||||||
CONSOLE_ROW_SIZE * rows);
|
CONSOLE_ROW_SIZE * rows);
|
||||||
#else
|
#else
|
||||||
u32 *ppix = lcd_console_address +
|
u32 *ppix = lcd_console_address +
|
||||||
|
@ -197,7 +195,7 @@ static void console_scrollup(void)
|
||||||
for (i = 0;
|
for (i = 0;
|
||||||
i < (CONSOLE_ROW_SIZE * rows) / NBYTES(panel_info.vl_bpix);
|
i < (CONSOLE_ROW_SIZE * rows) / NBYTES(panel_info.vl_bpix);
|
||||||
i++) {
|
i++) {
|
||||||
*ppix++ = COLOR_MASK(lcd_color_bg);
|
*ppix++ = lcd_color_bg;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
lcd_sync();
|
lcd_sync();
|
||||||
|
@ -462,7 +460,7 @@ void lcd_clear(void)
|
||||||
/* set framebuffer to background color */
|
/* set framebuffer to background color */
|
||||||
#if (LCD_BPP != LCD_COLOR32)
|
#if (LCD_BPP != LCD_COLOR32)
|
||||||
memset((char *)lcd_base,
|
memset((char *)lcd_base,
|
||||||
COLOR_MASK(lcd_color_bg),
|
lcd_color_bg,
|
||||||
lcd_line_length * panel_info.vl_row);
|
lcd_line_length * panel_info.vl_row);
|
||||||
#else
|
#else
|
||||||
u32 *ppix = lcd_base;
|
u32 *ppix = lcd_base;
|
||||||
|
@ -470,7 +468,7 @@ void lcd_clear(void)
|
||||||
for (i = 0;
|
for (i = 0;
|
||||||
i < (lcd_line_length * panel_info.vl_row)/NBYTES(panel_info.vl_bpix);
|
i < (lcd_line_length * panel_info.vl_row)/NBYTES(panel_info.vl_bpix);
|
||||||
i++) {
|
i++) {
|
||||||
*ppix++ = COLOR_MASK(lcd_color_bg);
|
*ppix++ = lcd_color_bg;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue