From a032e4b55ea717fb931dd0d4754cf72b9bafe2f4 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 6 Oct 2022 08:36:03 -0600 Subject: video: Move console colours to the video uclass At present these are attached to vidconsole which means that the video uclass requires that a console is enabled. This is not the intention. The colours are a reasonable way of indexing common colours in any case, so move them to the video uclass instead. Rename vid_console_color() to video_index_to_colour() now that it is more generic. Also fix the inconsistent spelling in these functions. Signed-off-by: Simon Glass --- include/video.h | 35 +++++++++++++++++++++++++++++++++++ include/video_console.h | 37 ------------------------------------- 2 files changed, 35 insertions(+), 37 deletions(-) (limited to 'include') diff --git a/include/video.h b/include/video.h index 43e2c899778..1c30aea73c0 100644 --- a/include/video.h +++ b/include/video.h @@ -131,6 +131,41 @@ struct video_ops { #define video_get_ops(dev) ((struct video_ops *)(dev)->driver->ops) +/** enum colour_idx - the 16 colors supported by consoles */ +enum colour_idx { + VID_BLACK = 0, + VID_RED, + VID_GREEN, + VID_BROWN, + VID_BLUE, + VID_MAGENTA, + VID_CYAN, + VID_LIGHT_GRAY, + VID_GRAY, + VID_LIGHT_RED, + VID_LIGHT_GREEN, + VID_YELLOW, + VID_LIGHT_BLUE, + VID_LIGHT_MAGENTA, + VID_LIGHT_CYAN, + VID_WHITE, + + VID_COLOUR_COUNT +}; + +/** + * video_index_to_colour() - convert a color code to a pixel's internal + * representation + * + * The caller has to guarantee that the color index is less than + * VID_COLOR_COUNT. + * + * @priv private data of the console device + * @idx color index + * Return: color value + */ +u32 video_index_to_colour(struct video_priv *priv, unsigned int idx); + /** * video_reserve() - Reserve frame-buffer memory for video devices * diff --git a/include/video_console.h b/include/video_console.h index 5921767fbf0..72edd419191 100644 --- a/include/video_console.h +++ b/include/video_console.h @@ -15,30 +15,6 @@ struct video_priv; #define VID_TO_PIXEL(x) ((x) / VID_FRAC_DIV) #define VID_TO_POS(x) ((x) * VID_FRAC_DIV) -/* - * The 16 colors supported by the console - */ -enum color_idx { - VID_BLACK = 0, - VID_RED, - VID_GREEN, - VID_BROWN, - VID_BLUE, - VID_MAGENTA, - VID_CYAN, - VID_LIGHT_GRAY, - VID_GRAY, - VID_LIGHT_RED, - VID_LIGTH_GREEN, - VID_YELLOW, - VID_LIGHT_BLUE, - VID_LIGHT_MAGENTA, - VID_LIGHT_CYAN, - VID_WHITE, - - VID_COLOR_COUNT -}; - /** * struct vidconsole_priv - uclass-private data about a console device * @@ -243,19 +219,6 @@ int vidconsole_put_string(struct udevice *dev, const char *str); void vidconsole_position_cursor(struct udevice *dev, unsigned col, unsigned row); -/** - * vid_console_color() - convert a color code to a pixel's internal - * representation - * - * The caller has to guarantee that the color index is less than - * VID_COLOR_COUNT. - * - * @priv private data of the console device - * @idx color index - * Return: color value - */ -u32 vid_console_color(struct video_priv *priv, unsigned int idx); - #ifdef CONFIG_VIDEO_COPY /** * vidconsole_sync_copy() - Sync back to the copy framebuffer -- cgit v1.2.3 From 6b6dc0d2fbf8b036d7ee278071036c7479074b32 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 6 Oct 2022 08:36:04 -0600 Subject: video: Provide a function to set the cursor position Add an exported function which allows the cursor position to be set to pixel granularity. Make use of this in the existing code. Signed-off-by: Simon Glass --- include/video_console.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include') diff --git a/include/video_console.h b/include/video_console.h index 72edd419191..76c4b10acf6 100644 --- a/include/video_console.h +++ b/include/video_console.h @@ -219,6 +219,18 @@ int vidconsole_put_string(struct udevice *dev, const char *str); void vidconsole_position_cursor(struct udevice *dev, unsigned col, unsigned row); +/** + * vidconsole_set_cursor_pos() - set cursor position + * + * The cursor is set to the new position and the start-of-line information is + * updated to the same position, so that a newline will return to @x + * + * @dev: video console device to update + * @x: x position from left in pixels + * @y: y position from top in pixels + */ +void vidconsole_set_cursor_pos(struct udevice *dev, int x, int y); + #ifdef CONFIG_VIDEO_COPY /** * vidconsole_sync_copy() - Sync back to the copy framebuffer -- cgit v1.2.3 From 50d562c01ff0a9f500ed9821a74e841d6f6dc133 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 6 Oct 2022 08:36:08 -0600 Subject: video: Allow filling the display with a colour Generalise the video_clear() function to allow filling with a different colour. Tidy up the comments while we are here. Signed-off-by: Simon Glass --- include/video.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/video.h b/include/video.h index 1c30aea73c0..4c216d851b6 100644 --- a/include/video.h +++ b/include/video.h @@ -185,13 +185,22 @@ u32 video_index_to_colour(struct video_priv *priv, unsigned int idx); int video_reserve(ulong *addrp); /** - * video_clear() - Clear a device's frame buffer to background color. + * video_clear() - Clear a device's frame buffer to background colour. * * @dev: Device to clear - * Return: 0 + * Return: 0 on success */ int video_clear(struct udevice *dev); +/** + * video_fill() - Fill a device's frame buffer to a colour. + * + * @dev: Device to fill + * @colour: Colour to use, in the frame buffer's format + * Return: 0 on success + */ +int video_fill(struct udevice *dev, u32 colour); + /** * video_sync() - Sync a device's frame buffer with its hardware * -- cgit v1.2.3 From 0d3890188d6bcaf7172678d2e5e803035e85dc8d Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 6 Oct 2022 08:36:09 -0600 Subject: video: Add function to obtain the U-Boot logo It is useful to show the logo from other code, coming in a later feature. Add a function to obtain it. Signed-off-by: Simon Glass --- include/video.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/video.h b/include/video.h index 4c216d851b6..2e68dd717ef 100644 --- a/include/video.h +++ b/include/video.h @@ -319,4 +319,11 @@ static inline int video_sync_copy_all(struct udevice *dev) */ bool video_is_active(void); +/** + * video_get_u_boot_logo() - Get a pointer to the U-Boot logo + * + * Returns: Pointer to logo + */ +void *video_get_u_boot_logo(void); + #endif -- cgit v1.2.3 From 57a847cd405e546711dbab1b70ea43fd46960f58 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 6 Oct 2022 08:36:14 -0600 Subject: video: Add a way to change the font name and size It is useful to be able to support multiple fonts. Add a function to handle this as well as one to list the available fonts. Signed-off-by: Simon Glass --- include/video_console.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include') diff --git a/include/video_console.h b/include/video_console.h index 76c4b10acf6..bef926cd433 100644 --- a/include/video_console.h +++ b/include/video_console.h @@ -231,6 +231,22 @@ void vidconsole_position_cursor(struct udevice *dev, unsigned col, */ void vidconsole_set_cursor_pos(struct udevice *dev, int x, int y); +/** + * vidconsole_list_fonts() - List the available fonts + * + * This shows a list on the console + */ +void vidconsole_list_fonts(void); + +/** + * vidconsole_select_font() - Select a font to use + * + * @dev: vidconsole device + * @name: Font name + * @size: Size of the font (norminal pixel height) or 0 for default + */ +int vidconsole_select_font(struct udevice *dev, const char *name, uint size); + #ifdef CONFIG_VIDEO_COPY /** * vidconsole_sync_copy() - Sync back to the copy framebuffer -- cgit v1.2.3 From 430e1676a76bf8b7112c64e19cf64b988c281ee0 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 6 Oct 2022 08:36:16 -0600 Subject: video: Add commands to list and change fonts Add a new 'font' command which allows the fonts to be listed as well as selecting a different font and size. Allow the test to run on sandbox, where multiple font/size combinations are supported, as well as sandbox_flattree, where they are not. Signed-off-by: Simon Glass --- include/test/suites.h | 1 + include/video_console.h | 9 +++++++++ 2 files changed, 10 insertions(+) (limited to 'include') diff --git a/include/test/suites.h b/include/test/suites.h index 44025ccecd6..a01000e127b 100644 --- a/include/test/suites.h +++ b/include/test/suites.h @@ -39,6 +39,7 @@ int do_ut_compression(struct cmd_tbl *cmdtp, int flag, int argc, int do_ut_dm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ut_env(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ut_fdt(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); +int do_ut_font(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ut_lib(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ut_loadm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ut_log(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]); diff --git a/include/video_console.h b/include/video_console.h index bef926cd433..d755eb73cf2 100644 --- a/include/video_console.h +++ b/include/video_console.h @@ -247,6 +247,15 @@ void vidconsole_list_fonts(void); */ int vidconsole_select_font(struct udevice *dev, const char *name, uint size); +/** + * vidconsole_get_font() - get the current font name and size + * + * @dev: vidconsole device + * @sizep: Place to put the font size (nominal height in pixels) + * Returns: Current font name + */ +const char *vidconsole_get_font(struct udevice *dev, uint *sizep); + #ifdef CONFIG_VIDEO_COPY /** * vidconsole_sync_copy() - Sync back to the copy framebuffer -- cgit v1.2.3 From e90322f87c97a4829c44fe77435c9faca87cbfc8 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 6 Oct 2022 08:36:17 -0600 Subject: video: Add a function to get the dimensions of a BMP image This is useful for some other users, so break this out into a function. Signed-off-by: Simon Glass --- include/video.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include') diff --git a/include/video.h b/include/video.h index 2e68dd717ef..32afb26a45b 100644 --- a/include/video.h +++ b/include/video.h @@ -223,6 +223,17 @@ int video_sync(struct udevice *vid, bool force); */ void video_sync_all(void); +/** + * video_bmp_get_info() - Get information about a bitmap image + * + * @bmp_image: Pointer to BMP image to check + * @widthp: Returns width in pixels + * @heightp: Returns height in pixels + * @bpixp: Returns log2 of bits per pixel + */ +void video_bmp_get_info(void *bmp_image, ulong *widthp, ulong *heightp, + uint *bpixp); + /** * video_bmp_display() - Display a BMP file * -- cgit v1.2.3 From c830e285f475e580eb45290d54e9d174a57a7d71 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 6 Oct 2022 08:36:18 -0600 Subject: video: Add a way to get the default font height This is not as simple as it seems. Add a function to provide it so that the upcoming menu feature can space lines out correctly. Signed-off-by: Simon Glass --- include/video.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/video.h b/include/video.h index 32afb26a45b..529f9685183 100644 --- a/include/video.h +++ b/include/video.h @@ -286,6 +286,15 @@ void video_set_flush_dcache(struct udevice *dev, bool flush); */ void video_set_default_colors(struct udevice *dev, bool invert); +/** + * video_default_font_height() - Get the default font height + * + * @dev: video device + * Returns: Default font height in pixels, which depends on which console driver + * is in use + */ +int video_default_font_height(struct udevice *dev); + #ifdef CONFIG_VIDEO_COPY /** * vidconsole_sync_copy() - Sync back to the copy framebuffer -- cgit v1.2.3 From 4adc28ebc6b2fb9acc6abbb15186de528d502ef7 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 18 Oct 2022 06:30:56 -0600 Subject: Convert CONFIG_HIDE_LOGO_VERSION to Kconfig This converts the following to Kconfig: CONFIG_HIDE_LOGO_VERSION Signed-off-by: Simon Glass --- include/configs/ge_b1x5v2.h | 1 - include/configs/ge_bx50v3.h | 1 - include/configs/gw_ventana.h | 1 - 3 files changed, 3 deletions(-) (limited to 'include') diff --git a/include/configs/ge_b1x5v2.h b/include/configs/ge_b1x5v2.h index 95ba20c686b..176f80bb09b 100644 --- a/include/configs/ge_b1x5v2.h +++ b/include/configs/ge_b1x5v2.h @@ -34,7 +34,6 @@ #define CONFIG_USBD_HS /* Video */ -#define CONFIG_HIDE_LOGO_VERSION #define CONFIG_IMX_VIDEO_SKIP /* Memory */ diff --git a/include/configs/ge_bx50v3.h b/include/configs/ge_bx50v3.h index ad00769bdee..ab8c66f263d 100644 --- a/include/configs/ge_bx50v3.h +++ b/include/configs/ge_bx50v3.h @@ -103,7 +103,6 @@ #define CONFIG_SYS_FSL_USDHC_NUM 3 /* Framebuffer */ -#define CONFIG_HIDE_LOGO_VERSION #define CONFIG_IMX_HDMI #define CONFIG_IMX_VIDEO_SKIP diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h index 82076ff74ff..bba64af2c91 100644 --- a/include/configs/gw_ventana.h +++ b/include/configs/gw_ventana.h @@ -47,7 +47,6 @@ /* Framebuffer and LCD */ #define CONFIG_IMX_HDMI #define CONFIG_IMX_VIDEO_SKIP -#define CONFIG_HIDE_LOGO_VERSION /* Custom config to hide U-boot version */ /* Miscellaneous configurable options */ #define CONFIG_HWCONFIG -- cgit v1.2.3 From e65500338427b64e83a59432242a1ef295dd95f0 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 18 Oct 2022 06:46:08 -0600 Subject: video: Rename CONFIG_SYS_VIDEO_LOGO_MAX_SIZE This option should not have the SYS_ in it. Drop it so it fits in with the other video options. Also simplify the alignment code in gunzip_bmp(), since malloc() always returns a 32-bit-aligned pointer. Signed-off-by: Simon Glass --- include/configs/m53menlo.h | 2 +- include/configs/mx23evk.h | 2 +- include/configs/mx28evk.h | 2 +- include/configs/nitrogen6x.h | 2 +- include/configs/s5pc210_universal.h | 2 +- include/configs/trats.h | 2 +- include/configs/trats2.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/configs/m53menlo.h b/include/configs/m53menlo.h index 0499e633512..139919f391e 100644 --- a/include/configs/m53menlo.h +++ b/include/configs/m53menlo.h @@ -81,7 +81,7 @@ /* * LCD */ -#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (2 << 20) +#define CONFIG_VIDEO_LOGO_MAX_SIZE (2 << 20) /* LVDS display */ #define CONFIG_SYS_LDB_CLOCK 33260000 diff --git a/include/configs/mx23evk.h b/include/configs/mx23evk.h index 3507e83fb38..69d4552546f 100644 --- a/include/configs/mx23evk.h +++ b/include/configs/mx23evk.h @@ -23,7 +23,7 @@ /* Framebuffer support */ #ifdef CONFIG_DM_VIDEO -#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (512 << 10) +#define CONFIG_VIDEO_LOGO_MAX_SIZE (512 << 10) #endif /* Extra Environments */ diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h index 9f3ac48b70a..6c2fcbf7645 100644 --- a/include/configs/mx28evk.h +++ b/include/configs/mx28evk.h @@ -26,7 +26,7 @@ /* Framebuffer support */ #ifdef CONFIG_DM_VIDEO -#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (512 << 10) +#define CONFIG_VIDEO_LOGO_MAX_SIZE (512 << 10) #endif /* Extra Environment */ diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index 26e6de2d2c8..ee3c5e4afa8 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -27,7 +27,7 @@ #define CONFIG_MXC_USB_FLAGS 0 /* Framebuffer and LCD */ -#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (6 * 1024 * 1024) +#define CONFIG_VIDEO_LOGO_MAX_SIZE (6 * 1024 * 1024) #define CONFIG_IMX_HDMI #define CONFIG_IMX_VIDEO_SKIP diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h index 137537d65f6..585c67b7912 100644 --- a/include/configs/s5pc210_universal.h +++ b/include/configs/s5pc210_universal.h @@ -121,6 +121,6 @@ int universal_spi_read(void); * LCD Settings */ #define CONFIG_LD9040 -#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE ((500 * 160 * 4) + 54) +#define CONFIG_VIDEO_LOGO_MAX_SIZE ((500 * 160 * 4) + 54) #endif /* __CONFIG_H */ diff --git a/include/configs/trats.h b/include/configs/trats.h index 530b413d5b6..973d15962cd 100644 --- a/include/configs/trats.h +++ b/include/configs/trats.h @@ -148,6 +148,6 @@ #define LCD_BPP LCD_COLOR16 /* LCD */ -#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE ((500 * 160 * 4) + 54) +#define CONFIG_VIDEO_LOGO_MAX_SIZE ((500 * 160 * 4) + 54) #endif /* __CONFIG_H */ diff --git a/include/configs/trats2.h b/include/configs/trats2.h index 06c1fcd23e0..24afc220226 100644 --- a/include/configs/trats2.h +++ b/include/configs/trats2.h @@ -138,6 +138,6 @@ #define LCD_BPP LCD_COLOR16 /* LCD */ -#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE ((500 * 160 * 4) + 54) +#define CONFIG_VIDEO_LOGO_MAX_SIZE ((500 * 160 * 4) + 54) #endif /* __CONFIG_H */ -- cgit v1.2.3 From 2fd5a57af6cdb256c24d561bd7c6a0d10ccb542e Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 18 Oct 2022 06:49:18 -0600 Subject: Convert CONFIG_VIDEO_LOGO_MAX_SIZE to Kconfig This converts the following to Kconfig: CONFIG_VIDEO_LOGO_MAX_SIZE Signed-off-by: Simon Glass --- include/configs/m53menlo.h | 5 ----- include/configs/mx23evk.h | 11 ----------- include/configs/mx28evk.h | 7 ------- include/configs/nitrogen6x.h | 1 - include/configs/s5pc210_universal.h | 1 - include/configs/trats.h | 3 --- include/configs/trats2.h | 3 --- 7 files changed, 31 deletions(-) (limited to 'include') diff --git a/include/configs/m53menlo.h b/include/configs/m53menlo.h index 139919f391e..03e1619c869 100644 --- a/include/configs/m53menlo.h +++ b/include/configs/m53menlo.h @@ -78,11 +78,6 @@ #define CONFIG_MXC_USB_FLAGS 0 #endif -/* - * LCD - */ -#define CONFIG_VIDEO_LOGO_MAX_SIZE (2 << 20) - /* LVDS display */ #define CONFIG_SYS_LDB_CLOCK 33260000 #define CONFIG_IMX_VIDEO_SKIP diff --git a/include/configs/mx23evk.h b/include/configs/mx23evk.h index 69d4552546f..4c0531212ed 100644 --- a/include/configs/mx23evk.h +++ b/include/configs/mx23evk.h @@ -15,17 +15,6 @@ #define PHYS_SDRAM_1_SIZE 0x08000000 /* Max 128 MB RAM */ #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 -/* Environment */ - -/* Environment is in MMC */ - -/* USB */ - -/* Framebuffer support */ -#ifdef CONFIG_DM_VIDEO -#define CONFIG_VIDEO_LOGO_MAX_SIZE (512 << 10) -#endif - /* Extra Environments */ #define CONFIG_EXTRA_ENV_SETTINGS \ "update_sd_firmware_filename=u-boot.sd\0" \ diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h index 6c2fcbf7645..140f5e98c52 100644 --- a/include/configs/mx28evk.h +++ b/include/configs/mx28evk.h @@ -22,13 +22,6 @@ #define CONFIG_RTC_MXS #endif -/* USB */ - -/* Framebuffer support */ -#ifdef CONFIG_DM_VIDEO -#define CONFIG_VIDEO_LOGO_MAX_SIZE (512 << 10) -#endif - /* Extra Environment */ #define CONFIG_EXTRA_ENV_SETTINGS \ "ubifs_file=filesystem.ubifs\0" \ diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index ee3c5e4afa8..d507f8f11c0 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -27,7 +27,6 @@ #define CONFIG_MXC_USB_FLAGS 0 /* Framebuffer and LCD */ -#define CONFIG_VIDEO_LOGO_MAX_SIZE (6 * 1024 * 1024) #define CONFIG_IMX_HDMI #define CONFIG_IMX_VIDEO_SKIP diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h index 585c67b7912..a2b62f5f6de 100644 --- a/include/configs/s5pc210_universal.h +++ b/include/configs/s5pc210_universal.h @@ -121,6 +121,5 @@ int universal_spi_read(void); * LCD Settings */ #define CONFIG_LD9040 -#define CONFIG_VIDEO_LOGO_MAX_SIZE ((500 * 160 * 4) + 54) #endif /* __CONFIG_H */ diff --git a/include/configs/trats.h b/include/configs/trats.h index 973d15962cd..daa8cc79b2f 100644 --- a/include/configs/trats.h +++ b/include/configs/trats.h @@ -147,7 +147,4 @@ /* LCD console */ #define LCD_BPP LCD_COLOR16 -/* LCD */ -#define CONFIG_VIDEO_LOGO_MAX_SIZE ((500 * 160 * 4) + 54) - #endif /* __CONFIG_H */ diff --git a/include/configs/trats2.h b/include/configs/trats2.h index 24afc220226..052045a6014 100644 --- a/include/configs/trats2.h +++ b/include/configs/trats2.h @@ -137,7 +137,4 @@ /* LCD console */ #define LCD_BPP LCD_COLOR16 -/* LCD */ -#define CONFIG_VIDEO_LOGO_MAX_SIZE ((500 * 160 * 4) + 54) - #endif /* __CONFIG_H */ -- cgit v1.2.3 From 832bcbb083ca66fe102e559b4fd96152e7145411 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 16 Oct 2022 15:02:58 -0600 Subject: video: Drop CONFIG_LCD_ALIGNMENT This option is not needed now that the LCD implementation is being removed. Drop it. Signed-off-by: Simon Glass --- include/configs/nyan-big.h | 5 ----- include/configs/tegra20-common.h | 5 ----- 2 files changed, 10 deletions(-) (limited to 'include') diff --git a/include/configs/nyan-big.h b/include/configs/nyan-big.h index bc5754566bd..c59e1032439 100644 --- a/include/configs/nyan-big.h +++ b/include/configs/nyan-big.h @@ -18,11 +18,6 @@ #define CONFIG_TEGRA_ENABLE_UARTA #define CONFIG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE -/* Environment in eMMC, at the end of 2nd "boot sector" */ - -/* Align LCD to 1MB boundary */ -#define CONFIG_LCD_ALIGNMENT MMU_SECTION_SIZE - /* SPI */ #define CONFIG_SPI_FLASH_SIZE (4 << 20) diff --git a/include/configs/tegra20-common.h b/include/configs/tegra20-common.h index 71867bb6baa..617bfb2197c 100644 --- a/include/configs/tegra20-common.h +++ b/include/configs/tegra20-common.h @@ -54,11 +54,6 @@ "fdt_addr_r=0x03000000\0" \ "ramdisk_addr_r=0x03100000\0" -/* Defines for SPL */ - -/* Align LCD to 1MB boundary */ -#define CONFIG_LCD_ALIGNMENT MMU_SECTION_SIZE - #ifdef CONFIG_TEGRA_LP0 #define TEGRA_LP0_ADDR 0x1C406000 #define TEGRA_LP0_SIZE 0x2000 -- cgit v1.2.3 From 817f93422bf36cafe636cf093a5fce3ebe94d5c6 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 16 Oct 2022 15:06:52 -0600 Subject: video: Drop CONFIG_LCD_MENU This relies on the old LCD implementation which is to be removed. Drop it. Signed-off-by: Simon Glass --- include/configs/s5pc210_universal.h | 3 --- include/configs/trats.h | 3 --- include/configs/trats2.h | 3 --- include/samsung/misc.h | 15 --------------- 4 files changed, 24 deletions(-) (limited to 'include') diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h index a2b62f5f6de..f94135355ab 100644 --- a/include/configs/s5pc210_universal.h +++ b/include/configs/s5pc210_universal.h @@ -98,9 +98,6 @@ int universal_spi_read(void); /* Common misc for Samsung */ #define CONFIG_MISC_COMMON -/* Download menu - Samsung common */ -#define CONFIG_LCD_MENU - /* Download menu - definitions for check keys */ #ifndef __ASSEMBLY__ diff --git a/include/configs/trats.h b/include/configs/trats.h index daa8cc79b2f..9e4cd6794cc 100644 --- a/include/configs/trats.h +++ b/include/configs/trats.h @@ -128,9 +128,6 @@ /* Common misc for Samsung */ #define CONFIG_MISC_COMMON -/* Download menu - Samsung common */ -#define CONFIG_LCD_MENU - /* Download menu - definitions for check keys */ #ifndef __ASSEMBLY__ diff --git a/include/configs/trats2.h b/include/configs/trats2.h index 052045a6014..dc28ded9825 100644 --- a/include/configs/trats2.h +++ b/include/configs/trats2.h @@ -118,9 +118,6 @@ /* Common misc for Samsung */ #define CONFIG_MISC_COMMON -/* Download menu - Samsung common */ -#define CONFIG_LCD_MENU - /* Download menu - definitions for check keys */ #ifndef __ASSEMBLY__ diff --git a/include/samsung/misc.h b/include/samsung/misc.h index 4ff28a1df0e..89546a1cbcc 100644 --- a/include/samsung/misc.h +++ b/include/samsung/misc.h @@ -9,21 +9,6 @@ u32 get_board_rev(void); void set_board_info(void); #endif -#ifdef CONFIG_LCD_MENU -enum { - BOOT_MODE_INFO, - BOOT_MODE_THOR, - BOOT_MODE_UMS, - BOOT_MODE_DFU, - BOOT_MODE_GPT, - BOOT_MODE_ENV, - BOOT_MODE_EXIT, -}; - -void keys_init(void); -void check_boot_mode(void); -#endif /* CONFIG_LCD_MENU */ - #ifdef CONFIG_CMD_BMP void draw_logo(void); #endif -- cgit v1.2.3 From 816605652dd062a655a077778ed0f5c9724646fd Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 16 Oct 2022 15:08:59 -0600 Subject: video: Drop CONFIG_LCD_INFO_BELOW_LOGO This option is not used anymore since the LCD implementation is being removed. Drop it. Signed-off-by: Simon Glass --- include/lcd.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'include') diff --git a/include/lcd.h b/include/lcd.h index 4f180692781..751b0032efc 100644 --- a/include/lcd.h +++ b/include/lcd.h @@ -144,10 +144,7 @@ void lcd_sync(void); #define LCD_COLOR16 4 #define LCD_COLOR32 5 -#if defined(CONFIG_LCD_INFO_BELOW_LOGO) -#define LCD_INFO_X 0 -#define LCD_INFO_Y (BMP_LOGO_HEIGHT + VIDEO_FONT_HEIGHT) -#elif defined(CONFIG_LCD_LOGO) +#if defined(CONFIG_LCD_LOGO) #define LCD_INFO_X (BMP_LOGO_WIDTH + 4 * VIDEO_FONT_WIDTH) #define LCD_INFO_Y VIDEO_FONT_HEIGHT #else -- cgit v1.2.3 From ba97899349a2a90e8799c79fdc1ab906bf439db4 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 16 Oct 2022 15:11:32 -0600 Subject: video: Drop CONFIG_LCD_INFO This option is not used anymore since the LCD implementation is being removed. Drop it. Signed-off-by: Simon Glass --- include/lcd.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'include') diff --git a/include/lcd.h b/include/lcd.h index 751b0032efc..b4820037b2a 100644 --- a/include/lcd.h +++ b/include/lcd.h @@ -144,14 +144,6 @@ void lcd_sync(void); #define LCD_COLOR16 4 #define LCD_COLOR32 5 -#if defined(CONFIG_LCD_LOGO) -#define LCD_INFO_X (BMP_LOGO_WIDTH + 4 * VIDEO_FONT_WIDTH) -#define LCD_INFO_Y VIDEO_FONT_HEIGHT -#else -#define LCD_INFO_X VIDEO_FONT_WIDTH -#define LCD_INFO_Y VIDEO_FONT_HEIGHT -#endif - /* Default to 8bpp if bit depth not specified */ #ifndef LCD_BPP #define LCD_BPP LCD_COLOR8 -- cgit v1.2.3 From f24404d85f2d226110a3fd9aa169f25f9f454e35 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 18 Oct 2022 07:41:14 -0600 Subject: video: Move bmp_display() prototype to video.h The lcd.h header is about to be deleted, so move this prototype. Signed-off-by: Simon Glass --- include/video.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/video.h b/include/video.h index 529f9685183..43f2e2c02f0 100644 --- a/include/video.h +++ b/include/video.h @@ -346,4 +346,13 @@ bool video_is_active(void); */ void *video_get_u_boot_logo(void); +/* + * bmp_display() - Display BMP (bitmap) data located in memory + * + * @addr: address of the bmp data + * @x: Position of bitmap from the left side, in pixels + * @y: Position of bitmap from the top, in pixels + */ +int bmp_display(ulong addr, int x, int y); + #endif -- cgit v1.2.3 From 26cf75f92d2e569651ffcfad455748e513fd257a Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 16 Oct 2022 15:46:15 -0600 Subject: video: Drop ld9040 driver This is not used anymore. Drop it. Signed-off-by: Simon Glass --- include/configs/s5pc210_universal.h | 5 ----- include/ld9040.h | 15 --------------- 2 files changed, 20 deletions(-) delete mode 100644 include/ld9040.h (limited to 'include') diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h index f94135355ab..000dc388ac0 100644 --- a/include/configs/s5pc210_universal.h +++ b/include/configs/s5pc210_universal.h @@ -114,9 +114,4 @@ int universal_spi_read(void); /* LCD console */ #define LCD_BPP LCD_COLOR16 -/* - * LCD Settings - */ -#define CONFIG_LD9040 - #endif /* __CONFIG_H */ diff --git a/include/ld9040.h b/include/ld9040.h deleted file mode 100644 index 58413d0a3de..00000000000 --- a/include/ld9040.h +++ /dev/null @@ -1,15 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * ld9040 AMOLED LCD panel driver. - * - * Copyright (C) 2012 Samsung Electronics - * Donghwa Lee - */ - -#ifndef __LD9040_H_ -#define __LD9040_H_ - -void ld9040_cfg_ldo(void); -void ld9040_enable_ldo(unsigned int onoff); - -#endif /* __LD9040_H_ */ -- cgit v1.2.3 From 6b9a829d2734d952dd6f7716a8fbd517ea373f0c Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 16 Oct 2022 15:53:35 -0600 Subject: video: Drop atmel LCD code This has not been migrated to DM_VIDEO since 2019. Drop it. Signed-off-by: Simon Glass --- include/configs/sama5d3xek.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include') diff --git a/include/configs/sama5d3xek.h b/include/configs/sama5d3xek.h index b48e40bee44..ccb3842c1c2 100644 --- a/include/configs/sama5d3xek.h +++ b/include/configs/sama5d3xek.h @@ -25,9 +25,6 @@ */ #define ATMEL_PMC_UHP (1 << 6) -/* board specific (not enough SRAM) */ -#define CONFIG_SAMA5D3_LCD_BASE 0x23E00000 - /* NOR flash */ #ifdef CONFIG_MTD_NOR_FLASH #define CONFIG_SYS_FLASH_BASE 0x10000000 -- cgit v1.2.3 From 365e52dd25d17618c00ecc55151f8947be55a850 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 16 Oct 2022 15:54:35 -0600 Subject: video: samsung: Drop old LCD code This relies on the old LCD implementation which is to be removed. Drop it. Signed-off-by: Simon Glass --- include/libtizen.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'include') diff --git a/include/libtizen.h b/include/libtizen.h index 655d4cb28c5..15e01454b93 100644 --- a/include/libtizen.h +++ b/include/libtizen.h @@ -9,8 +9,4 @@ #define HD_RESOLUTION 0 -#ifdef CONFIG_LCD -void get_tizen_logo_info(vidinfo_t *vid); -#endif - #endif /* _LIBTIZEN_H_ */ -- cgit v1.2.3 From baefc721921d0ee2f30996fda260de1965148aee Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 18 Oct 2022 06:10:04 -0600 Subject: tegra: Drop old LCD code This relies on the old LCD implementation which is to be removed. Drop it. Signed-off-by: Simon Glass --- include/configs/tegra-common-post.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/configs/tegra-common-post.h b/include/configs/tegra-common-post.h index c8f9d7cb175..823b5d63d01 100644 --- a/include/configs/tegra-common-post.h +++ b/include/configs/tegra-common-post.h @@ -37,12 +37,6 @@ #define STDIN_KBD_USB "" #endif -#ifdef CONFIG_LCD -#define STDOUT_LCD ",lcd" -#else -#define STDOUT_LCD "" -#endif - #ifdef CONFIG_DM_VIDEO #define STDOUT_VIDEO ",vidconsole" #else @@ -57,8 +51,8 @@ #define TEGRA_DEVICE_SETTINGS \ "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC "\0" \ - "stdout=serial" STDOUT_LCD STDOUT_VIDEO "\0" \ - "stderr=serial" STDOUT_LCD STDOUT_VIDEO "\0" \ + "stdout=serial" STDOUT_VIDEO "\0" \ + "stderr=serial" STDOUT_VIDEO "\0" \ "" #ifndef BOARD_EXTRA_ENV_SETTINGS -- cgit v1.2.3 From c31e0c62b14d0fc651d31c93863fe6a421a3f78a Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 16 Oct 2022 15:56:56 -0600 Subject: BuR: ronetix: siemens: Drop old LCD code This relies on the old LCD implementation which is to be removed. Drop it. Signed-off-by: Simon Glass --- include/configs/pxm2.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'include') diff --git a/include/configs/pxm2.h b/include/configs/pxm2.h index 4f24b13f500..586a7edcbb5 100644 --- a/include/configs/pxm2.h +++ b/include/configs/pxm2.h @@ -18,11 +18,6 @@ #define DDR_IOCTRL_VAL 0x18b #define DDR_PLL_FREQ 266 -#define BOARD_DFU_BUTTON_GPIO 59 -#define BOARD_LCD_POWER 111 -#define BOARD_BACK_LIGHT 112 -#define BOARD_TOUCH_POWER 57 - #define CONFIG_ENV_SETTINGS_BUTTONS_AND_LEDS \ "button_dfu0=59\0" \ "led0=117,0,1\0" \ -- cgit v1.2.3 From 0f9b86f811f9062a01329ebb060c0e719256c43e Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 16 Oct 2022 15:59:22 -0600 Subject: video: Drop remaining references to CONFIG_LCD These rely on the old LCD implementation which is to be removed. Drop it all. Signed-off-by: Simon Glass --- include/asm-generic/global_data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 2d55fe2ac0f..8ca93ac5269 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -68,7 +68,7 @@ struct global_data { * @mem_clk: memory clock rate in Hz */ unsigned long mem_clk; -#if defined(CONFIG_LCD) || defined(CONFIG_DM_VIDEO) +#if defined(CONFIG_DM_VIDEO) /** * @fb_base: base address of frame buffer memory */ -- cgit v1.2.3 From 9876b5e0ef305d17d77a1ee9c0d6be6fdda22d79 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 18 Oct 2022 06:55:49 -0600 Subject: video: Drop LCD_BPP This is used by the old LCD implementation which is to be removed. Drop it and LCD_OUTPUT_BPP also. Signed-off-by: Simon Glass --- include/configs/at91sam9261ek.h | 7 ------- include/configs/at91sam9263ek.h | 7 ------- include/configs/at91sam9m10g45ek.h | 5 ----- include/configs/at91sam9n12ek.h | 5 ----- include/configs/at91sam9rlek.h | 7 ------- include/configs/brxre1.h | 4 ---- include/configs/pm9261.h | 7 ------- include/configs/pm9263.h | 6 ------ include/configs/s5pc210_universal.h | 3 --- include/configs/trats.h | 3 --- include/configs/trats2.h | 3 --- 11 files changed, 57 deletions(-) (limited to 'include') diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h index 12726c10bd6..5576a5ffbe4 100644 --- a/include/configs/at91sam9261ek.h +++ b/include/configs/at91sam9261ek.h @@ -16,13 +16,6 @@ #include -/* - * Hardware drivers - */ - -/* LCD */ -#define LCD_BPP LCD_COLOR8 - /* SDRAM */ #define CONFIG_SYS_SDRAM_BASE 0x20000000 #define CONFIG_SYS_SDRAM_SIZE 0x04000000 diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h index 8c6d1cd1d9d..02d04d0776b 100644 --- a/include/configs/at91sam9263ek.h +++ b/include/configs/at91sam9263ek.h @@ -22,13 +22,6 @@ #define CONFIG_SYS_AT91_MAIN_CLOCK 16367660 /* 16.367 MHz crystal */ #define CONFIG_SYS_AT91_SLOW_CLOCK 32768 -/* - * Hardware drivers - */ - -/* LCD */ -#define LCD_BPP LCD_COLOR8 - /* SDRAM */ #define CONFIG_SYS_SDRAM_BASE ATMEL_BASE_CS1 #define CONFIG_SYS_SDRAM_SIZE 0x04000000 diff --git a/include/configs/at91sam9m10g45ek.h b/include/configs/at91sam9m10g45ek.h index b55d2e39255..2d257c49831 100644 --- a/include/configs/at91sam9m10g45ek.h +++ b/include/configs/at91sam9m10g45ek.h @@ -14,11 +14,6 @@ #define CONFIG_SYS_AT91_SLOW_CLOCK 32768 #define CONFIG_SYS_AT91_MAIN_CLOCK 12000000 /* from 12 MHz crystal */ -/* general purpose I/O */ - -/* LCD */ -#define LCD_BPP LCD_COLOR8 - /* SDRAM */ #define CONFIG_SYS_SDRAM_BASE 0x70000000 #define CONFIG_SYS_SDRAM_SIZE 0x08000000 diff --git a/include/configs/at91sam9n12ek.h b/include/configs/at91sam9n12ek.h index 4d492988eba..f2ca4f3d0ba 100644 --- a/include/configs/at91sam9n12ek.h +++ b/include/configs/at91sam9n12ek.h @@ -14,11 +14,6 @@ #define CONFIG_SYS_AT91_MAIN_CLOCK 16000000 /* main clock xtal */ /* Misc CPU related */ - -/* LCD */ -#define LCD_BPP LCD_COLOR16 -#define LCD_OUTPUT_BPP 24 - #define CONFIG_SYS_SDRAM_BASE 0x20000000 #define CONFIG_SYS_SDRAM_SIZE 0x08000000 diff --git a/include/configs/at91sam9rlek.h b/include/configs/at91sam9rlek.h index e418edddfbe..bc687fc44d8 100644 --- a/include/configs/at91sam9rlek.h +++ b/include/configs/at91sam9rlek.h @@ -16,13 +16,6 @@ #define CONFIG_SYS_AT91_SLOW_CLOCK 32768 /* slow clock xtal */ #define CONFIG_SYS_AT91_MAIN_CLOCK 12000000 /* main clock xtal */ -/* - * Hardware drivers - */ - -/* LCD */ -#define LCD_BPP LCD_COLOR8 - /* SDRAM */ #define CONFIG_SYS_SDRAM_BASE ATMEL_BASE_CS1 #define CONFIG_SYS_SDRAM_SIZE 0x04000000 diff --git a/include/configs/brxre1.h b/include/configs/brxre1.h index 4d91a776ba8..410b3e641c5 100644 --- a/include/configs/brxre1.h +++ b/include/configs/brxre1.h @@ -14,10 +14,6 @@ #include #include #include -/* ------------------------------------------------------------------------- */ -#define LCD_BPP LCD_COLOR32 - -/* memory */ /* Clock Defines */ #define V_OSCK 26000000 /* Clock output from T2 */ diff --git a/include/configs/pm9261.h b/include/configs/pm9261.h index 797e44f844d..7f9442acbbd 100644 --- a/include/configs/pm9261.h +++ b/include/configs/pm9261.h @@ -124,13 +124,6 @@ AT91_WDT_MR_WDDIS | \ AT91_WDT_MR_WDD(0xfff)) -/* - * Hardware drivers - */ - -/* LCD */ -#define LCD_BPP LCD_COLOR8 - /* SDRAM */ #define PHYS_SDRAM 0x20000000 #define PHYS_SDRAM_SIZE 0x04000000 /* 64 megs */ diff --git a/include/configs/pm9263.h b/include/configs/pm9263.h index bb5bd8b6064..00d159f03cf 100644 --- a/include/configs/pm9263.h +++ b/include/configs/pm9263.h @@ -136,12 +136,6 @@ AT91_WDT_MR_WDDIS | \ AT91_WDT_MR_WDD(0xfff)) -/* - * Hardware drivers - */ -/* LCD */ -#define LCD_BPP LCD_COLOR8 - /* SDRAM */ #define PHYS_SDRAM 0x20000000 #define PHYS_SDRAM_SIZE 0x04000000 /* 64 megs */ diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h index 000dc388ac0..668b52600e8 100644 --- a/include/configs/s5pc210_universal.h +++ b/include/configs/s5pc210_universal.h @@ -111,7 +111,4 @@ int universal_spi_read(void); #define KEY_VOL_DOWN_GPIO EXYNOS4_GPIO_X21 #endif /* __ASSEMBLY__ */ -/* LCD console */ -#define LCD_BPP LCD_COLOR16 - #endif /* __CONFIG_H */ diff --git a/include/configs/trats.h b/include/configs/trats.h index 9e4cd6794cc..ca318687783 100644 --- a/include/configs/trats.h +++ b/include/configs/trats.h @@ -141,7 +141,4 @@ #define KEY_VOL_DOWN_GPIO EXYNOS4_GPIO_X21 #endif /* __ASSEMBLY__ */ -/* LCD console */ -#define LCD_BPP LCD_COLOR16 - #endif /* __CONFIG_H */ diff --git a/include/configs/trats2.h b/include/configs/trats2.h index dc28ded9825..f324ea7ebeb 100644 --- a/include/configs/trats2.h +++ b/include/configs/trats2.h @@ -131,7 +131,4 @@ #define KEY_VOL_DOWN_GPIO EXYNOS4X12_GPIO_X33 #endif /* __ASSEMBLY__ */ -/* LCD console */ -#define LCD_BPP LCD_COLOR16 - #endif /* __CONFIG_H */ -- cgit v1.2.3 From b0c5353c7c2e719da080de210fcfe27a16cdbb88 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 16 Oct 2022 15:25:26 -0600 Subject: video: Drop common LCD implementation This code is no-longer used. Drop it. Signed-off-by: Simon Glass --- include/lcd.h | 207 ---------------------------------------------------------- 1 file changed, 207 deletions(-) delete mode 100644 include/lcd.h (limited to 'include') diff --git a/include/lcd.h b/include/lcd.h deleted file mode 100644 index b4820037b2a..00000000000 --- a/include/lcd.h +++ /dev/null @@ -1,207 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * MPC823 and PXA LCD Controller - * - * Modeled after video interface by Paolo Scaffardi - * - * - * (C) Copyright 2001 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - */ - -#ifndef _LCD_H_ -#define _LCD_H_ -#include -#if defined(CONFIG_CMD_BMP) || defined(CONFIG_SPLASH_SCREEN) -#include -#include -#endif - -int bmp_display(ulong addr, int x, int y); -struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp, - void **alloc_addr); - -#ifndef CONFIG_DM_VIDEO - -extern char lcd_is_enabled; -extern int lcd_line_length; -extern struct vidinfo panel_info; - -void lcd_ctrl_init(void *lcdbase); -void lcd_enable(void); -void lcd_setcolreg(ushort regno, ushort red, ushort green, ushort blue); -ulong lcd_setmem(ulong addr); - -/** - * Set whether we need to flush the dcache when changing the LCD image. This - * defaults to off. - * - * @param flush non-zero to flush cache after update, 0 to skip - */ -void lcd_set_flush_dcache(int flush); - -#if defined(CONFIG_ATMEL_LCD) || defined(CONFIG_ATMEL_HLCD) -#include -#elif defined(CONFIG_EXYNOS_FB) -#include -#else -typedef struct vidinfo { - ushort vl_col; /* Number of columns (i.e. 160) */ - ushort vl_row; /* Number of rows (i.e. 100) */ - ushort vl_rot; /* Rotation of Display (0, 1, 2, 3) */ - u_char vl_bpix; /* Bits per pixel, 0 = 1 */ - ushort *cmap; /* Pointer to the colormap */ - void *priv; /* Pointer to driver-specific data */ -} vidinfo_t; - -static __maybe_unused ushort *configuration_get_cmap(void) -{ - return panel_info.cmap; -} -#endif - -ushort *configuration_get_cmap(void); - -extern vidinfo_t panel_info; - -void lcd_putc(const char c); -void lcd_puts(const char *s); -void lcd_printf(const char *fmt, ...); -void lcd_clear(void); -int lcd_display_bitmap(ulong bmp_image, int x, int y); - -/** - * Get the width of the LCD in pixels - * - * Return: width of LCD in pixels - */ -int lcd_get_pixel_width(void); - -/** - * Get the height of the LCD in pixels - * - * Return: height of LCD in pixels - */ -int lcd_get_pixel_height(void); - -/** - * Get the number of text lines/rows on the LCD - * - * Return: number of rows - */ -int lcd_get_screen_rows(void); - -/** - * Get the number of text columns on the LCD - * - * Return: number of columns - */ -int lcd_get_screen_columns(void); - -/** - * Get the background color of the LCD - * - * Return: background color value - */ -int lcd_getbgcolor(void); - -/** - * Get the foreground color of the LCD - * - * Return: foreground color value - */ -int lcd_getfgcolor(void); - -/** - * Set the position of the text cursor - * - * @param col Column to place cursor (0 = left side) - * @param row Row to place cursor (0 = top line) - */ -void lcd_position_cursor(unsigned col, unsigned row); - -/* Allow boards to customize the information displayed */ -void lcd_show_board_info(void); - -/* Return the size of the LCD frame buffer, and the line length */ -int lcd_get_size(int *line_length); - -/* Update the LCD / flush the cache */ -void lcd_sync(void); - -/* - * Information about displays we are using. This is for configuring - * the LCD controller and memory allocation. Someone has to know what - * is connected, as we can't autodetect anything. - */ -#define CONFIG_SYS_HIGH 0 /* Pins are active high */ -#define CONFIG_SYS_LOW 1 /* Pins are active low */ - -#define LCD_MONOCHROME 0 -#define LCD_COLOR2 1 -#define LCD_COLOR4 2 -#define LCD_COLOR8 3 -#define LCD_COLOR16 4 -#define LCD_COLOR32 5 - -/* Default to 8bpp if bit depth not specified */ -#ifndef LCD_BPP -#define LCD_BPP LCD_COLOR8 -#endif - -#ifndef LCD_DF -#define LCD_DF 1 -#endif - -/* Calculate nr. of bits per pixel and nr. of colors */ -#define NBITS(bit_code) (1 << (bit_code)) -#define NCOLORS(bit_code) (1 << NBITS(bit_code)) - -#if LCD_BPP == LCD_COLOR8 -# define CONSOLE_COLOR_BLACK 0 -# define CONSOLE_COLOR_RED 1 -# define CONSOLE_COLOR_GREEN 2 -# define CONSOLE_COLOR_YELLOW 3 -# define CONSOLE_COLOR_BLUE 4 -# define CONSOLE_COLOR_MAGENTA 5 -# define CONSOLE_COLOR_CYAN 6 -# define CONSOLE_COLOR_GREY 14 -# define CONSOLE_COLOR_WHITE 15 /* Must remain last / highest */ -#elif LCD_BPP == LCD_COLOR32 -#define CONSOLE_COLOR_RED 0x00ff0000 -#define CONSOLE_COLOR_GREEN 0x0000ff00 -#define CONSOLE_COLOR_YELLOW 0x00ffff00 -#define CONSOLE_COLOR_BLUE 0x000000ff -#define CONSOLE_COLOR_MAGENTA 0x00ff00ff -#define CONSOLE_COLOR_CYAN 0x0000ffff -#define CONSOLE_COLOR_GREY 0x00aaaaaa -#define CONSOLE_COLOR_BLACK 0x00000000 -#define CONSOLE_COLOR_WHITE 0x00ffffff /* Must remain last / highest */ -#define NBYTES(bit_code) (NBITS(bit_code) >> 3) -#else /* 16bpp color definitions */ -# define CONSOLE_COLOR_BLACK 0x0000 -# define CONSOLE_COLOR_RED 0xF800 -# define CONSOLE_COLOR_GREEN 0x07E0 -# define CONSOLE_COLOR_YELLOW 0xFFE0 -# define CONSOLE_COLOR_BLUE 0x001F -# define CONSOLE_COLOR_MAGENTA 0xF81F -# define CONSOLE_COLOR_CYAN 0x07FF -# define CONSOLE_COLOR_GREY 0xC618 -# define CONSOLE_COLOR_WHITE 0xffff /* Must remain last / highest */ -#endif /* color definitions */ - -#if LCD_BPP == LCD_COLOR16 -#define fbptr_t ushort -#elif LCD_BPP == LCD_COLOR32 -#define fbptr_t u32 -#else -#define fbptr_t uchar -#endif - -#ifndef PAGE_SIZE -#define PAGE_SIZE 4096 -#endif - -#endif /* !CONFIG_DM_VIDEO */ - -#endif /* _LCD_H_ */ -- cgit v1.2.3 From eaf707552862ec2778a920870096d16f9fc03ab2 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 18 Oct 2022 07:30:25 -0600 Subject: video: Drop SPLASHIMAGE_CALLBACK This is not used anymore. Drop it. Signed-off-by: Simon Glass --- include/env_callback.h | 7 ------- 1 file changed, 7 deletions(-) (limited to 'include') diff --git a/include/env_callback.h b/include/env_callback.h index d5d2b2fcad6..1eae0efca2e 100644 --- a/include/env_callback.h +++ b/include/env_callback.h @@ -24,12 +24,6 @@ #define SILENT_CALLBACK #endif -#ifdef CONFIG_SPLASHIMAGE_GUARD -#define SPLASHIMAGE_CALLBACK "splashimage:splashimage," -#else -#define SPLASHIMAGE_CALLBACK -#endif - #ifdef CONFIG_REGEX #define ENV_DOT_ESCAPE "\\" #else @@ -74,7 +68,6 @@ BOOTSTD_CALLBACK \ "loadaddr:loadaddr," \ SILENT_CALLBACK \ - SPLASHIMAGE_CALLBACK \ "stdin:console,stdout:console,stderr:console," \ "serial#:serialno," \ CONFIG_ENV_CALLBACK_LIST_STATIC -- cgit v1.2.3 From b86986c7b314f1378ca5be8df49310a6ce7302f8 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 18 Oct 2022 07:46:31 -0600 Subject: video: Rename CONFIG_DM_VIDEO to CONFIG_VIDEO Now that all the old code is gone, rename this option. Driver model migration is now complete. Signed-off-by: Simon Glass --- include/asm-generic/global_data.h | 4 ++-- include/configs/colibri-imx6ull.h | 2 +- include/configs/imxrt1050-evk.h | 2 +- include/configs/meson64.h | 2 +- include/configs/pico-imx6ul.h | 4 +--- include/configs/sunxi-common.h | 2 +- include/configs/tegra-common-post.h | 2 +- 7 files changed, 8 insertions(+), 10 deletions(-) (limited to 'include') diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 8ca93ac5269..c4b2bb44973 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -68,7 +68,7 @@ struct global_data { * @mem_clk: memory clock rate in Hz */ unsigned long mem_clk; -#if defined(CONFIG_DM_VIDEO) +#if defined(CONFIG_VIDEO) /** * @fb_base: base address of frame buffer memory */ @@ -359,7 +359,7 @@ struct global_data { */ struct membuff console_in; #endif -#ifdef CONFIG_DM_VIDEO +#ifdef CONFIG_VIDEO /** * @video_top: top of video frame buffer area */ diff --git a/include/configs/colibri-imx6ull.h b/include/configs/colibri-imx6ull.h index 79b1284cc7a..321edabe984 100644 --- a/include/configs/colibri-imx6ull.h +++ b/include/configs/colibri-imx6ull.h @@ -137,7 +137,7 @@ /* USB Device Firmware Update support */ #define DFU_DEFAULT_POLL_TIMEOUT 300 -#if defined(CONFIG_DM_VIDEO) +#if defined(CONFIG_VIDEO) #define MXS_LCDIF_BASE MX6UL_LCDIF1_BASE_ADDR #endif diff --git a/include/configs/imxrt1050-evk.h b/include/configs/imxrt1050-evk.h index e36718dc825..d1a7dab37c5 100644 --- a/include/configs/imxrt1050-evk.h +++ b/include/configs/imxrt1050-evk.h @@ -18,7 +18,7 @@ #define DMAMEM_BASE (PHYS_SDRAM + PHYS_SDRAM_SIZE - \ DMAMEM_SZ_ALL) -#ifdef CONFIG_DM_VIDEO +#ifdef CONFIG_VIDEO #define CONFIG_EXTRA_ENV_SETTINGS \ "stdin=serial\0" \ "stdout=serial,vidconsole\0" \ diff --git a/include/configs/meson64.h b/include/configs/meson64.h index 40803ee9da1..0c41df2a957 100644 --- a/include/configs/meson64.h +++ b/include/configs/meson64.h @@ -17,7 +17,7 @@ #endif /* For splashscreen */ -#ifdef CONFIG_DM_VIDEO +#ifdef CONFIG_VIDEO #define STDOUT_CFG "vidconsole,serial" #else #define STDOUT_CFG "serial" diff --git a/include/configs/pico-imx6ul.h b/include/configs/pico-imx6ul.h index 2ac48c40c96..c0d837d7c51 100644 --- a/include/configs/pico-imx6ul.h +++ b/include/configs/pico-imx6ul.h @@ -102,9 +102,7 @@ #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE -/* environment organization */ - -#ifdef CONFIG_DM_VIDEO +#ifdef CONFIG_VIDEO #define MXS_LCDIF_BASE MX6UL_LCDIF1_BASE_ADDR #endif diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index fe90d55bd45..12666b7818b 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -301,7 +301,7 @@ "stdin=serial\0" #endif -#ifdef CONFIG_DM_VIDEO +#ifdef CONFIG_VIDEO #define CONSOLE_STDOUT_SETTINGS \ "stdout=serial,vidconsole\0" \ "stderr=serial,vidconsole\0" diff --git a/include/configs/tegra-common-post.h b/include/configs/tegra-common-post.h index 823b5d63d01..4e20e1d1984 100644 --- a/include/configs/tegra-common-post.h +++ b/include/configs/tegra-common-post.h @@ -37,7 +37,7 @@ #define STDIN_KBD_USB "" #endif -#ifdef CONFIG_DM_VIDEO +#ifdef CONFIG_VIDEO #define STDOUT_VIDEO ",vidconsole" #else #define STDOUT_VIDEO "" -- cgit v1.2.3