All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/23] video: Support a U-Boot logo more easily
@ 2021-11-19 20:23 Simon Glass
  2021-11-19 20:23 ` [PATCH 01/23] sandbox: video: Support 8bpp depth Simon Glass
                   ` (22 more replies)
  0 siblings, 23 replies; 41+ messages in thread
From: Simon Glass @ 2021-11-19 20:23 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Anatolij Gustschin, Tom Rini, Simon Glass, Adrian Alonso,
	Alison Wang, Alistair Delva, Alper Nebi Yasak, Andy Shevchenko,
	Baruch Siach, Bin Meng, Eric Bénard, Fabio Estevam,
	Giulio Benetti, Harald Seiler, Heiko Schocher,
	Heinrich Schuchardt, Jaehoon Chung, Jagan Teki, Jason Liu,
	Marcel Ziswiler, Marek Behún, Marek Vasut, Nikita Kiryanov,
	Olaf Mandel, Otavio Salvador, Ovidiu Panait, Pali Rohár,
	Patrice Chotard, Patrick Delaunay, Peng Fan, Priyanka Jain,
	Rasmus Villemoes, Richard Hu, Rick Chen, Roger Pau Monne,
	Samuel Egli, Sean Anderson, Soeren Moch, Stefan Bosch,
	Stefan Reinauer, Stefan Roese, Stefano Babic, Steffen Jaeckel,
	Sébastien Szymanski, Tero Kristo, Tim Harvey,
	Vadim Bendebury, Vanessa Maegima, uboot-stm32

At present it is possible to show a logo on the display but it requires
some board configuration and an image.

This series aims to make this easier, by showing a logo automatically if
there is a display but no splash screen.

The logo is embedded in U-Boot and takes approximately 7KB of space.

Some fixes to the sandbox display support are provided, to make it more
robust and to allow running tests with different display depths. Support
for 8bpp depths is added, to enable more tests.

This series also includes a lot of improvements to BMP (Windows Bitmap)
support:

- support for drawing to depths other than 16bpp
- tests for the different types of supported BMP images

For theadorable there is a potentially breaking change to consider.

This series also enables a logo to be shown when running coreboot via
qemu, providing a script to help with that.


Simon Glass (23):
  sandbox: video: Support 8bpp depth
  video: sandbox: Avoid duplicate display windows
  console: Avoid serial output before the console is running
  video: sandbox: Set a maximum frame-buffer size
  sandbox: video: Correct the address of the copy base
  sandbox: video: Add BMP tests for 32bpp and 8bpp modes
  video: Expand video debugging buffer size
  sandbox: Enable support for the gzip command
  video: Drop fb_put_byte() el at
  video: Move BMP pixel-writing into a function
  video: bmp: Update RLE8 support to use the write function
  video: Drop the uclass colour map
  video: Tidy up 24/32 BMP blitting
  video: Add a test for 16bpp BMP files
  video: theadorable: Use RGB565 for BMP blitting
  video: Drop #ifdefs from video_bmp
  video: Convert CONFIG_VIDEO_LOGO to Kconfig
  video: Drop VIDEO_LOGO from cfb_console
  video: Support showing the U-Boot logo
  video: Show the U-Boot logo by default
  video: Support virtio devices with the splash screen
  x86: coreboot: Support getting a logo from virtio
  x86: coreboot: Add a sample script to build a qemu image

 .gitattributes                         |   1 +
 README                                 |   1 -
 arch/sandbox/cpu/sdl.c                 |  98 +++++++-
 arch/sandbox/include/asm/sdl.h         |   7 +
 arch/sandbox/include/asm/test.h        |  18 ++
 board/coreboot/coreboot/coreboot.c     |  20 +-
 cmd/unzip.c                            |   4 +-
 common/console.c                       |   6 +-
 common/splash.c                        |   2 +-
 common/splash_source.c                 |  14 ++
 configs/apalis_imx6_defconfig          |   1 +
 configs/aristainetos2c_defconfig       |   1 +
 configs/aristainetos2ccslb_defconfig   |   1 +
 configs/cm_fx6_defconfig               |   1 +
 configs/colibri-imx6ull-emmc_defconfig |   1 +
 configs/colibri-imx6ull_defconfig      |   1 +
 configs/colibri_imx6_defconfig         |   1 +
 configs/colibri_imx7_defconfig         |   1 +
 configs/colibri_imx7_emmc_defconfig    |   1 +
 configs/colibri_vf_defconfig           |   1 +
 configs/gurnard_defconfig              |   1 +
 configs/gwventana_emmc_defconfig       |   1 +
 configs/gwventana_gw5904_defconfig     |   1 +
 configs/gwventana_nand_defconfig       |   1 +
 configs/imx6dl_icore_nand_defconfig    |   1 +
 configs/imx6q_icore_nand_defconfig     |   1 +
 configs/imx6qdl_icore_mmc_defconfig    |   1 +
 configs/imx6qdl_icore_nand_defconfig   |   1 +
 configs/imxrt1050-evk_defconfig        |   1 +
 configs/m53menlo_defconfig             |   1 +
 configs/marsboard_defconfig            |   1 +
 configs/mx6cuboxi_defconfig            |   1 +
 configs/mx6sabreauto_defconfig         |   1 +
 configs/mx6sabresd_defconfig           |   1 +
 configs/mx6ul_14x14_evk_defconfig      |   1 +
 configs/mx6ul_9x9_evk_defconfig        |   1 +
 configs/novena_defconfig               |   1 +
 configs/opos6uldev_defconfig           |   1 +
 configs/pico-dwarf-imx7d_defconfig     |   1 +
 configs/pico-hobbit-imx7d_defconfig    |   1 +
 configs/pico-imx6_defconfig            |   1 +
 configs/pico-imx6ul_defconfig          |   1 +
 configs/pico-imx7d_bl33_defconfig      |   1 +
 configs/pico-imx7d_defconfig           |   1 +
 configs/pico-nymph-imx7d_defconfig     |   1 +
 configs/pico-pi-imx7d_defconfig        |   1 +
 configs/riotboard_defconfig            |   1 +
 configs/s5p4418_nanopi2_defconfig      |   1 +
 configs/sandbox_defconfig              |   2 +
 configs/sandbox_flattree_defconfig     |   2 +
 configs/tbs2910_defconfig              |   1 +
 configs/wandboard_defconfig            |   1 +
 drivers/video/Kconfig                  |  11 +
 drivers/video/Makefile                 |   3 +
 drivers/video/cfb_console.c            | 325 +------------------------
 drivers/video/console_truetype.c       |  21 ++
 drivers/video/sandbox_sdl.c            |  77 +++++-
 drivers/video/u_boot_logo.bmp          | Bin 0 -> 6932 bytes
 drivers/video/video-uclass.c           |  35 +--
 drivers/video/video_bmp.c              | 249 +++++++++----------
 include/configs/T102xRDB.h             |   1 -
 include/configs/T104xRDB.h             |   1 -
 include/configs/apalis_imx6.h          |   1 -
 include/configs/aristainetos2.h        |   1 -
 include/configs/cm_fx6.h               |   1 -
 include/configs/colibri-imx6ull.h      |   1 -
 include/configs/colibri_imx6.h         |   1 -
 include/configs/colibri_imx7.h         |   1 -
 include/configs/colibri_vf.h           |   1 -
 include/configs/coreboot.h             |   3 +
 include/configs/embestmx6boards.h      |   1 -
 include/configs/gw_ventana.h           |   1 -
 include/configs/imx6-engicam.h         |   1 -
 include/configs/imxrt1050-evk.h        |   1 -
 include/configs/ls1021aqds.h           |   1 -
 include/configs/ls1021atwr.h           |   1 -
 include/configs/m53menlo.h             |   1 -
 include/configs/mx23evk.h              |   1 -
 include/configs/mx28evk.h              |   1 -
 include/configs/mx51evk.h              |   1 -
 include/configs/mx53loco.h             |   1 -
 include/configs/mx6cuboxi.h            |   1 -
 include/configs/mx6sabre_common.h      |   1 -
 include/configs/mx6sxsabresd.h         |   1 -
 include/configs/mx6ul_14x14_evk.h      |   1 -
 include/configs/mx7dsabresd.h          |   1 -
 include/configs/nokia_rx51.h           |   1 -
 include/configs/novena.h               |   1 -
 include/configs/opos6uldev.h           |   1 -
 include/configs/pico-imx6.h            |   1 -
 include/configs/pico-imx6ul.h          |   1 -
 include/configs/pico-imx7d.h           |   1 -
 include/configs/pxm2.h                 |   1 -
 include/configs/rut.h                  |   1 -
 include/configs/s5p4418_nanopi2.h      |   2 -
 include/configs/wandboard.h            |   1 -
 include/configs/x86-common.h           |   6 +-
 include/splash.h                       |   1 +
 include/video.h                        |   4 +-
 include/virtio.h                       |   1 +
 scripts/Makefile.lib                   |  21 ++
 scripts/build-cb.sh                    |  19 ++
 scripts/config_whitelist.txt           |   1 -
 test/dm/video.c                        | 189 +++++++++++++-
 tools/logos/denx-16bpp.bmp.gz          | Bin 0 -> 4516 bytes
 tools/logos/denx-24bpp.bmp.gz          | Bin 0 -> 7137 bytes
 106 files changed, 678 insertions(+), 539 deletions(-)
 create mode 100644 drivers/video/u_boot_logo.bmp
 create mode 100755 scripts/build-cb.sh
 create mode 100644 tools/logos/denx-16bpp.bmp.gz
 create mode 100644 tools/logos/denx-24bpp.bmp.gz

-- 
2.34.0.rc2.393.gf8c9666880-goog


^ permalink raw reply	[flat|nested] 41+ messages in thread

* [PATCH 01/23] sandbox: video: Support 8bpp depth
  2021-11-19 20:23 [PATCH 00/23] video: Support a U-Boot logo more easily Simon Glass
@ 2021-11-19 20:23 ` Simon Glass
  2021-11-19 20:23 ` [PATCH 02/23] video: sandbox: Avoid duplicate display windows Simon Glass
                   ` (21 subsequent siblings)
  22 siblings, 0 replies; 41+ messages in thread
From: Simon Glass @ 2021-11-19 20:23 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Anatolij Gustschin, Tom Rini, Simon Glass, Harald Seiler

At present sandbox only supports 16 and 32bpp depths, since those are the
easy ones with SDL.

We can support other depths by manually converting the pixel formats. Add
support for this, to enable an 8ppp (monochrome) format.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 arch/sandbox/cpu/sdl.c      | 65 ++++++++++++++++++++++++++++++++++---
 drivers/video/sandbox_sdl.c | 23 +++++++++----
 2 files changed, 77 insertions(+), 11 deletions(-)

diff --git a/arch/sandbox/cpu/sdl.c b/arch/sandbox/cpu/sdl.c
index bef5abd039d..7ff0df2ee54 100644
--- a/arch/sandbox/cpu/sdl.c
+++ b/arch/sandbox/cpu/sdl.c
@@ -44,6 +44,8 @@ struct buf_info {
  * @stopping: true if audio will stop once it runs out of data
  * @texture: SDL texture to use for U-Boot display contents
  * @renderer: SDL renderer to use
+ * @src_depth: Number of bits per pixel in the source frame buffer (that we read
+ * from and render to SDL)
  */
 static struct sdl_info {
 	int width;
@@ -61,6 +63,7 @@ static struct sdl_info {
 	bool stopping;
 	SDL_Texture *texture;
 	SDL_Renderer *renderer;
+	int src_depth;
 } sdl;
 
 static void sandbox_sdl_poll_events(void)
@@ -126,6 +129,9 @@ int sandbox_sdl_init_display(int width, int height, int log2_bpp,
 	if (!SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "1"))
 		printf("Unable to init hinting: %s", SDL_GetError());
 
+	sdl.src_depth = 1 << log2_bpp;
+	if (log2_bpp != 4 && log2_bpp != 5)
+		log2_bpp = 5;
 	sdl.depth = 1 << log2_bpp;
 	sdl.pitch = sdl.width * sdl.depth / 8;
 	SDL_Window *screen = SDL_CreateWindow("U-Boot", SDL_WINDOWPOS_UNDEFINED,
@@ -137,10 +143,6 @@ int sandbox_sdl_init_display(int width, int height, int log2_bpp,
 		       SDL_GetError());
 		return -EIO;
 	}
-	if (log2_bpp != 4 && log2_bpp != 5) {
-		printf("U-Boot SDL does not support depth %d\n", log2_bpp);
-		return -EINVAL;
-	}
 	sdl.renderer = SDL_CreateRenderer(screen, -1,
 					  SDL_RENDERER_ACCELERATED |
 					  SDL_RENDERER_PRESENTVSYNC);
@@ -165,6 +167,55 @@ int sandbox_sdl_init_display(int width, int height, int log2_bpp,
 	return 0;
 }
 
+static int copy_to_texture(void *lcd_base)
+{
+	char *dest;
+	int pitch, x, y;
+	int src_pitch;
+	void *pixels;
+	char *src;
+	int ret;
+
+	if (sdl.src_depth == sdl.depth) {
+		SDL_UpdateTexture(sdl.texture, NULL, lcd_base, sdl.pitch);
+		return 0;
+	}
+
+	/*
+	 * We only support copying from an 8bpp to a 32bpp texture since the
+	 * other cases are supported directly by the texture.
+	 */
+	if (sdl.depth != 32 && sdl.src_depth != 8) {
+		printf("Need depth 32bpp for copy\n");
+		return -EINVAL;
+	}
+
+	ret = SDL_LockTexture(sdl.texture, NULL, &pixels, &pitch);
+	if (ret) {
+		printf("SDL lock %d: %s\n", ret, SDL_GetError());
+		return ret;
+	}
+
+	/* Copy the pixels one by one */
+	src_pitch = sdl.width * sdl.src_depth / 8;
+	for (y = 0; y < sdl.height; y++) {
+		char val;
+
+		dest = pixels + y * pitch;
+		src = lcd_base + src_pitch * y;
+		for (x = 0; x < sdl.width; x++, dest += 4) {
+			val = *src++;
+			dest[0] = val;
+			dest[1] = val;
+			dest[2] = val;
+			dest[3] = 0;
+		}
+	}
+	SDL_UnlockTexture(sdl.texture);
+
+	return 0;
+}
+
 int sandbox_sdl_sync(void *lcd_base)
 {
 	struct SDL_Rect rect;
@@ -173,7 +224,11 @@ int sandbox_sdl_sync(void *lcd_base)
 	if (!sdl.texture)
 		return 0;
 	SDL_RenderClear(sdl.renderer);
-	SDL_UpdateTexture(sdl.texture, NULL, lcd_base, sdl.pitch);
+	ret = copy_to_texture(lcd_base);
+	if (ret) {
+		printf("copy_to_texture: %d: %s\n", ret, SDL_GetError());
+		return -EIO;
+	}
 	ret = SDL_RenderCopy(sdl.renderer, sdl.texture, NULL, NULL);
 	if (ret) {
 		printf("SDL copy %d: %s\n", ret, SDL_GetError());
diff --git a/drivers/video/sandbox_sdl.c b/drivers/video/sandbox_sdl.c
index 5956b59ce49..32739de4feb 100644
--- a/drivers/video/sandbox_sdl.c
+++ b/drivers/video/sandbox_sdl.c
@@ -48,22 +48,33 @@ static int sandbox_sdl_probe(struct udevice *dev)
 	return 0;
 }
 
-static int sandbox_sdl_bind(struct udevice *dev)
+static void set_bpp(struct udevice *dev, enum video_log2_bpp l2bpp)
 {
 	struct video_uc_plat *uc_plat = dev_get_uclass_plat(dev);
 	struct sandbox_sdl_plat *plat = dev_get_plat(dev);
-	int ret = 0;
 
-	plat->xres = dev_read_u32_default(dev, "xres", LCD_MAX_WIDTH);
-	plat->yres = dev_read_u32_default(dev, "yres", LCD_MAX_HEIGHT);
-	plat->bpix = dev_read_u32_default(dev, "log2-depth", VIDEO_BPP16);
-	plat->rot = dev_read_u32_default(dev, "rotate", 0);
+	plat->bpix = l2bpp;
+
 	uc_plat->size = plat->xres * plat->yres * (1 << plat->bpix) / 8;
 
 	/* Allow space for two buffers, the lower one being the copy buffer */
 	log_debug("Frame buffer size %x\n", uc_plat->size);
 	if (IS_ENABLED(CONFIG_VIDEO_COPY))
 		uc_plat->size *= 2;
+}
+
+static int sandbox_sdl_bind(struct udevice *dev)
+{
+	struct sandbox_sdl_plat *plat = dev_get_plat(dev);
+	enum video_log2_bpp l2bpp;
+	int ret = 0;
+
+	plat->xres = dev_read_u32_default(dev, "xres", LCD_MAX_WIDTH);
+	plat->yres = dev_read_u32_default(dev, "yres", LCD_MAX_HEIGHT);
+	l2bpp = dev_read_u32_default(dev, "log2-depth", VIDEO_BPP16);
+	plat->rot = dev_read_u32_default(dev, "rotate", 0);
+
+	set_bpp(dev, l2bpp);
 
 	return ret;
 }
-- 
2.34.0.rc2.393.gf8c9666880-goog


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 02/23] video: sandbox: Avoid duplicate display windows
  2021-11-19 20:23 [PATCH 00/23] video: Support a U-Boot logo more easily Simon Glass
  2021-11-19 20:23 ` [PATCH 01/23] sandbox: video: Support 8bpp depth Simon Glass
@ 2021-11-19 20:23 ` Simon Glass
  2021-11-19 20:23 ` [PATCH 03/23] console: Avoid serial output before the console is running Simon Glass
                   ` (20 subsequent siblings)
  22 siblings, 0 replies; 41+ messages in thread
From: Simon Glass @ 2021-11-19 20:23 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Anatolij Gustschin, Tom Rini, Simon Glass, Harald Seiler

When unit tests are run they currently create a new window. Update the
code so that the old one is removed first. This avoids the confusion as to
which one is active.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 arch/sandbox/cpu/sdl.c         | 33 +++++++++++++++++++++++++++------
 arch/sandbox/include/asm/sdl.h |  7 +++++++
 drivers/video/sandbox_sdl.c    | 15 +++++++++++++++
 3 files changed, 49 insertions(+), 6 deletions(-)

diff --git a/arch/sandbox/cpu/sdl.c b/arch/sandbox/cpu/sdl.c
index 7ff0df2ee54..f4ca36b35c8 100644
--- a/arch/sandbox/cpu/sdl.c
+++ b/arch/sandbox/cpu/sdl.c
@@ -44,6 +44,7 @@ struct buf_info {
  * @stopping: true if audio will stop once it runs out of data
  * @texture: SDL texture to use for U-Boot display contents
  * @renderer: SDL renderer to use
+ * @screen: SDL window to use
  * @src_depth: Number of bits per pixel in the source frame buffer (that we read
  * from and render to SDL)
  */
@@ -63,6 +64,7 @@ static struct sdl_info {
 	bool stopping;
 	SDL_Texture *texture;
 	SDL_Renderer *renderer;
+	SDL_Window *screen;
 	int src_depth;
 } sdl;
 
@@ -101,6 +103,23 @@ static int sandbox_sdl_ensure_init(void)
 	return 0;
 }
 
+int sandbox_sdl_remove_display(void)
+{
+	if (!sdl.renderer) {
+		printf("SDL renderer does not exist\n");
+		return -ENOENT;
+	}
+
+	SDL_DestroyTexture(sdl.texture);
+	SDL_DestroyRenderer(sdl.renderer);
+	SDL_DestroyWindow(sdl.screen);
+	sdl.texture = NULL;
+	sdl.renderer = NULL;
+	sdl.screen = NULL;
+
+	return 0;
+}
+
 int sandbox_sdl_init_display(int width, int height, int log2_bpp,
 			     bool double_size)
 {
@@ -112,6 +131,9 @@ int sandbox_sdl_init_display(int width, int height, int log2_bpp,
 	err = sandbox_sdl_ensure_init();
 	if (err)
 		return err;
+	if (sdl.renderer)
+		sandbox_sdl_remove_display();
+
 	if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0) {
 		printf("Unable to initialise SDL LCD: %s\n", SDL_GetError());
 		return -EPERM;
@@ -134,16 +156,15 @@ int sandbox_sdl_init_display(int width, int height, int log2_bpp,
 		log2_bpp = 5;
 	sdl.depth = 1 << log2_bpp;
 	sdl.pitch = sdl.width * sdl.depth / 8;
-	SDL_Window *screen = SDL_CreateWindow("U-Boot", SDL_WINDOWPOS_UNDEFINED,
-					      SDL_WINDOWPOS_UNDEFINED,
-					      sdl.vis_width, sdl.vis_height,
-					      SDL_WINDOW_RESIZABLE);
-	if (!screen) {
+	sdl.screen = SDL_CreateWindow("U-Boot", SDL_WINDOWPOS_UNDEFINED,
+				      SDL_WINDOWPOS_UNDEFINED, sdl.vis_width,
+				      sdl.vis_height, SDL_WINDOW_RESIZABLE);
+	if (!sdl.screen) {
 		printf("Unable to initialise SDL screen: %s\n",
 		       SDL_GetError());
 		return -EIO;
 	}
-	sdl.renderer = SDL_CreateRenderer(screen, -1,
+	sdl.renderer = SDL_CreateRenderer(sdl.screen, -1,
 					  SDL_RENDERER_ACCELERATED |
 					  SDL_RENDERER_PRESENTVSYNC);
 	if (!sdl.renderer) {
diff --git a/arch/sandbox/include/asm/sdl.h b/arch/sandbox/include/asm/sdl.h
index 47fc4889d20..25dbdb59442 100644
--- a/arch/sandbox/include/asm/sdl.h
+++ b/arch/sandbox/include/asm/sdl.h
@@ -25,6 +25,13 @@
 int sandbox_sdl_init_display(int width, int height, int log2_bpp,
 			     bool double_size);
 
+/**
+ * sandbox_sdl_remove_display() - Remove the SDL screen
+ *
+ * @return 0 if OK, -ENOENT if the SDL had not been inited.
+ */
+int sandbox_sdl_remove_display(void);
+
 /**
  * sandbox_sdl_sync() - Sync current U-Boot LCD frame buffer to SDL
  *
diff --git a/drivers/video/sandbox_sdl.c b/drivers/video/sandbox_sdl.c
index 32739de4feb..6e430b28244 100644
--- a/drivers/video/sandbox_sdl.c
+++ b/drivers/video/sandbox_sdl.c
@@ -63,6 +63,20 @@ static void set_bpp(struct udevice *dev, enum video_log2_bpp l2bpp)
 		uc_plat->size *= 2;
 }
 
+static int sandbox_sdl_remove(struct udevice *dev)
+{
+	/*
+	 * Removing the display it a bit annoying when running unit tests, since
+	 * they remove all devices. It is nice to be able to see what the test
+	 * wrote onto the display. So this comment is just here to show how to
+	 * do it, if we want to make it optional one day.
+	 *
+	 * sandbox_sdl_remove_display();
+	 */
+
+	return 0;
+}
+
 static int sandbox_sdl_bind(struct udevice *dev)
 {
 	struct sandbox_sdl_plat *plat = dev_get_plat(dev);
@@ -90,5 +104,6 @@ U_BOOT_DRIVER(sandbox_lcd_sdl) = {
 	.of_match = sandbox_sdl_ids,
 	.bind	= sandbox_sdl_bind,
 	.probe	= sandbox_sdl_probe,
+	.remove	= sandbox_sdl_remove,
 	.plat_auto	= sizeof(struct sandbox_sdl_plat),
 };
-- 
2.34.0.rc2.393.gf8c9666880-goog


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 03/23] console: Avoid serial output before the console is running
  2021-11-19 20:23 [PATCH 00/23] video: Support a U-Boot logo more easily Simon Glass
  2021-11-19 20:23 ` [PATCH 01/23] sandbox: video: Support 8bpp depth Simon Glass
  2021-11-19 20:23 ` [PATCH 02/23] video: sandbox: Avoid duplicate display windows Simon Glass
@ 2021-11-19 20:23 ` Simon Glass
  2021-11-19 20:23 ` [PATCH 04/23] video: sandbox: Set a maximum frame-buffer size Simon Glass
                   ` (19 subsequent siblings)
  22 siblings, 0 replies; 41+ messages in thread
From: Simon Glass @ 2021-11-19 20:23 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Anatolij Gustschin, Tom Rini, Simon Glass, Andy Shevchenko,
	Patrick Delaunay, Sean Anderson, Steffen Jaeckel

The video driver uses this for debugging, but if used before relocation it
crashes at present. Avoid trying to output debugging before the console is
ready.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 common/console.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/common/console.c b/common/console.c
index 0013d183aeb..a9d3319977f 100644
--- a/common/console.c
+++ b/common/console.c
@@ -348,7 +348,8 @@ static void console_puts_select(int file, bool serial_only, const char *s)
 
 void console_puts_select_stderr(bool serial_only, const char *s)
 {
-	console_puts_select(stderr, serial_only, s);
+	if (gd->flags & GD_FLG_DEVINIT)
+		console_puts_select(stderr, serial_only, s);
 }
 
 static void console_puts(int file, const char *s)
@@ -401,7 +402,8 @@ static inline void console_putc(int file, const char c)
 
 void console_puts_select(int file, bool serial_only, const char *s)
 {
-	if (serial_only == console_dev_is_serial(stdio_devices[file]))
+	if ((gd->flags & GD_FLG_DEVINIT) &&
+	    serial_only == console_dev_is_serial(stdio_devices[file]))
 		stdio_devices[file]->puts(stdio_devices[file], s);
 }
 
-- 
2.34.0.rc2.393.gf8c9666880-goog


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 04/23] video: sandbox: Set a maximum frame-buffer size
  2021-11-19 20:23 [PATCH 00/23] video: Support a U-Boot logo more easily Simon Glass
                   ` (2 preceding siblings ...)
  2021-11-19 20:23 ` [PATCH 03/23] console: Avoid serial output before the console is running Simon Glass
@ 2021-11-19 20:23 ` Simon Glass
  2021-11-19 20:23 ` [PATCH 05/23] sandbox: video: Correct the address of the copy base Simon Glass
                   ` (18 subsequent siblings)
  22 siblings, 0 replies; 41+ messages in thread
From: Simon Glass @ 2021-11-19 20:23 UTC (permalink / raw)
  To: U-Boot Mailing List; +Cc: Anatolij Gustschin, Tom Rini, Simon Glass

If U-Boot starts with the frame buffer set to 16bpp but then runs a test
that uses 32bpp, there is not enough space. Update the driver to use the
maximum possible frame-buffer size, to avoid this.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/video/sandbox_sdl.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/drivers/video/sandbox_sdl.c b/drivers/video/sandbox_sdl.c
index 6e430b28244..de8c6609c46 100644
--- a/drivers/video/sandbox_sdl.c
+++ b/drivers/video/sandbox_sdl.c
@@ -55,10 +55,26 @@ static void set_bpp(struct udevice *dev, enum video_log2_bpp l2bpp)
 
 	plat->bpix = l2bpp;
 
-	uc_plat->size = plat->xres * plat->yres * (1 << plat->bpix) / 8;
+	uc_plat->size = plat->xres * plat->yres * VNBYTES(plat->bpix);
+
+	/*
+	 * Set up to the maximum size we'll ever need. This is a strange case.
+	 * The video memory is allocated by video_post_bind() called from
+	 * board_init_r(). If a test changes the reoslution so it needs more
+	 * memory later (with sandbox_sdl_set_bpp()), it is too late to make
+	 * the frame buffer larger.
+	 *
+	 * So use a maximum size here.
+	 */
+	uc_plat->size = max(uc_plat->size, 1920U * 1080 * VNBYTES(VIDEO_BPP32));
 
 	/* Allow space for two buffers, the lower one being the copy buffer */
 	log_debug("Frame buffer size %x\n", uc_plat->size);
+
+	/*
+	 * If a copy framebuffer is used, double the size and use the last half
+	 * as the copy, with the first half as the normal frame buffer.
+	 */
 	if (IS_ENABLED(CONFIG_VIDEO_COPY))
 		uc_plat->size *= 2;
 }
-- 
2.34.0.rc2.393.gf8c9666880-goog


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 05/23] sandbox: video: Correct the address of the copy base
  2021-11-19 20:23 [PATCH 00/23] video: Support a U-Boot logo more easily Simon Glass
                   ` (3 preceding siblings ...)
  2021-11-19 20:23 ` [PATCH 04/23] video: sandbox: Set a maximum frame-buffer size Simon Glass
@ 2021-11-19 20:23 ` Simon Glass
  2021-11-19 20:23 ` [PATCH 06/23] sandbox: video: Add BMP tests for 32bpp and 8bpp modes Simon Glass
                   ` (17 subsequent siblings)
  22 siblings, 0 replies; 41+ messages in thread
From: Simon Glass @ 2021-11-19 20:23 UTC (permalink / raw)
  To: U-Boot Mailing List; +Cc: Anatolij Gustschin, Tom Rini, Simon Glass

The intention is for the copy base to start halfway through the
frame-buffer area. At present is it actually below the frame buffer,
which could have anything in it (probably it is malloc space). Fix
this.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/video/sandbox_sdl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/sandbox_sdl.c b/drivers/video/sandbox_sdl.c
index de8c6609c46..eb321ad17f5 100644
--- a/drivers/video/sandbox_sdl.c
+++ b/drivers/video/sandbox_sdl.c
@@ -43,7 +43,7 @@ static int sandbox_sdl_probe(struct udevice *dev)
 	uc_priv->vidconsole_drv_name = plat->vidconsole_drv_name;
 	uc_priv->font_size = plat->font_size;
 	if (IS_ENABLED(CONFIG_VIDEO_COPY))
-		uc_plat->copy_base = uc_plat->base - uc_plat->size / 2;
+		uc_plat->copy_base = uc_plat->base + uc_plat->size / 2;
 
 	return 0;
 }
-- 
2.34.0.rc2.393.gf8c9666880-goog


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 06/23] sandbox: video: Add BMP tests for 32bpp and 8bpp modes
  2021-11-19 20:23 [PATCH 00/23] video: Support a U-Boot logo more easily Simon Glass
                   ` (4 preceding siblings ...)
  2021-11-19 20:23 ` [PATCH 05/23] sandbox: video: Correct the address of the copy base Simon Glass
@ 2021-11-19 20:23 ` Simon Glass
  2021-11-19 20:23 ` [PATCH 07/23] video: Expand video debugging buffer size Simon Glass
                   ` (16 subsequent siblings)
  22 siblings, 0 replies; 41+ messages in thread
From: Simon Glass @ 2021-11-19 20:23 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Anatolij Gustschin, Tom Rini, Simon Glass, Alper Nebi Yasak,
	Ovidiu Panait

Add a few more tests for BMP rendering. Use a back door into the sandbox
SDL driver to adjust the resolution at runtime.

The truetype code does not support 8bpp. Add this so that the display is
not blank when running in this mode.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 arch/sandbox/include/asm/test.h  | 18 +++++++++++++++
 drivers/video/console_truetype.c | 21 ++++++++++++++++++
 drivers/video/sandbox_sdl.c      | 19 +++++++++++++++-
 test/dm/video.c                  | 38 ++++++++++++++++++++++++++++++++
 4 files changed, 95 insertions(+), 1 deletion(-)

diff --git a/arch/sandbox/include/asm/test.h b/arch/sandbox/include/asm/test.h
index dab1a4ea01b..0aad827e9c6 100644
--- a/arch/sandbox/include/asm/test.h
+++ b/arch/sandbox/include/asm/test.h
@@ -8,6 +8,8 @@
 #ifndef __ASM_TEST_H
 #define __ASM_TEST_H
 
+#include <video.h>
+
 /* The sandbox driver always permits an I2C device with this address */
 #define SANDBOX_I2C_TEST_ADDR		0x59
 
@@ -285,4 +287,20 @@ void sandbox_cros_ec_set_test_flags(struct udevice *dev, uint flags);
  */
 int sandbox_cros_ec_get_pwm_duty(struct udevice *dev, uint index, uint *duty);
 
+/**
+ * sandbox_sdl_set_bpp() - Set the depth of the sandbox display
+ *
+ * The device must not be active when this function is called. It activiates it
+ * before returning.
+ *
+ * This updates the depth value and adjusts a few other settings accordingly.
+ * It must be called before the display is probed.
+ *
+ * @dev: Device to adjust
+ * @l2bpp: depth to set
+ * @return 0 if the device was already active, other error if it fails to probe
+ * after the change
+ */
+int sandbox_sdl_set_bpp(struct udevice *dev, enum video_log2_bpp l2bpp);
+
 #endif
diff --git a/drivers/video/console_truetype.c b/drivers/video/console_truetype.c
index 98427f4c618..de8b86bbacc 100644
--- a/drivers/video/console_truetype.c
+++ b/drivers/video/console_truetype.c
@@ -274,6 +274,27 @@ static int console_truetype_putc_xy(struct udevice *dev, uint x, uint y,
 	 */
 	for (row = 0; row < height; row++) {
 		switch (vid_priv->bpix) {
+		case VIDEO_BPP8:
+			if (IS_ENABLED(CONFIG_VIDEO_BPP8)) {
+				u8 *dst = line + xoff;
+				int i;
+
+				for (i = 0; i < width; i++) {
+					int val = *bits;
+					int out;
+
+					if (vid_priv->colour_bg)
+						val = 255 - val;
+					out = val;
+					if (vid_priv->colour_fg)
+						*dst++ |= out;
+					else
+						*dst++ &= out;
+					bits++;
+				}
+				end = dst;
+			}
+			break;
 #ifdef CONFIG_VIDEO_BPP16
 		case VIDEO_BPP16: {
 			uint16_t *dst = (uint16_t *)line + xoff;
diff --git a/drivers/video/sandbox_sdl.c b/drivers/video/sandbox_sdl.c
index eb321ad17f5..2afe66fab1a 100644
--- a/drivers/video/sandbox_sdl.c
+++ b/drivers/video/sandbox_sdl.c
@@ -12,6 +12,7 @@
 #include <asm/sdl.h>
 #include <asm/state.h>
 #include <asm/u-boot-sandbox.h>
+#include <dm/device-internal.h>
 #include <dm/test.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -79,6 +80,23 @@ static void set_bpp(struct udevice *dev, enum video_log2_bpp l2bpp)
 		uc_plat->size *= 2;
 }
 
+int sandbox_sdl_set_bpp(struct udevice *dev, enum video_log2_bpp l2bpp)
+{
+	int ret;
+
+	if (device_active(dev))
+		return -EINVAL;
+	sandbox_sdl_remove_display();
+
+	set_bpp(dev, l2bpp);
+
+	ret = device_probe(dev);
+	if (ret)
+		return ret;
+
+	return 0;
+}
+
 static int sandbox_sdl_remove(struct udevice *dev)
 {
 	/*
@@ -89,7 +107,6 @@ static int sandbox_sdl_remove(struct udevice *dev)
 	 *
 	 * sandbox_sdl_remove_display();
 	 */
-
 	return 0;
 }
 
diff --git a/test/dm/video.c b/test/dm/video.c
index da0ae3622f7..c8c6668c8b3 100644
--- a/test/dm/video.c
+++ b/test/dm/video.c
@@ -13,6 +13,7 @@
 #include <os.h>
 #include <video.h>
 #include <video_console.h>
+#include <asm/test.h>
 #include <dm/test.h>
 #include <dm/uclass-internal.h>
 #include <test/test.h>
@@ -319,6 +320,43 @@ static int dm_test_video_bmp(struct unit_test_state *uts)
 }
 DM_TEST(dm_test_video_bmp, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
 
+/* Test drawing a bitmap file on a 8bpp display */
+static int dm_test_video_bmp8(struct unit_test_state *uts)
+{
+	struct udevice *dev;
+	ulong addr;
+
+	ut_assertok(uclass_find_first_device(UCLASS_VIDEO, &dev));
+	ut_assertnonnull(dev);
+	ut_assertok(sandbox_sdl_set_bpp(dev, VIDEO_BPP8));
+
+	ut_assertok(read_file(uts, "tools/logos/denx.bmp", &addr));
+
+	ut_assertok(video_bmp_display(dev, addr, 0, 0, false));
+	ut_asserteq(1247, compress_frame_buffer(uts, dev));
+
+	return 0;
+}
+DM_TEST(dm_test_video_bmp8, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
+
+/* Test drawing a bitmap file on a 32bpp display */
+static int dm_test_video_bmp32(struct unit_test_state *uts)
+{
+	struct udevice *dev;
+	ulong addr;
+
+	ut_assertok(uclass_find_first_device(UCLASS_VIDEO, &dev));
+	ut_assertnonnull(dev);
+	ut_assertok(sandbox_sdl_set_bpp(dev, VIDEO_BPP32));
+	ut_assertok(read_file(uts, "tools/logos/denx.bmp", &addr));
+
+	ut_assertok(video_bmp_display(dev, addr, 0, 0, false));
+	ut_asserteq(2024, compress_frame_buffer(uts, dev));
+
+	return 0;
+}
+DM_TEST(dm_test_video_bmp32, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
+
 /* Test drawing a compressed bitmap file */
 static int dm_test_video_bmp_comp(struct unit_test_state *uts)
 {
-- 
2.34.0.rc2.393.gf8c9666880-goog


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 07/23] video: Expand video debugging buffer size
  2021-11-19 20:23 [PATCH 00/23] video: Support a U-Boot logo more easily Simon Glass
                   ` (5 preceding siblings ...)
  2021-11-19 20:23 ` [PATCH 06/23] sandbox: video: Add BMP tests for 32bpp and 8bpp modes Simon Glass
@ 2021-11-19 20:23 ` Simon Glass
  2021-11-19 20:23 ` [PATCH 08/23] sandbox: Enable support for the gzip command Simon Glass
                   ` (15 subsequent siblings)
  22 siblings, 0 replies; 41+ messages in thread
From: Simon Glass @ 2021-11-19 20:23 UTC (permalink / raw)
  To: U-Boot Mailing List; +Cc: Anatolij Gustschin, Tom Rini, Simon Glass

On sandbox these addresses are 16 hex digits log so we need more space
for the debug string. Update it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/video/video-uclass.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index 9f8cf6ef2a9..2435a29b556 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -265,10 +265,10 @@ int video_sync_copy(struct udevice *dev, void *from, void *to)
 		 */
 		if (offset < -priv->fb_size || offset > 2 * priv->fb_size) {
 #ifdef DEBUG
-			char str[80];
+			char str[120];
 
 			snprintf(str, sizeof(str),
-				 "[sync_copy fb=%p, from=%p, to=%p, offset=%lx]",
+				 "[** FAULT sync_copy fb=%p, from=%p, to=%p, offset=%lx]",
 				 priv->fb, from, to, offset);
 			console_puts_select_stderr(true, str);
 #endif
-- 
2.34.0.rc2.393.gf8c9666880-goog


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 08/23] sandbox: Enable support for the gzip command
  2021-11-19 20:23 [PATCH 00/23] video: Support a U-Boot logo more easily Simon Glass
                   ` (6 preceding siblings ...)
  2021-11-19 20:23 ` [PATCH 07/23] video: Expand video debugging buffer size Simon Glass
@ 2021-11-19 20:23 ` Simon Glass
  2021-11-19 20:23 ` [PATCH 09/23] video: Drop fb_put_byte() el at Simon Glass
                   ` (14 subsequent siblings)
  22 siblings, 0 replies; 41+ messages in thread
From: Simon Glass @ 2021-11-19 20:23 UTC (permalink / raw)
  To: U-Boot Mailing List; +Cc: Anatolij Gustschin, Tom Rini, Simon Glass

This does not work with sandbox at present. Fix it up to use map_sysmem()
to convert an address to a pointer.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 cmd/unzip.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/cmd/unzip.c b/cmd/unzip.c
index 3d1f5f3ac10..bc6cee06043 100644
--- a/cmd/unzip.c
+++ b/cmd/unzip.c
@@ -8,6 +8,7 @@
 #include <command.h>
 #include <env.h>
 #include <gzip.h>
+#include <mapmem.h>
 #include <part.h>
 
 static int do_unzip(struct cmd_tbl *cmdtp, int flag, int argc,
@@ -28,7 +29,8 @@ static int do_unzip(struct cmd_tbl *cmdtp, int flag, int argc,
 			return CMD_RET_USAGE;
 	}
 
-	if (gunzip((void *) dst, dst_len, (void *) src, &src_len) != 0)
+	if (gunzip(map_sysmem(dst, dst_len), dst_len, map_sysmem(src, 0),
+		   &src_len) != 0)
 		return 1;
 
 	printf("Uncompressed size: %lu = 0x%lX\n", src_len, src_len);
-- 
2.34.0.rc2.393.gf8c9666880-goog


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 09/23] video: Drop fb_put_byte() el at
  2021-11-19 20:23 [PATCH 00/23] video: Support a U-Boot logo more easily Simon Glass
                   ` (7 preceding siblings ...)
  2021-11-19 20:23 ` [PATCH 08/23] sandbox: Enable support for the gzip command Simon Glass
@ 2021-11-19 20:23 ` Simon Glass
  2021-11-19 20:23 ` [PATCH 10/23] video: Move BMP pixel-writing into a function Simon Glass
                   ` (13 subsequent siblings)
  22 siblings, 0 replies; 41+ messages in thread
From: Simon Glass @ 2021-11-19 20:23 UTC (permalink / raw)
  To: U-Boot Mailing List; +Cc: Anatolij Gustschin, Tom Rini, Simon Glass

These functions are not used with driver model, nor in any U-Boot boards.
Drop them and inline the code.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/video/video_bmp.c | 22 +++++-----------------
 1 file changed, 5 insertions(+), 17 deletions(-)

diff --git a/drivers/video/video_bmp.c b/drivers/video/video_bmp.c
index 1e6f07ff4b0..7b3e15b7094 100644
--- a/drivers/video/video_bmp.c
+++ b/drivers/video/video_bmp.c
@@ -127,19 +127,6 @@ static void video_display_rle8_bitmap(struct udevice *dev,
 }
 #endif
 
-__weak void fb_put_byte(uchar **fb, uchar **from)
-{
-	*(*fb)++ = *(*from)++;
-}
-
-#if defined(CONFIG_BMP_16BPP)
-__weak void fb_put_word(uchar **fb, uchar **from)
-{
-	*(*fb)++ = *(*from)++;
-	*(*fb)++ = *(*from)++;
-}
-#endif /* CONFIG_BMP_16BPP */
-
 /**
  * video_splash_align_axis() - Align a single coordinate
  *
@@ -295,7 +282,7 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y,
 			WATCHDOG_RESET();
 			for (j = 0; j < width; j++) {
 				if (bpix == 8) {
-					fb_put_byte(&fb, &bmap);
+					*fb++ = *bmap++;
 				} else if (bpix == 16) {
 					*(uint16_t *)fb = cmap_base[*bmap];
 					bmap++;
@@ -325,9 +312,10 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y,
 	case 16:
 		for (i = 0; i < height; ++i) {
 			WATCHDOG_RESET();
-			for (j = 0; j < width; j++)
-				fb_put_word(&fb, &bmap);
-
+			for (j = 0; j < width; j++) {
+				*fb++ = *bmap++;
+				*fb++ = *bmap++;
+			}
 			bmap += (padded_width - width);
 			fb -= width * 2 + priv->line_length;
 		}
-- 
2.34.0.rc2.393.gf8c9666880-goog


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 10/23] video: Move BMP pixel-writing into a function
  2021-11-19 20:23 [PATCH 00/23] video: Support a U-Boot logo more easily Simon Glass
                   ` (8 preceding siblings ...)
  2021-11-19 20:23 ` [PATCH 09/23] video: Drop fb_put_byte() el at Simon Glass
@ 2021-11-19 20:23 ` Simon Glass
  2021-11-19 20:23 ` [PATCH 11/23] video: bmp: Update RLE8 support to use the write function Simon Glass
                   ` (12 subsequent siblings)
  22 siblings, 0 replies; 41+ messages in thread
From: Simon Glass @ 2021-11-19 20:23 UTC (permalink / raw)
  To: U-Boot Mailing List; +Cc: Anatolij Gustschin, Tom Rini, Simon Glass

At present the code that writes to a pixel is quite convoluted. It uses a
colour map which is in the uclass and the same code is repeated in
different places within video_bmp_display().

As a first step, create a function which can write a pixel from the
bitmap, no matter what the display depth. Use any provided palette
directly, rather than using the uclass version.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/video/video_bmp.c | 75 +++++++++++++++++++++++++++------------
 1 file changed, 52 insertions(+), 23 deletions(-)

diff --git a/drivers/video/video_bmp.c b/drivers/video/video_bmp.c
index 7b3e15b7094..8d152c894cb 100644
--- a/drivers/video/video_bmp.c
+++ b/drivers/video/video_bmp.c
@@ -13,12 +13,60 @@
 #include <watchdog.h>
 #include <asm/unaligned.h>
 
-#ifdef CONFIG_VIDEO_BMP_RLE8
 #define BMP_RLE8_ESCAPE		0
 #define BMP_RLE8_EOL		0
 #define BMP_RLE8_EOBMP		1
 #define BMP_RLE8_DELTA		2
 
+/**
+ * get_bmp_col_16bpp() - Convert a colour-table entry into a 16bpp pixel value
+ *
+ * @return value to write to the 16bpp frame buffer for this palette entry
+ */
+static uint get_bmp_col_16bpp(struct bmp_color_table_entry cte)
+{
+	return ((cte.red   << 8) & 0xf800) |
+		((cte.green << 3) & 0x07e0) |
+		((cte.blue  >> 3) & 0x001f);
+}
+
+/**
+ * write_pix8() - Write a pixel from a BMP image into the framebuffer
+ *
+ * This handles frame buffers with 8, 16, 24 or 32 bits per pixel
+ *
+ * @fb: Place in frame buffer to update
+ * @bpix: Frame buffer bits-per-pixel, which controls how many bytes are written
+ * @palette: BMP palette table
+ * @bmap: Pointer to BMP bitmap position to write. This contains a single byte
+ *	which is either written directly (bpix == 8) or used to look up the
+ *	palette to get a colour to write
+ */
+static void write_pix8(u8 *fb, uint bpix, struct bmp_color_table_entry *palette,
+		       u8 *bmap)
+{
+	if (bpix == 8) {
+		*fb++ = *bmap;
+	} else if (bpix == 16) {
+		*(u16 *)fb = get_bmp_col_16bpp(palette[*bmap]);
+	} else {
+		/* Only support big endian */
+		struct bmp_color_table_entry *cte = &palette[*bmap];
+
+		if (bpix == 24) {
+			*fb++ = cte->red;
+			*fb++ = cte->green;
+			*fb++ = cte->blue;
+		} else {
+			*fb++ = cte->blue;
+			*fb++ = cte->green;
+			*fb++ = cte->red;
+			*fb++ = 0;
+		}
+	}
+}
+
+#ifdef CONFIG_VIDEO_BMP_RLE8
 static void draw_unencoded_bitmap(ushort **fbp, uchar *bmap, ushort *cmap,
 				  int cnt)
 {
@@ -258,7 +306,6 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y,
 	switch (bmp_bpix) {
 	case 1:
 	case 8: {
-		struct bmp_color_table_entry *cte;
 		cmap_base = priv->cmap;
 #ifdef CONFIG_VIDEO_BMP_RLE8
 		u32 compression = get_unaligned_le32(&bmp->header.compression);
@@ -281,27 +328,9 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y,
 		for (i = 0; i < height; ++i) {
 			WATCHDOG_RESET();
 			for (j = 0; j < width; j++) {
-				if (bpix == 8) {
-					*fb++ = *bmap++;
-				} else if (bpix == 16) {
-					*(uint16_t *)fb = cmap_base[*bmap];
-					bmap++;
-					fb += sizeof(uint16_t) / sizeof(*fb);
-				} else {
-					/* Only support big endian */
-					cte = &palette[*bmap];
-					bmap++;
-					if (bpix == 24) {
-						*(fb++) = cte->red;
-						*(fb++) = cte->green;
-						*(fb++) = cte->blue;
-					} else {
-						*(fb++) = cte->blue;
-						*(fb++) = cte->green;
-						*(fb++) = cte->red;
-						*(fb++) = 0;
-					}
-				}
+				write_pix8(fb, bpix, palette, bmap);
+				bmap++;
+				fb += bpix / 8;
 			}
 			bmap += (padded_width - width);
 			fb -= byte_width + priv->line_length;
-- 
2.34.0.rc2.393.gf8c9666880-goog


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 11/23] video: bmp: Update RLE8 support to use the write function
  2021-11-19 20:23 [PATCH 00/23] video: Support a U-Boot logo more easily Simon Glass
                   ` (9 preceding siblings ...)
  2021-11-19 20:23 ` [PATCH 10/23] video: Move BMP pixel-writing into a function Simon Glass
@ 2021-11-19 20:23 ` Simon Glass
  2021-11-19 20:23 ` [PATCH 12/23] video: Drop the uclass colour map Simon Glass
                   ` (11 subsequent siblings)
  22 siblings, 0 replies; 41+ messages in thread
From: Simon Glass @ 2021-11-19 20:23 UTC (permalink / raw)
  To: U-Boot Mailing List; +Cc: Anatolij Gustschin, Tom Rini, Simon Glass

Update this code to use write_pix8() rather than writing the pixels only
for a single supported display depth. This allows us to support any
depth.

Add some more tests too.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/video/video_bmp.c | 49 +++++++++++++++++++++------------------
 test/dm/video.c           | 38 ++++++++++++++++++++++++++++++
 2 files changed, 65 insertions(+), 22 deletions(-)

diff --git a/drivers/video/video_bmp.c b/drivers/video/video_bmp.c
index 8d152c894cb..2a3536c7907 100644
--- a/drivers/video/video_bmp.c
+++ b/drivers/video/video_bmp.c
@@ -67,28 +67,37 @@ static void write_pix8(u8 *fb, uint bpix, struct bmp_color_table_entry *palette,
 }
 
 #ifdef CONFIG_VIDEO_BMP_RLE8
-static void draw_unencoded_bitmap(ushort **fbp, uchar *bmap, ushort *cmap,
+static void draw_unencoded_bitmap(u8 **fbp, uint bpix, uchar *bmap,
+				  struct bmp_color_table_entry *palette,
 				  int cnt)
 {
+	u8 *fb = *fbp;
+
 	while (cnt > 0) {
-		*(*fbp)++ = cmap[*bmap++];
+		write_pix8(fb, bpix, palette, bmap++);
+		fb += bpix / 8;
 		cnt--;
 	}
+	*fbp = fb;
 }
 
-static void draw_encoded_bitmap(ushort **fbp, ushort col, int cnt)
+static void draw_encoded_bitmap(u8 **fbp, uint bpix,
+				struct bmp_color_table_entry *palette, u8 *bmap,
+				int cnt)
 {
-	ushort *fb = *fbp;
+	u8 *fb = *fbp;
 
 	while (cnt > 0) {
-		*fb++ = col;
+		write_pix8(fb, bpix, palette, bmap);
+		fb += bpix / 8;
 		cnt--;
 	}
 	*fbp = fb;
 }
 
 static void video_display_rle8_bitmap(struct udevice *dev,
-				      struct bmp_image *bmp, ushort *cmap,
+				      struct bmp_image *bmp, uint bpix,
+				      struct bmp_color_table_entry *palette,
 				      uchar *fb, int x_off, int y_off,
 				      ulong width, ulong height)
 {
@@ -97,6 +106,7 @@ static void video_display_rle8_bitmap(struct udevice *dev,
 	ulong cnt, runlen;
 	int x, y;
 	int decode = 1;
+	uint bytes_per_pixel = bpix / 8;
 
 	debug("%s\n", __func__);
 	bmap = (uchar *)bmp + get_unaligned_le32(&bmp->header.data_offset);
@@ -112,8 +122,8 @@ static void video_display_rle8_bitmap(struct udevice *dev,
 				bmap += 2;
 				x = 0;
 				y--;
-				/* 16bpix, 2-byte per pixel, width should *2 */
-				fb -= (width * 2 + priv->line_length);
+				fb -= width * bytes_per_pixel +
+					priv->line_length;
 				break;
 			case BMP_RLE8_EOBMP:
 				/* end of bitmap */
@@ -123,9 +133,9 @@ static void video_display_rle8_bitmap(struct udevice *dev,
 				/* delta run */
 				x += bmap[2];
 				y -= bmap[3];
-				/* 16bpix, 2-byte per pixel, x should *2 */
-				fb = (uchar *)(priv->fb + (y + y_off - 1)
-					* priv->line_length + (x + x_off) * 2);
+				fb = (uchar *)(priv->fb +
+					(y + y_off - 1) * priv->line_length +
+					(x + x_off) * bytes_per_pixel);
 				bmap += 4;
 				break;
 			default:
@@ -139,8 +149,8 @@ static void video_display_rle8_bitmap(struct udevice *dev,
 						else
 							cnt = runlen;
 						draw_unencoded_bitmap(
-							(ushort **)&fb,
-							bmap, cmap, cnt);
+							&fb, bpix,
+							bmap, palette, cnt);
 					}
 					x += runlen;
 				}
@@ -164,8 +174,8 @@ static void video_display_rle8_bitmap(struct udevice *dev,
 						cnt = width - x;
 					else
 						cnt = runlen;
-					draw_encoded_bitmap((ushort **)&fb,
-						cmap[bmap[1]], cnt);
+					draw_encoded_bitmap(&fb, bpix, palette,
+							    &bmap[1], cnt);
 				}
 				x += runlen;
 			}
@@ -311,13 +321,8 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y,
 		u32 compression = get_unaligned_le32(&bmp->header.compression);
 		debug("compressed %d %d\n", compression, BMP_BI_RLE8);
 		if (compression == BMP_BI_RLE8) {
-			if (bpix != 16) {
-				/* TODO implement render code for bpix != 16 */
-				printf("Error: only support 16 bpix");
-				return -EPROTONOSUPPORT;
-			}
-			video_display_rle8_bitmap(dev, bmp, cmap_base, fb, x,
-						  y, width, height);
+			video_display_rle8_bitmap(dev, bmp, bpix, palette, fb,
+						  x, y, width, height);
 			break;
 		}
 #endif
diff --git a/test/dm/video.c b/test/dm/video.c
index c8c6668c8b3..d5648f0c59b 100644
--- a/test/dm/video.c
+++ b/test/dm/video.c
@@ -373,6 +373,44 @@ static int dm_test_video_bmp_comp(struct unit_test_state *uts)
 }
 DM_TEST(dm_test_video_bmp_comp, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
 
+/* Test drawing a bitmap file on a 32bpp display */
+static int dm_test_video_comp_bmp32(struct unit_test_state *uts)
+{
+	struct udevice *dev;
+	ulong addr;
+
+	ut_assertok(uclass_find_first_device(UCLASS_VIDEO, &dev));
+	ut_assertnonnull(dev);
+	ut_assertok(sandbox_sdl_set_bpp(dev, VIDEO_BPP32));
+
+	ut_assertok(read_file(uts, "tools/logos/denx.bmp", &addr));
+
+	ut_assertok(video_bmp_display(dev, addr, 0, 0, false));
+	ut_asserteq(2024, compress_frame_buffer(uts, dev));
+
+	return 0;
+}
+DM_TEST(dm_test_video_comp_bmp32, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
+
+/* Test drawing a bitmap file on a 8bpp display */
+static int dm_test_video_comp_bmp8(struct unit_test_state *uts)
+{
+	struct udevice *dev;
+	ulong addr;
+
+	ut_assertok(uclass_find_first_device(UCLASS_VIDEO, &dev));
+	ut_assertnonnull(dev);
+	ut_assertok(sandbox_sdl_set_bpp(dev, VIDEO_BPP8));
+
+	ut_assertok(read_file(uts, "tools/logos/denx.bmp", &addr));
+
+	ut_assertok(video_bmp_display(dev, addr, 0, 0, false));
+	ut_asserteq(1247, compress_frame_buffer(uts, dev));
+
+	return 0;
+}
+DM_TEST(dm_test_video_comp_bmp8, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
+
 /* Test TrueType console */
 static int dm_test_video_truetype(struct unit_test_state *uts)
 {
-- 
2.34.0.rc2.393.gf8c9666880-goog


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 12/23] video: Drop the uclass colour map
  2021-11-19 20:23 [PATCH 00/23] video: Support a U-Boot logo more easily Simon Glass
                   ` (10 preceding siblings ...)
  2021-11-19 20:23 ` [PATCH 11/23] video: bmp: Update RLE8 support to use the write function Simon Glass
@ 2021-11-19 20:23 ` Simon Glass
  2021-11-19 20:23 ` [PATCH 13/23] video: Tidy up 24/32 BMP blitting Simon Glass
                   ` (10 subsequent siblings)
  22 siblings, 0 replies; 41+ messages in thread
From: Simon Glass @ 2021-11-19 20:23 UTC (permalink / raw)
  To: U-Boot Mailing List; +Cc: Anatolij Gustschin, Tom Rini, Simon Glass

We don't need this anymore since we use the BMP palette directly. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/video/video-uclass.c | 23 -----------------------
 drivers/video/video_bmp.c    | 22 ----------------------
 include/video.h              |  2 --
 3 files changed, 47 deletions(-)

diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index 2435a29b556..fafd05e373f 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -305,27 +305,6 @@ int video_sync_copy_all(struct udevice *dev)
 
 #endif
 
-/* Set up the colour map */
-static int video_pre_probe(struct udevice *dev)
-{
-	struct video_priv *priv = dev_get_uclass_priv(dev);
-
-	priv->cmap = calloc(256, sizeof(ushort));
-	if (!priv->cmap)
-		return -ENOMEM;
-
-	return 0;
-}
-
-static int video_pre_remove(struct udevice *dev)
-{
-	struct video_priv *priv = dev_get_uclass_priv(dev);
-
-	free(priv->cmap);
-
-	return 0;
-}
-
 /* Set up the display ready for use */
 static int video_post_probe(struct udevice *dev)
 {
@@ -433,9 +412,7 @@ UCLASS_DRIVER(video) = {
 	.name		= "video",
 	.flags		= DM_UC_FLAG_SEQ_ALIAS,
 	.post_bind	= video_post_bind,
-	.pre_probe	= video_pre_probe,
 	.post_probe	= video_post_probe,
-	.pre_remove	= video_pre_remove,
 	.priv_auto	= sizeof(struct video_uc_priv),
 	.per_device_auto	= sizeof(struct video_priv),
 	.per_device_plat_auto	= sizeof(struct video_uc_plat),
diff --git a/drivers/video/video_bmp.c b/drivers/video/video_bmp.c
index 2a3536c7907..466c0f54363 100644
--- a/drivers/video/video_bmp.c
+++ b/drivers/video/video_bmp.c
@@ -214,28 +214,10 @@ static void video_splash_align_axis(int *axis, unsigned long panel_size,
 	*axis = max(0, (int)axis_alignment);
 }
 
-static void video_set_cmap(struct udevice *dev,
-			   struct bmp_color_table_entry *cte, unsigned colours)
-{
-	struct video_priv *priv = dev_get_uclass_priv(dev);
-	int i;
-	ushort *cmap = priv->cmap;
-
-	debug("%s: colours=%d\n", __func__, colours);
-	for (i = 0; i < colours; ++i) {
-		*cmap = ((cte->red   << 8) & 0xf800) |
-			((cte->green << 3) & 0x07e0) |
-			((cte->blue  >> 3) & 0x001f);
-		cmap++;
-		cte++;
-	}
-}
-
 int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y,
 		      bool align)
 {
 	struct video_priv *priv = dev_get_uclass_priv(dev);
-	ushort *cmap_base = NULL;
 	int i, j;
 	uchar *start, *fb;
 	struct bmp_image *bmp = map_sysmem(bmp_image, 0);
@@ -291,9 +273,6 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y,
 	debug("Display-bmp: %d x %d  with %d colours, display %d\n",
 	      (int)width, (int)height, (int)colours, 1 << bpix);
 
-	if (bmp_bpix == 8)
-		video_set_cmap(dev, palette, colours);
-
 	padded_width = (width & 0x3 ? (width & ~0x3) + 4 : width);
 
 	if (align) {
@@ -316,7 +295,6 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y,
 	switch (bmp_bpix) {
 	case 1:
 	case 8: {
-		cmap_base = priv->cmap;
 #ifdef CONFIG_VIDEO_BMP_RLE8
 		u32 compression = get_unaligned_le32(&bmp->header.compression);
 		debug("compressed %d %d\n", compression, BMP_BI_RLE8);
diff --git a/include/video.h b/include/video.h
index f14fb15f84f..6948cdf5796 100644
--- a/include/video.h
+++ b/include/video.h
@@ -93,7 +93,6 @@ enum video_format {
  * @colour_bg:	Background colour (pixel value)
  * @flush_dcache:	true to enable flushing of the data cache after
  *		the LCD is updated
- * @cmap:	Colour map for 8-bit-per-pixel displays
  * @fg_col_idx:	Foreground color code (bit 3 = bold, bit 0-2 = color)
  * @bg_col_idx:	Background color code (bit 3 = bold, bit 0-2 = color)
  */
@@ -118,7 +117,6 @@ struct video_priv {
 	u32 colour_fg;
 	u32 colour_bg;
 	bool flush_dcache;
-	ushort *cmap;
 	u8 fg_col_idx;
 	u8 bg_col_idx;
 };
-- 
2.34.0.rc2.393.gf8c9666880-goog


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 13/23] video: Tidy up 24/32 BMP blitting
  2021-11-19 20:23 [PATCH 00/23] video: Support a U-Boot logo more easily Simon Glass
                   ` (11 preceding siblings ...)
  2021-11-19 20:23 ` [PATCH 12/23] video: Drop the uclass colour map Simon Glass
@ 2021-11-19 20:23 ` Simon Glass
  2021-11-19 20:23 ` [PATCH 14/23] video: Add a test for 16bpp BMP files Simon Glass
                   ` (9 subsequent siblings)
  22 siblings, 0 replies; 41+ messages in thread
From: Simon Glass @ 2021-11-19 20:23 UTC (permalink / raw)
  To: U-Boot Mailing List; +Cc: Anatolij Gustschin, Tom Rini, Simon Glass

Drop the unnecessary brackets.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/video/video_bmp.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/video/video_bmp.c b/drivers/video/video_bmp.c
index 466c0f54363..ba36589effb 100644
--- a/drivers/video/video_bmp.c
+++ b/drivers/video/video_bmp.c
@@ -345,10 +345,10 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y,
 					bmap += 3;
 					fb += 2;
 				} else {
-					*(fb++) = *(bmap++);
-					*(fb++) = *(bmap++);
-					*(fb++) = *(bmap++);
-					*(fb++) = 0;
+					*fb++ = *bmap++;
+					*fb++ = *bmap++;
+					*fb++ = *bmap++;
+					*fb++ = 0;
 				}
 			}
 			fb -= priv->line_length + width * (bpix / 8);
@@ -360,10 +360,10 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y,
 	case 32:
 		for (i = 0; i < height; ++i) {
 			for (j = 0; j < width; j++) {
-				*(fb++) = *(bmap++);
-				*(fb++) = *(bmap++);
-				*(fb++) = *(bmap++);
-				*(fb++) = *(bmap++);
+				*fb++ = *bmap++;
+				*fb++ = *bmap++;
+				*fb++ = *bmap++;
+				*fb++ = *bmap++;
 			}
 			fb -= priv->line_length + width * (bpix / 8);
 		}
-- 
2.34.0.rc2.393.gf8c9666880-goog


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 14/23] video: Add a test for 16bpp BMP files
  2021-11-19 20:23 [PATCH 00/23] video: Support a U-Boot logo more easily Simon Glass
                   ` (12 preceding siblings ...)
  2021-11-19 20:23 ` [PATCH 13/23] video: Tidy up 24/32 BMP blitting Simon Glass
@ 2021-11-19 20:23 ` Simon Glass
  2021-11-19 20:23 ` [PATCH 15/23] video: theadorable: Use RGB565 for BMP blitting Simon Glass
                   ` (8 subsequent siblings)
  22 siblings, 0 replies; 41+ messages in thread
From: Simon Glass @ 2021-11-19 20:23 UTC (permalink / raw)
  To: U-Boot Mailing List; +Cc: Anatolij Gustschin, Tom Rini, Simon Glass

Add a compressed 16bpp BMP file and a test to cover this.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 .gitattributes                     |   1 +
 configs/sandbox_defconfig          |   1 +
 configs/sandbox_flattree_defconfig |   1 +
 test/dm/video.c                    |  24 ++++++++++++++++++++++++
 tools/logos/denx-16bpp.bmp.gz      | Bin 0 -> 4516 bytes
 5 files changed, 27 insertions(+)
 create mode 100644 tools/logos/denx-16bpp.bmp.gz

diff --git a/.gitattributes b/.gitattributes
index 899473ab0fb..1879a2dfb3c 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -3,3 +3,4 @@
 # Denote all files that are truly binary and should not be modified
 *.bmp binary
 *.ttf binary
+*.gz binary
diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
index c390afe9de5..5dffc704bd6 100644
--- a/configs/sandbox_defconfig
+++ b/configs/sandbox_defconfig
@@ -285,6 +285,7 @@ CONFIG_OSD=y
 CONFIG_SANDBOX_OSD=y
 CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_VIDEO_BMP_RLE8=y
+CONFIG_BMP_16BPP=y
 CONFIG_W1=y
 CONFIG_W1_GPIO=y
 CONFIG_W1_EEPROM=y
diff --git a/configs/sandbox_flattree_defconfig b/configs/sandbox_flattree_defconfig
index 7cc76bf2713..e879ca40041 100644
--- a/configs/sandbox_flattree_defconfig
+++ b/configs/sandbox_flattree_defconfig
@@ -198,6 +198,7 @@ CONFIG_VIDEO_SANDBOX_SDL=y
 CONFIG_OSD=y
 CONFIG_SANDBOX_OSD=y
 CONFIG_VIDEO_BMP_RLE8=y
+CONFIG_BMP_16BPP=y
 CONFIG_CMD_DHRYSTONE=y
 CONFIG_RSA_VERIFY_WITH_PKEY=y
 CONFIG_TPM=y
diff --git a/test/dm/video.c b/test/dm/video.c
index d5648f0c59b..c496b05df76 100644
--- a/test/dm/video.c
+++ b/test/dm/video.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <bzlib.h>
 #include <dm.h>
+#include <gzip.h>
 #include <log.h>
 #include <malloc.h>
 #include <mapmem.h>
@@ -339,6 +340,29 @@ static int dm_test_video_bmp8(struct unit_test_state *uts)
 }
 DM_TEST(dm_test_video_bmp8, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
 
+/* Test drawing a bitmap file on a 16bpp display */
+static int dm_test_video_bmp16(struct unit_test_state *uts)
+{
+	ulong src, src_len = ~0UL;
+	uint dst_len = ~0U;
+	struct udevice *dev;
+	ulong dst = 0x10000;
+
+	ut_assertok(uclass_find_first_device(UCLASS_VIDEO, &dev));
+	ut_assertnonnull(dev);
+	ut_assertok(sandbox_sdl_set_bpp(dev, VIDEO_BPP16));
+
+	ut_assertok(read_file(uts, "tools/logos/denx-16bpp.bmp.gz", &src));
+	ut_assertok(gunzip(map_sysmem(dst, 0), dst_len, map_sysmem(src, 0),
+			   &src_len));
+
+	ut_assertok(video_bmp_display(dev, dst, 0, 0, false));
+	ut_asserteq(3700, compress_frame_buffer(uts, dev));
+
+	return 0;
+}
+DM_TEST(dm_test_video_bmp16, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
+
 /* Test drawing a bitmap file on a 32bpp display */
 static int dm_test_video_bmp32(struct unit_test_state *uts)
 {
diff --git a/tools/logos/denx-16bpp.bmp.gz b/tools/logos/denx-16bpp.bmp.gz
new file mode 100644
index 0000000000000000000000000000000000000000..ed99c58192e9e1ecbd3b118823f197a484cdad34
GIT binary patch
literal 4516
zcmV;V5nJvbiwFqVVwGV412HaQZEyhPT|aE%Ocu}PRyqktuqbIxqRfVkmFq6urnmx3
zyq7X%N<xUV>Avm0R2xVlZMu)*3aTuS6iK(~HqvPmAjL-41nC-I!)HhXx{B{SjEC``
z@pue2HthVg(gy#V`T4y!@4flscfzNCEey*i<=;o;-#^uVuNJt4KY;_v@qaJDf1~oh
zg@yn8d12u%>Ywla{*Mm}4$Gq9?>_=jgvHgxi1LpO;7noB?>hTmAQMSu-mJLvyB*Um
z?2^U`_zwJTm-oeO-pp8<Qx@HqIl4Uh-Cp;KFjeL-gUQ9cnP)LMVec?GA~Vb3q&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&!;SVP1H;g5y{fL)vk3CTQZq0PzrtJNU47$(WAAc+?_}!{$!D+65wK(~z_w0gu
z?G1aN%)bnJ$=>`k=#}Q`i{GvE243{JKNEw~V-J-1>Pe<4d-KTP^w|StJ~9h#<XFZp
zvo3{xatF)oN}-bxaW6|SN1E)w1%y3V(!TTI41V)vE<v2LKtgg#QN}nWh%=A$Ab-0&
zNX2i4tg#e$?ojcYDH8nV#AykRXBd2)wJH(cxtl$?GZugRYp^rlo0;bhmub%@^t-*@
zl;on-j-hTz-R#;r_TmML$-qRj(<_sE+u$waemdUFrSU4_h_^^!^z{Ez((u5F$N&Hz
Cv@3l8

literal 0
HcmV?d00001

-- 
2.34.0.rc2.393.gf8c9666880-goog


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 15/23] video: theadorable: Use RGB565 for BMP blitting
  2021-11-19 20:23 [PATCH 00/23] video: Support a U-Boot logo more easily Simon Glass
                   ` (13 preceding siblings ...)
  2021-11-19 20:23 ` [PATCH 14/23] video: Add a test for 16bpp BMP files Simon Glass
@ 2021-11-19 20:23 ` Simon Glass
  2021-11-19 20:24 ` [PATCH 16/23] video: Drop #ifdefs from video_bmp Simon Glass
                   ` (7 subsequent siblings)
  22 siblings, 0 replies; 41+ messages in thread
From: Simon Glass @ 2021-11-19 20:23 UTC (permalink / raw)
  To: U-Boot Mailing List; +Cc: Anatolij Gustschin, Tom Rini, Simon Glass

At present this uses RGB555 format for blitting to a display. Sandbox uses
565 and that seems to be more normal for BMP as well. Update the code
accordingly and add a test.

Note that this likely breaks the theadorable board so we may need to
discuss supporting both formats.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 configs/sandbox_defconfig          |   1 +
 configs/sandbox_flattree_defconfig |   1 +
 drivers/video/video_bmp.c          |   6 ++--
 test/dm/video.c                    |  46 +++++++++++++++++++++++++++++
 tools/logos/denx-24bpp.bmp.gz      | Bin 0 -> 7137 bytes
 5 files changed, 51 insertions(+), 3 deletions(-)
 create mode 100644 tools/logos/denx-24bpp.bmp.gz

diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
index 5dffc704bd6..4f413582fb2 100644
--- a/configs/sandbox_defconfig
+++ b/configs/sandbox_defconfig
@@ -286,6 +286,7 @@ CONFIG_SANDBOX_OSD=y
 CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_VIDEO_BMP_RLE8=y
 CONFIG_BMP_16BPP=y
+CONFIG_BMP_24BPP=y
 CONFIG_W1=y
 CONFIG_W1_GPIO=y
 CONFIG_W1_EEPROM=y
diff --git a/configs/sandbox_flattree_defconfig b/configs/sandbox_flattree_defconfig
index e879ca40041..ca81df89b32 100644
--- a/configs/sandbox_flattree_defconfig
+++ b/configs/sandbox_flattree_defconfig
@@ -199,6 +199,7 @@ CONFIG_OSD=y
 CONFIG_SANDBOX_OSD=y
 CONFIG_VIDEO_BMP_RLE8=y
 CONFIG_BMP_16BPP=y
+CONFIG_BMP_24BPP=y
 CONFIG_CMD_DHRYSTONE=y
 CONFIG_RSA_VERIFY_WITH_PKEY=y
 CONFIG_TPM=y
diff --git a/drivers/video/video_bmp.c b/drivers/video/video_bmp.c
index ba36589effb..1c613567657 100644
--- a/drivers/video/video_bmp.c
+++ b/drivers/video/video_bmp.c
@@ -338,9 +338,9 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y,
 		for (i = 0; i < height; ++i) {
 			for (j = 0; j < width; j++) {
 				if (bpix == 16) {
-					/* 16bit 555RGB format */
-					*(u16 *)fb = ((bmap[2] >> 3) << 10) |
-						((bmap[1] >> 3) << 5) |
+					/* 16bit 565RGB format */
+					*(u16 *)fb = ((bmap[2] >> 3) << 11) |
+						((bmap[1] >> 2) << 5) |
 						(bmap[0] >> 3);
 					bmap += 3;
 					fb += 2;
diff --git a/test/dm/video.c b/test/dm/video.c
index c496b05df76..4e76574a913 100644
--- a/test/dm/video.c
+++ b/test/dm/video.c
@@ -363,6 +363,52 @@ static int dm_test_video_bmp16(struct unit_test_state *uts)
 }
 DM_TEST(dm_test_video_bmp16, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
 
+/* Test drawing a 24bpp bitmap file on a 16bpp display */
+static int dm_test_video_bmp24(struct unit_test_state *uts)
+{
+	ulong src, src_len = ~0UL;
+	uint dst_len = ~0U;
+	struct udevice *dev;
+	ulong dst = 0x10000;
+
+	ut_assertok(uclass_find_first_device(UCLASS_VIDEO, &dev));
+	ut_assertnonnull(dev);
+	ut_assertok(sandbox_sdl_set_bpp(dev, VIDEO_BPP16));
+
+	ut_assertok(read_file(uts, "tools/logos/denx-24bpp.bmp.gz", &src));
+	ut_assertok(gunzip(map_sysmem(dst, 0), dst_len, map_sysmem(src, 0),
+			   &src_len));
+
+	ut_assertok(video_bmp_display(dev, dst, 0, 0, false));
+	ut_asserteq(3656, compress_frame_buffer(uts, dev));
+
+	return 0;
+}
+DM_TEST(dm_test_video_bmp24, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
+
+/* Test drawing a 24bpp bitmap file on a 32bpp display */
+static int dm_test_video_bmp24_32(struct unit_test_state *uts)
+{
+	ulong src, src_len = ~0UL;
+	uint dst_len = ~0U;
+	struct udevice *dev;
+	ulong dst = 0x10000;
+
+	ut_assertok(uclass_find_first_device(UCLASS_VIDEO, &dev));
+	ut_assertnonnull(dev);
+	ut_assertok(sandbox_sdl_set_bpp(dev, VIDEO_BPP32));
+
+	ut_assertok(read_file(uts, "tools/logos/denx-24bpp.bmp.gz", &src));
+	ut_assertok(gunzip(map_sysmem(dst, 0), dst_len, map_sysmem(src, 0),
+			   &src_len));
+
+	ut_assertok(video_bmp_display(dev, dst, 0, 0, false));
+	ut_asserteq(6827, compress_frame_buffer(uts, dev));
+
+	return 0;
+}
+DM_TEST(dm_test_video_bmp24_32, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
+
 /* Test drawing a bitmap file on a 32bpp display */
 static int dm_test_video_bmp32(struct unit_test_state *uts)
 {
diff --git a/tools/logos/denx-24bpp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

-- 
2.34.0.rc2.393.gf8c9666880-goog


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 16/23] video: Drop #ifdefs from video_bmp
  2021-11-19 20:23 [PATCH 00/23] video: Support a U-Boot logo more easily Simon Glass
                   ` (14 preceding siblings ...)
  2021-11-19 20:23 ` [PATCH 15/23] video: theadorable: Use RGB565 for BMP blitting Simon Glass
@ 2021-11-19 20:24 ` Simon Glass
  2021-11-19 20:24 ` [PATCH 17/23] video: Convert CONFIG_VIDEO_LOGO to Kconfig Simon Glass
                   ` (6 subsequent siblings)
  22 siblings, 0 replies; 41+ messages in thread
From: Simon Glass @ 2021-11-19 20:24 UTC (permalink / raw)
  To: U-Boot Mailing List; +Cc: Anatolij Gustschin, Tom Rini, Simon Glass

Convert the current preprocessor macros to C code.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/video/video_bmp.c | 97 ++++++++++++++++++++-------------------
 1 file changed, 49 insertions(+), 48 deletions(-)

diff --git a/drivers/video/video_bmp.c b/drivers/video/video_bmp.c
index 1c613567657..e8600b2def3 100644
--- a/drivers/video/video_bmp.c
+++ b/drivers/video/video_bmp.c
@@ -66,7 +66,6 @@ static void write_pix8(u8 *fb, uint bpix, struct bmp_color_table_entry *palette,
 	}
 }
 
-#ifdef CONFIG_VIDEO_BMP_RLE8
 static void draw_unencoded_bitmap(u8 **fbp, uint bpix, uchar *bmap,
 				  struct bmp_color_table_entry *palette,
 				  int cnt)
@@ -183,7 +182,6 @@ static void video_display_rle8_bitmap(struct udevice *dev,
 		}
 	}
 }
-#endif
 
 /**
  * video_splash_align_axis() - Align a single coordinate
@@ -294,16 +292,19 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y,
 
 	switch (bmp_bpix) {
 	case 1:
-	case 8: {
-#ifdef CONFIG_VIDEO_BMP_RLE8
-		u32 compression = get_unaligned_le32(&bmp->header.compression);
-		debug("compressed %d %d\n", compression, BMP_BI_RLE8);
-		if (compression == BMP_BI_RLE8) {
-			video_display_rle8_bitmap(dev, bmp, bpix, palette, fb,
-						  x, y, width, height);
-			break;
+	case 8:
+		if (IS_ENABLED(CONFIG_VIDEO_BMP_RLE8)) {
+			u32 compression = get_unaligned_le32(
+				&bmp->header.compression);
+			debug("compressed %d %d\n", compression, BMP_BI_RLE8);
+			if (compression == BMP_BI_RLE8) {
+				video_display_rle8_bitmap(dev, bmp, bpix, palette, fb,
+							  x, y, width, height);
+				break;
+			}
 		}
-#endif
+
+		/* Not compressed */
 		byte_width = width * (bpix / 8);
 		if (!byte_width)
 			byte_width = width;
@@ -319,56 +320,56 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y,
 			fb -= byte_width + priv->line_length;
 		}
 		break;
-	}
-#if defined(CONFIG_BMP_16BPP)
 	case 16:
-		for (i = 0; i < height; ++i) {
-			WATCHDOG_RESET();
-			for (j = 0; j < width; j++) {
-				*fb++ = *bmap++;
-				*fb++ = *bmap++;
+		if (IS_ENABLED(CONFIG_BMP_16BPP)) {
+			for (i = 0; i < height; ++i) {
+				WATCHDOG_RESET();
+				for (j = 0; j < width; j++) {
+					*fb++ = *bmap++;
+					*fb++ = *bmap++;
+				}
+				bmap += (padded_width - width);
+				fb -= width * 2 + priv->line_length;
 			}
-			bmap += (padded_width - width);
-			fb -= width * 2 + priv->line_length;
 		}
 		break;
-#endif /* CONFIG_BMP_16BPP */
-#if defined(CONFIG_BMP_24BPP)
 	case 24:
-		for (i = 0; i < height; ++i) {
-			for (j = 0; j < width; j++) {
-				if (bpix == 16) {
-					/* 16bit 565RGB format */
-					*(u16 *)fb = ((bmap[2] >> 3) << 11) |
-						((bmap[1] >> 2) << 5) |
-						(bmap[0] >> 3);
-					bmap += 3;
-					fb += 2;
-				} else {
-					*fb++ = *bmap++;
-					*fb++ = *bmap++;
-					*fb++ = *bmap++;
-					*fb++ = 0;
+		if (IS_ENABLED(CONFIG_BMP_24BPP)) {
+			for (i = 0; i < height; ++i) {
+				for (j = 0; j < width; j++) {
+					if (bpix == 16) {
+						/* 16bit 565RGB format */
+						*(u16 *)fb = ((bmap[2] >> 3)
+							<< 11) |
+							((bmap[1] >> 2) << 5) |
+							(bmap[0] >> 3);
+						bmap += 3;
+						fb += 2;
+					} else {
+						*fb++ = *bmap++;
+						*fb++ = *bmap++;
+						*fb++ = *bmap++;
+						*fb++ = 0;
+					}
 				}
+				fb -= priv->line_length + width * (bpix / 8);
+				bmap += (padded_width - width);
 			}
-			fb -= priv->line_length + width * (bpix / 8);
-			bmap += (padded_width - width);
 		}
 		break;
-#endif /* CONFIG_BMP_24BPP */
-#if defined(CONFIG_BMP_32BPP)
 	case 32:
-		for (i = 0; i < height; ++i) {
-			for (j = 0; j < width; j++) {
-				*fb++ = *bmap++;
-				*fb++ = *bmap++;
-				*fb++ = *bmap++;
-				*fb++ = *bmap++;
+		if (IS_ENABLED(CONFIG_BMP_32BPP)) {
+			for (i = 0; i < height; ++i) {
+				for (j = 0; j < width; j++) {
+					*fb++ = *bmap++;
+					*fb++ = *bmap++;
+					*fb++ = *bmap++;
+					*fb++ = *bmap++;
+				}
+				fb -= priv->line_length + width * (bpix / 8);
 			}
-			fb -= priv->line_length + width * (bpix / 8);
 		}
 		break;
-#endif /* CONFIG_BMP_32BPP */
 	default:
 		break;
 	};
-- 
2.34.0.rc2.393.gf8c9666880-goog


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 17/23] video: Convert CONFIG_VIDEO_LOGO to Kconfig
  2021-11-19 20:23 [PATCH 00/23] video: Support a U-Boot logo more easily Simon Glass
                   ` (15 preceding siblings ...)
  2021-11-19 20:24 ` [PATCH 16/23] video: Drop #ifdefs from video_bmp Simon Glass
@ 2021-11-19 20:24 ` Simon Glass
  2022-01-22 13:26   ` Pali Rohár
  2021-11-19 20:24 ` [PATCH 18/23] video: Drop VIDEO_LOGO from cfb_console Simon Glass
                   ` (5 subsequent siblings)
  22 siblings, 1 reply; 41+ messages in thread
From: Simon Glass @ 2021-11-19 20:24 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Anatolij Gustschin, Tom Rini, Simon Glass, Adrian Alonso,
	Alison Wang, Baruch Siach, Eric Bénard, Fabio Estevam,
	Giulio Benetti, Heiko Schocher, Heinrich Schuchardt, Jagan Teki,
	Jason Liu, Marcel Ziswiler, Marek Behún, Marek Vasut,
	Nikita Kiryanov, Olaf Mandel, Otavio Salvador, Pali Rohár,
	Patrice Chotard, Patrick Delaunay, Peng Fan, Priyanka Jain,
	Rasmus Villemoes, Richard Hu, Rick Chen, Samuel Egli,
	Sean Anderson, Stefan Bosch, Stefan Roese, Stefano Babic,
	Sébastien Szymanski, Tim Harvey, Vanessa Maegima,
	uboot-stm32

This converts the following to Kconfig:
   CONFIG_VIDEO_LOGO

Note that this option depends on CONFIG_DM_VIDEO now, since cfb_console is
deprecated. The only relevant code is now in splash.c

Drop the check for DM_VIDEO in that file.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 README                                 | 1 -
 common/splash.c                        | 2 +-
 configs/apalis_imx6_defconfig          | 1 +
 configs/aristainetos2c_defconfig       | 1 +
 configs/aristainetos2ccslb_defconfig   | 1 +
 configs/cm_fx6_defconfig               | 1 +
 configs/colibri-imx6ull-emmc_defconfig | 1 +
 configs/colibri-imx6ull_defconfig      | 1 +
 configs/colibri_imx6_defconfig         | 1 +
 configs/colibri_imx7_defconfig         | 1 +
 configs/colibri_imx7_emmc_defconfig    | 1 +
 configs/colibri_vf_defconfig           | 1 +
 configs/gwventana_emmc_defconfig       | 1 +
 configs/gwventana_gw5904_defconfig     | 1 +
 configs/gwventana_nand_defconfig       | 1 +
 configs/imx6dl_icore_nand_defconfig    | 1 +
 configs/imx6q_icore_nand_defconfig     | 1 +
 configs/imx6qdl_icore_mmc_defconfig    | 1 +
 configs/imx6qdl_icore_nand_defconfig   | 1 +
 configs/imxrt1050-evk_defconfig        | 1 +
 configs/m53menlo_defconfig             | 1 +
 configs/marsboard_defconfig            | 1 +
 configs/mx6cuboxi_defconfig            | 1 +
 configs/mx6sabreauto_defconfig         | 1 +
 configs/mx6sabresd_defconfig           | 1 +
 configs/mx6ul_14x14_evk_defconfig      | 1 +
 configs/mx6ul_9x9_evk_defconfig        | 1 +
 configs/novena_defconfig               | 1 +
 configs/opos6uldev_defconfig           | 1 +
 configs/pico-dwarf-imx7d_defconfig     | 1 +
 configs/pico-hobbit-imx7d_defconfig    | 1 +
 configs/pico-imx6_defconfig            | 1 +
 configs/pico-imx6ul_defconfig          | 1 +
 configs/pico-imx7d_bl33_defconfig      | 1 +
 configs/pico-imx7d_defconfig           | 1 +
 configs/pico-nymph-imx7d_defconfig     | 1 +
 configs/pico-pi-imx7d_defconfig        | 1 +
 configs/riotboard_defconfig            | 1 +
 configs/s5p4418_nanopi2_defconfig      | 1 +
 configs/wandboard_defconfig            | 1 +
 drivers/video/Kconfig                  | 9 +++++++++
 include/configs/T102xRDB.h             | 1 -
 include/configs/T104xRDB.h             | 1 -
 include/configs/apalis_imx6.h          | 1 -
 include/configs/aristainetos2.h        | 1 -
 include/configs/cm_fx6.h               | 1 -
 include/configs/colibri-imx6ull.h      | 1 -
 include/configs/colibri_imx6.h         | 1 -
 include/configs/colibri_imx7.h         | 1 -
 include/configs/colibri_vf.h           | 1 -
 include/configs/embestmx6boards.h      | 1 -
 include/configs/gw_ventana.h           | 1 -
 include/configs/imx6-engicam.h         | 1 -
 include/configs/imxrt1050-evk.h        | 1 -
 include/configs/ls1021aqds.h           | 1 -
 include/configs/ls1021atwr.h           | 1 -
 include/configs/m53menlo.h             | 1 -
 include/configs/mx23evk.h              | 1 -
 include/configs/mx28evk.h              | 1 -
 include/configs/mx51evk.h              | 1 -
 include/configs/mx53loco.h             | 1 -
 include/configs/mx6cuboxi.h            | 1 -
 include/configs/mx6sabre_common.h      | 1 -
 include/configs/mx6sxsabresd.h         | 1 -
 include/configs/mx6ul_14x14_evk.h      | 1 -
 include/configs/mx7dsabresd.h          | 1 -
 include/configs/nokia_rx51.h           | 1 -
 include/configs/novena.h               | 1 -
 include/configs/opos6uldev.h           | 1 -
 include/configs/pico-imx6.h            | 1 -
 include/configs/pico-imx6ul.h          | 1 -
 include/configs/pico-imx7d.h           | 1 -
 include/configs/pxm2.h                 | 1 -
 include/configs/rut.h                  | 1 -
 include/configs/s5p4418_nanopi2.h      | 2 --
 include/configs/wandboard.h            | 1 -
 scripts/config_whitelist.txt           | 1 -
 77 files changed, 48 insertions(+), 39 deletions(-)

diff --git a/README b/README
index 9606a8b3acf..2b8fa030859 100644
--- a/README
+++ b/README
@@ -1095,7 +1095,6 @@ The following options need to be configured:
 			CONFIG_CFB_CONSOLE
 			CONFIG_VIDEO_SW_CURSOR
 			CONFIG_VGA_AS_SINGLE_DEVICE
-			CONFIG_VIDEO_LOGO
 			CONFIG_VIDEO_BMP_LOGO
 
 		The DIU driver will look for the 'video-mode' environment
diff --git a/common/splash.c b/common/splash.c
index de720df9f58..98f0089266d 100644
--- a/common/splash.c
+++ b/common/splash.c
@@ -52,7 +52,7 @@ static struct splash_location default_splash_locations[] = {
 	},
 };
 
-#if defined(CONFIG_DM_VIDEO) && defined(CONFIG_VIDEO_LOGO)
+#ifdef CONFIG_VIDEO_LOGO
 
 #include <bmp_logo_data.h>
 
diff --git a/configs/apalis_imx6_defconfig b/configs/apalis_imx6_defconfig
index b5c846aa6a4..81d964302c5 100644
--- a/configs/apalis_imx6_defconfig
+++ b/configs/apalis_imx6_defconfig
@@ -105,6 +105,7 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x4000
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 # CONFIG_VIDEO_BPP8 is not set
 # CONFIG_VIDEO_BPP32 is not set
 CONFIG_SYS_WHITE_ON_BLACK=y
diff --git a/configs/aristainetos2c_defconfig b/configs/aristainetos2c_defconfig
index ad4e8350c3a..27607d2ace4 100644
--- a/configs/aristainetos2c_defconfig
+++ b/configs/aristainetos2c_defconfig
@@ -109,6 +109,7 @@ CONFIG_SYSRESET_WATCHDOG=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_DISPLAY=y
 CONFIG_VIDEO_IPUV3=y
diff --git a/configs/aristainetos2ccslb_defconfig b/configs/aristainetos2ccslb_defconfig
index e4ecd81c1e2..bfc967b38e6 100644
--- a/configs/aristainetos2ccslb_defconfig
+++ b/configs/aristainetos2ccslb_defconfig
@@ -109,6 +109,7 @@ CONFIG_SYSRESET_WATCHDOG=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_DISPLAY=y
 CONFIG_VIDEO_IPUV3=y
diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig
index b823a150dc0..4e7f152185b 100644
--- a/configs/cm_fx6_defconfig
+++ b/configs/cm_fx6_defconfig
@@ -106,6 +106,7 @@ CONFIG_USB=y
 CONFIG_USB_KEYBOARD=y
 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 CONFIG_VIDEO_IPUV3=y
 CONFIG_SPLASH_SCREEN=y
 CONFIG_SPLASH_SOURCE=y
diff --git a/configs/colibri-imx6ull-emmc_defconfig b/configs/colibri-imx6ull-emmc_defconfig
index 4b346a98793..81881ef1e9b 100644
--- a/configs/colibri-imx6ull-emmc_defconfig
+++ b/configs/colibri-imx6ull-emmc_defconfig
@@ -80,6 +80,7 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x4000
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_SPLASH_SCREEN=y
 CONFIG_SPLASH_SCREEN_ALIGN=y
diff --git a/configs/colibri-imx6ull_defconfig b/configs/colibri-imx6ull_defconfig
index 7d15b7b58bf..3e4d1b82090 100644
--- a/configs/colibri-imx6ull_defconfig
+++ b/configs/colibri-imx6ull_defconfig
@@ -95,6 +95,7 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x4000
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_MXS=y
 CONFIG_SPLASH_SCREEN=y
diff --git a/configs/colibri_imx6_defconfig b/configs/colibri_imx6_defconfig
index 1f3c0f17d0c..3900ad258bd 100644
--- a/configs/colibri_imx6_defconfig
+++ b/configs/colibri_imx6_defconfig
@@ -103,6 +103,7 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x4000
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 # CONFIG_VIDEO_BPP8 is not set
 # CONFIG_VIDEO_BPP32 is not set
 CONFIG_SYS_WHITE_ON_BLACK=y
diff --git a/configs/colibri_imx7_defconfig b/configs/colibri_imx7_defconfig
index 129f625acab..0e8cabc3468 100644
--- a/configs/colibri_imx7_defconfig
+++ b/configs/colibri_imx7_defconfig
@@ -91,6 +91,7 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x4000
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_MXS=y
 CONFIG_SPLASH_SCREEN=y
diff --git a/configs/colibri_imx7_emmc_defconfig b/configs/colibri_imx7_emmc_defconfig
index c06ef33eb0b..e2de213018c 100644
--- a/configs/colibri_imx7_emmc_defconfig
+++ b/configs/colibri_imx7_emmc_defconfig
@@ -85,6 +85,7 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x1b67
 CONFIG_USB_GADGET_PRODUCT_NUM=0x4000
 CONFIG_CI_UDC=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_SPLASH_SCREEN=y
 CONFIG_SPLASH_SCREEN_ALIGN=y
diff --git a/configs/colibri_vf_defconfig b/configs/colibri_vf_defconfig
index 4306ff485e9..c404139ef18 100644
--- a/configs/colibri_vf_defconfig
+++ b/configs/colibri_vf_defconfig
@@ -97,6 +97,7 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x4000
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 # CONFIG_VIDEO_BPP8 is not set
 # CONFIG_VIDEO_BPP16 is not set
 CONFIG_VIDEO_FSL_DCU_FB=y
diff --git a/configs/gwventana_emmc_defconfig b/configs/gwventana_emmc_defconfig
index 3c94c0a5927..6b58474e5e8 100644
--- a/configs/gwventana_emmc_defconfig
+++ b/configs/gwventana_emmc_defconfig
@@ -138,6 +138,7 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_USB_ETHER=y
 CONFIG_USB_ETH_CDC=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 # CONFIG_BACKLIGHT is not set
 # CONFIG_CMD_VIDCONSOLE is not set
 # CONFIG_VIDEO_BPP8 is not set
diff --git a/configs/gwventana_gw5904_defconfig b/configs/gwventana_gw5904_defconfig
index 3309c657f19..f3e54a32af3 100644
--- a/configs/gwventana_gw5904_defconfig
+++ b/configs/gwventana_gw5904_defconfig
@@ -142,6 +142,7 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_USB_ETHER=y
 CONFIG_USB_ETH_CDC=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 # CONFIG_BACKLIGHT is not set
 # CONFIG_CMD_VIDCONSOLE is not set
 # CONFIG_VIDEO_BPP8 is not set
diff --git a/configs/gwventana_nand_defconfig b/configs/gwventana_nand_defconfig
index b64d4ae1592..0833f7ce630 100644
--- a/configs/gwventana_nand_defconfig
+++ b/configs/gwventana_nand_defconfig
@@ -146,6 +146,7 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_USB_ETHER=y
 CONFIG_USB_ETH_CDC=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 # CONFIG_BACKLIGHT is not set
 # CONFIG_CMD_VIDCONSOLE is not set
 # CONFIG_VIDEO_BPP8 is not set
diff --git a/configs/imx6dl_icore_nand_defconfig b/configs/imx6dl_icore_nand_defconfig
index 3076dced10b..146cb1c58f5 100644
--- a/configs/imx6dl_icore_nand_defconfig
+++ b/configs/imx6dl_icore_nand_defconfig
@@ -64,6 +64,7 @@ CONFIG_PINCTRL_IMX6=y
 CONFIG_MXC_UART=y
 CONFIG_IMX_THERMAL=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 # CONFIG_VIDEO_BPP8 is not set
 # CONFIG_VIDEO_BPP32 is not set
 CONFIG_SYS_WHITE_ON_BLACK=y
diff --git a/configs/imx6q_icore_nand_defconfig b/configs/imx6q_icore_nand_defconfig
index 439917bf243..16711327be5 100644
--- a/configs/imx6q_icore_nand_defconfig
+++ b/configs/imx6q_icore_nand_defconfig
@@ -65,6 +65,7 @@ CONFIG_PINCTRL_IMX6=y
 CONFIG_MXC_UART=y
 CONFIG_IMX_THERMAL=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 # CONFIG_VIDEO_BPP8 is not set
 # CONFIG_VIDEO_BPP32 is not set
 CONFIG_SYS_WHITE_ON_BLACK=y
diff --git a/configs/imx6qdl_icore_mmc_defconfig b/configs/imx6qdl_icore_mmc_defconfig
index 61d8a7b2e63..47607eb8bd6 100644
--- a/configs/imx6qdl_icore_mmc_defconfig
+++ b/configs/imx6qdl_icore_mmc_defconfig
@@ -82,6 +82,7 @@ CONFIG_PINCTRL_IMX6=y
 CONFIG_MXC_UART=y
 CONFIG_IMX_THERMAL=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 # CONFIG_VIDEO_BPP8 is not set
 # CONFIG_VIDEO_BPP32 is not set
 CONFIG_SYS_WHITE_ON_BLACK=y
diff --git a/configs/imx6qdl_icore_nand_defconfig b/configs/imx6qdl_icore_nand_defconfig
index 439917bf243..16711327be5 100644
--- a/configs/imx6qdl_icore_nand_defconfig
+++ b/configs/imx6qdl_icore_nand_defconfig
@@ -65,6 +65,7 @@ CONFIG_PINCTRL_IMX6=y
 CONFIG_MXC_UART=y
 CONFIG_IMX_THERMAL=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 # CONFIG_VIDEO_BPP8 is not set
 # CONFIG_VIDEO_BPP32 is not set
 CONFIG_SYS_WHITE_ON_BLACK=y
diff --git a/configs/imxrt1050-evk_defconfig b/configs/imxrt1050-evk_defconfig
index ca3f810e025..bc438b9fa6c 100644
--- a/configs/imxrt1050-evk_defconfig
+++ b/configs/imxrt1050-evk_defconfig
@@ -72,6 +72,7 @@ CONFIG_USB=y
 # CONFIG_SPL_DM_USB is not set
 CONFIG_USB_EHCI_HCD=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 CONFIG_BACKLIGHT_GPIO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_MXS=y
diff --git a/configs/m53menlo_defconfig b/configs/m53menlo_defconfig
index 48d75669cb5..08f7a92b35f 100644
--- a/configs/m53menlo_defconfig
+++ b/configs/m53menlo_defconfig
@@ -109,6 +109,7 @@ CONFIG_USB_ETHER_ASIX=y
 CONFIG_USB_ETHER_MCS7830=y
 CONFIG_USB_ETHER_SMSC95XX=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 # CONFIG_VIDEO_BPP8 is not set
 # CONFIG_VIDEO_BPP32 is not set
 CONFIG_SYS_WHITE_ON_BLACK=y
diff --git a/configs/marsboard_defconfig b/configs/marsboard_defconfig
index 281563401f5..0ce228d320d 100644
--- a/configs/marsboard_defconfig
+++ b/configs/marsboard_defconfig
@@ -57,6 +57,7 @@ CONFIG_USB=y
 CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_ASIX=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 # CONFIG_BACKLIGHT is not set
 # CONFIG_CMD_VIDCONSOLE is not set
 # CONFIG_VIDEO_BPP8 is not set
diff --git a/configs/mx6cuboxi_defconfig b/configs/mx6cuboxi_defconfig
index 70374515abe..4fbd83f0a5d 100644
--- a/configs/mx6cuboxi_defconfig
+++ b/configs/mx6cuboxi_defconfig
@@ -70,6 +70,7 @@ CONFIG_IMX_THERMAL=y
 CONFIG_USB=y
 CONFIG_USB_KEYBOARD=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 # CONFIG_BACKLIGHT is not set
 # CONFIG_CMD_VIDCONSOLE is not set
 # CONFIG_VIDEO_BPP8 is not set
diff --git a/configs/mx6sabreauto_defconfig b/configs/mx6sabreauto_defconfig
index c5cdc3ac17f..f8e622106c9 100644
--- a/configs/mx6sabreauto_defconfig
+++ b/configs/mx6sabreauto_defconfig
@@ -109,6 +109,7 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 # CONFIG_VIDEO_BPP8 is not set
 # CONFIG_VIDEO_BPP32 is not set
 CONFIG_SYS_WHITE_ON_BLACK=y
diff --git a/configs/mx6sabresd_defconfig b/configs/mx6sabresd_defconfig
index 6733038060a..86af807ad4a 100644
--- a/configs/mx6sabresd_defconfig
+++ b/configs/mx6sabresd_defconfig
@@ -116,6 +116,7 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 # CONFIG_VIDEO_BPP8 is not set
 # CONFIG_VIDEO_BPP32 is not set
 CONFIG_SYS_WHITE_ON_BLACK=y
diff --git a/configs/mx6ul_14x14_evk_defconfig b/configs/mx6ul_14x14_evk_defconfig
index 5fa9d341f98..52e588e31e2 100644
--- a/configs/mx6ul_14x14_evk_defconfig
+++ b/configs/mx6ul_14x14_evk_defconfig
@@ -92,6 +92,7 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_MXS=y
 CONFIG_SPLASH_SCREEN=y
diff --git a/configs/mx6ul_9x9_evk_defconfig b/configs/mx6ul_9x9_evk_defconfig
index 1b80f043bd7..8d18e43956e 100644
--- a/configs/mx6ul_9x9_evk_defconfig
+++ b/configs/mx6ul_9x9_evk_defconfig
@@ -82,6 +82,7 @@ CONFIG_IMX_THERMAL=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_MXS=y
 CONFIG_SPLASH_SCREEN=y
diff --git a/configs/novena_defconfig b/configs/novena_defconfig
index 06864db00d5..132d2dff0d7 100644
--- a/configs/novena_defconfig
+++ b/configs/novena_defconfig
@@ -84,6 +84,7 @@ CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
 CONFIG_USB_ETHER=y
 CONFIG_USB_ETH_CDC=y
+CONFIG_VIDEO_LOGO=y
 # CONFIG_VIDEO_BPP8 is not set
 # CONFIG_VIDEO_BPP32 is not set
 CONFIG_SYS_WHITE_ON_BLACK=y
diff --git a/configs/opos6uldev_defconfig b/configs/opos6uldev_defconfig
index c52d2a5d396..f101d3abfdd 100644
--- a/configs/opos6uldev_defconfig
+++ b/configs/opos6uldev_defconfig
@@ -103,6 +103,7 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 # CONFIG_VIDEO_BPP8 is not set
 # CONFIG_VIDEO_BPP32 is not set
 CONFIG_SYS_WHITE_ON_BLACK=y
diff --git a/configs/pico-dwarf-imx7d_defconfig b/configs/pico-dwarf-imx7d_defconfig
index 6df4d44e1ed..13e4d9b0c20 100644
--- a/configs/pico-dwarf-imx7d_defconfig
+++ b/configs/pico-dwarf-imx7d_defconfig
@@ -85,6 +85,7 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_SPLASH_SCREEN=y
 CONFIG_SPLASH_SCREEN_ALIGN=y
diff --git a/configs/pico-hobbit-imx7d_defconfig b/configs/pico-hobbit-imx7d_defconfig
index a5b6a30556e..7dc7e5d6ec3 100644
--- a/configs/pico-hobbit-imx7d_defconfig
+++ b/configs/pico-hobbit-imx7d_defconfig
@@ -85,6 +85,7 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_SPLASH_SCREEN=y
 CONFIG_SPLASH_SCREEN_ALIGN=y
diff --git a/configs/pico-imx6_defconfig b/configs/pico-imx6_defconfig
index 20c7d45a463..2353dd762be 100644
--- a/configs/pico-imx6_defconfig
+++ b/configs/pico-imx6_defconfig
@@ -82,6 +82,7 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 # CONFIG_BACKLIGHT is not set
 # CONFIG_CMD_VIDCONSOLE is not set
 # CONFIG_VIDEO_BPP8 is not set
diff --git a/configs/pico-imx6ul_defconfig b/configs/pico-imx6ul_defconfig
index 215537e8cd4..35021ac39b7 100644
--- a/configs/pico-imx6ul_defconfig
+++ b/configs/pico-imx6ul_defconfig
@@ -79,6 +79,7 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 CONFIG_VIDEO_MXS=y
 CONFIG_SPLASH_SCREEN=y
 CONFIG_SPLASH_SCREEN_ALIGN=y
diff --git a/configs/pico-imx7d_bl33_defconfig b/configs/pico-imx7d_bl33_defconfig
index 3c669e7fe9d..005f8d8d8ca 100644
--- a/configs/pico-imx7d_bl33_defconfig
+++ b/configs/pico-imx7d_bl33_defconfig
@@ -81,6 +81,7 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_MXS=y
 CONFIG_SPLASH_SCREEN=y
diff --git a/configs/pico-imx7d_defconfig b/configs/pico-imx7d_defconfig
index 8e7e10e1149..ed20aeae685 100644
--- a/configs/pico-imx7d_defconfig
+++ b/configs/pico-imx7d_defconfig
@@ -85,6 +85,7 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_MXS=y
 CONFIG_SPLASH_SCREEN=y
diff --git a/configs/pico-nymph-imx7d_defconfig b/configs/pico-nymph-imx7d_defconfig
index 6df4d44e1ed..13e4d9b0c20 100644
--- a/configs/pico-nymph-imx7d_defconfig
+++ b/configs/pico-nymph-imx7d_defconfig
@@ -85,6 +85,7 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_SPLASH_SCREEN=y
 CONFIG_SPLASH_SCREEN_ALIGN=y
diff --git a/configs/pico-pi-imx7d_defconfig b/configs/pico-pi-imx7d_defconfig
index 40a7232b65e..f74e83e96d3 100644
--- a/configs/pico-pi-imx7d_defconfig
+++ b/configs/pico-pi-imx7d_defconfig
@@ -85,6 +85,7 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_SPLASH_SCREEN=y
 CONFIG_SPLASH_SCREEN_ALIGN=y
diff --git a/configs/riotboard_defconfig b/configs/riotboard_defconfig
index 0dd538e5c1a..3c277ed65a0 100644
--- a/configs/riotboard_defconfig
+++ b/configs/riotboard_defconfig
@@ -69,6 +69,7 @@ CONFIG_USB=y
 CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_ASIX=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 # CONFIG_BACKLIGHT is not set
 # CONFIG_CMD_VIDCONSOLE is not set
 # CONFIG_VIDEO_BPP8 is not set
diff --git a/configs/s5p4418_nanopi2_defconfig b/configs/s5p4418_nanopi2_defconfig
index fa59cfd0692..0e17e759b58 100644
--- a/configs/s5p4418_nanopi2_defconfig
+++ b/configs/s5p4418_nanopi2_defconfig
@@ -50,6 +50,7 @@ CONFIG_DM_PMIC=y
 CONFIG_DM_REGULATOR=y
 CONFIG_CONS_INDEX=0
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 CONFIG_DISPLAY=y
 CONFIG_VIDEO_NX=y
 CONFIG_VIDEO_NX_RGB=y
diff --git a/configs/wandboard_defconfig b/configs/wandboard_defconfig
index 4015c39143f..2160dd852ed 100644
--- a/configs/wandboard_defconfig
+++ b/configs/wandboard_defconfig
@@ -74,6 +74,7 @@ CONFIG_MXC_UART=y
 CONFIG_DM_THERMAL=y
 CONFIG_USB=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_LOGO=y
 # CONFIG_VIDEO_BPP8 is not set
 # CONFIG_VIDEO_BPP32 is not set
 CONFIG_SYS_WHITE_ON_BLACK=y
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index a58f87f479b..7a73ecc1f40 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -14,6 +14,15 @@ config DM_VIDEO
 	  option compiles in the video uclass and routes all LCD/video access
 	  through this.
 
+config VIDEO_LOGO
+	bool "Show the U-Boot logo on the display"
+	depends on DM_VIDEO
+	help
+	  This enables showing the U-Boot logo on the display when a video
+	  device is probed. It appears at the top right. The logo itself is at
+	  tools/logos/u-boot_logo.bmp and looks best when the display has a
+	  black background.
+
 config BACKLIGHT
 	bool "Enable panel backlight uclass support"
 	depends on DM_VIDEO
diff --git a/include/configs/T102xRDB.h b/include/configs/T102xRDB.h
index 89bbeb77844..fdda8c92437 100644
--- a/include/configs/T102xRDB.h
+++ b/include/configs/T102xRDB.h
@@ -380,7 +380,6 @@ unsigned long get_board_sys_clk(void);
 #undef CONFIG_FSL_DIU_FB	/* RDB doesn't support DIU */
 #ifdef CONFIG_FSL_DIU_FB
 #define CONFIG_SYS_DIU_ADDR	(CONFIG_SYS_CCSRBAR + 0x180000)
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 #define CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS
 /*
diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h
index 48fc8a271c2..d02d580edaf 100644
--- a/include/configs/T104xRDB.h
+++ b/include/configs/T104xRDB.h
@@ -367,7 +367,6 @@
 #ifdef CONFIG_FSL_DIU_FB
 #define CONFIG_FSL_DIU_CH7301
 #define CONFIG_SYS_DIU_ADDR	(CONFIG_SYS_CCSRBAR + 0x180000)
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 #endif
 #endif
diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h
index dfed1615b9b..3c062d42f8d 100644
--- a/include/configs/apalis_imx6.h
+++ b/include/configs/apalis_imx6.h
@@ -46,7 +46,6 @@
 
 /* Framebuffer and LCD */
 #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 #define CONFIG_IMX_HDMI
 #define CONFIG_IMX_VIDEO_SKIP
diff --git a/include/configs/aristainetos2.h b/include/configs/aristainetos2.h
index b73b0d5b92b..e6397378e45 100644
--- a/include/configs/aristainetos2.h
+++ b/include/configs/aristainetos2.h
@@ -443,7 +443,6 @@
 /* Framebuffer */
 /* check this console not needed, after test remove it */
 #define CONFIG_IMX_VIDEO_SKIP
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 
 #define CONFIG_IMX6_PWM_PER_CLK	66000000
diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h
index d61d759092c..267496b7d10 100644
--- a/include/configs/cm_fx6.h
+++ b/include/configs/cm_fx6.h
@@ -177,7 +177,6 @@
 /* Display */
 #define CONFIG_IMX_HDMI
 
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 
 /* EEPROM */
diff --git a/include/configs/colibri-imx6ull.h b/include/configs/colibri-imx6ull.h
index 6b3e1c665a0..e4daa4bec46 100644
--- a/include/configs/colibri-imx6ull.h
+++ b/include/configs/colibri-imx6ull.h
@@ -165,7 +165,6 @@
 
 #if defined(CONFIG_DM_VIDEO)
 #define MXS_LCDIF_BASE MX6UL_LCDIF1_BASE_ADDR
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 #endif
 
diff --git a/include/configs/colibri_imx6.h b/include/configs/colibri_imx6.h
index b103186bf46..e0174c58343 100644
--- a/include/configs/colibri_imx6.h
+++ b/include/configs/colibri_imx6.h
@@ -36,7 +36,6 @@
 
 /* Framebuffer and LCD */
 #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 #define CONFIG_IMX_HDMI
 #define CONFIG_IMX_VIDEO_SKIP
diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h
index ac188ee3ac6..f9b505c45b5 100644
--- a/include/configs/colibri_imx7.h
+++ b/include/configs/colibri_imx7.h
@@ -199,7 +199,6 @@
 #define CONFIG_USBD_HS
 
 #if defined(CONFIG_DM_VIDEO)
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 #endif
 
diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h
index 71fe768d679..60bd9332b75 100644
--- a/include/configs/colibri_vf.h
+++ b/include/configs/colibri_vf.h
@@ -17,7 +17,6 @@
 #define CONFIG_SYS_FSL_CLK
 
 #ifdef CONFIG_VIDEO_FSL_DCU_FB
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 #define CONFIG_SYS_FSL_DCU_LE
 
diff --git a/include/configs/embestmx6boards.h b/include/configs/embestmx6boards.h
index 9769155bca7..d001580d7dd 100644
--- a/include/configs/embestmx6boards.h
+++ b/include/configs/embestmx6boards.h
@@ -52,7 +52,6 @@
 #endif
 
 /* Framebuffer */
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 #define CONFIG_IMX_HDMI
 #define CONFIG_IMX_VIDEO_SKIP
diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h
index abceffb4220..5301d81dd41 100644
--- a/include/configs/gw_ventana.h
+++ b/include/configs/gw_ventana.h
@@ -72,7 +72,6 @@
 #define CONFIG_USBD_HS
 
 /* Framebuffer and LCD */
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_IMX_HDMI
 #define CONFIG_IMX_VIDEO_SKIP
 #define CONFIG_VIDEO_BMP_LOGO
diff --git a/include/configs/imx6-engicam.h b/include/configs/imx6-engicam.h
index fed6545fdf9..47ecbf3b381 100644
--- a/include/configs/imx6-engicam.h
+++ b/include/configs/imx6-engicam.h
@@ -156,7 +156,6 @@
 #ifdef CONFIG_VIDEO_IPUV3
 # define CONFIG_IMX_VIDEO_SKIP
 
-# define CONFIG_VIDEO_LOGO
 # define CONFIG_VIDEO_BMP_LOGO
 #endif
 
diff --git a/include/configs/imxrt1050-evk.h b/include/configs/imxrt1050-evk.h
index 99d25c1e6ef..e26febb0a78 100644
--- a/include/configs/imxrt1050-evk.h
+++ b/include/configs/imxrt1050-evk.h
@@ -22,7 +22,6 @@
 					 DMAMEM_SZ_ALL)
 
 #ifdef CONFIG_DM_VIDEO
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
diff --git a/include/configs/ls1021aqds.h b/include/configs/ls1021aqds.h
index 27b97ffd2fb..c37593edb3f 100644
--- a/include/configs/ls1021aqds.h
+++ b/include/configs/ls1021aqds.h
@@ -323,7 +323,6 @@ unsigned long get_board_sys_clk(void);
  * Video
  */
 #ifdef CONFIG_VIDEO_FSL_DCU_FB
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 
 #define CONFIG_FSL_DIU_CH7301
diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
index c099629607f..0976bf2e575 100644
--- a/include/configs/ls1021atwr.h
+++ b/include/configs/ls1021atwr.h
@@ -209,7 +209,6 @@
  * Video
  */
 #ifdef CONFIG_VIDEO_FSL_DCU_FB
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 
 #define CONFIG_FSL_DCU_SII9022A
diff --git a/include/configs/m53menlo.h b/include/configs/m53menlo.h
index f94cf28b135..db8c4a12db2 100644
--- a/include/configs/m53menlo.h
+++ b/include/configs/m53menlo.h
@@ -112,7 +112,6 @@
 /*
  * LCD
  */
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE	(2 << 20)
 
 /* LVDS display */
diff --git a/include/configs/mx23evk.h b/include/configs/mx23evk.h
index bccba5cbb17..4d2c4e43579 100644
--- a/include/configs/mx23evk.h
+++ b/include/configs/mx23evk.h
@@ -27,7 +27,6 @@
 
 /* Framebuffer support */
 #ifdef CONFIG_DM_VIDEO
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE	(512 << 10)
 #endif
 
diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index fe4ea8997d4..3eddc1bce07 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -41,7 +41,6 @@
 
 /* Framebuffer support */
 #ifdef CONFIG_DM_VIDEO
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE	(512 << 10)
 #endif
 
diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h
index 9cc297da30e..3512be8774e 100644
--- a/include/configs/mx51evk.h
+++ b/include/configs/mx51evk.h
@@ -45,7 +45,6 @@
 #define CONFIG_MXC_USB_FLAGS	MXC_EHCI_POWER_PINS_ENABLED
 
 /* Framebuffer and LCD */
-#define CONFIG_VIDEO_LOGO
 
 #define CONFIG_ETHPRIME		"FEC0"
 
diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h
index b026c6ff89f..8fd5dc8d05a 100644
--- a/include/configs/mx53loco.h
+++ b/include/configs/mx53loco.h
@@ -146,6 +146,5 @@
 #endif
 
 /* Framebuffer and LCD */
-#define CONFIG_VIDEO_LOGO
 
 #endif				/* __CONFIG_H */
diff --git a/include/configs/mx6cuboxi.h b/include/configs/mx6cuboxi.h
index da2533637b0..7d3e651f44d 100644
--- a/include/configs/mx6cuboxi.h
+++ b/include/configs/mx6cuboxi.h
@@ -25,7 +25,6 @@
 #endif
 
 /* Framebuffer */
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 #define CONFIG_IMX_HDMI
 #define CONFIG_IMX_VIDEO_SKIP
diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h
index 51f6b3ac462..97109032bbb 100644
--- a/include/configs/mx6sabre_common.h
+++ b/include/configs/mx6sabre_common.h
@@ -167,7 +167,6 @@
 /* Environment organization */
 
 /* Framebuffer */
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 #define CONFIG_IMX_HDMI
 #define CONFIG_IMX_VIDEO_SKIP
diff --git a/include/configs/mx6sxsabresd.h b/include/configs/mx6sxsabresd.h
index a554011d75d..1eca81ad073 100644
--- a/include/configs/mx6sxsabresd.h
+++ b/include/configs/mx6sxsabresd.h
@@ -161,7 +161,6 @@
 
 #ifndef CONFIG_SPL_BUILD
 #ifdef CONFIG_DM_VIDEO
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 #define MXS_LCDIF_BASE MX6SX_LCDIF1_BASE_ADDR
 #endif
diff --git a/include/configs/mx6ul_14x14_evk.h b/include/configs/mx6ul_14x14_evk.h
index 0b777fbbdc0..987f6cb1b63 100644
--- a/include/configs/mx6ul_14x14_evk.h
+++ b/include/configs/mx6ul_14x14_evk.h
@@ -165,7 +165,6 @@
 
 #ifndef CONFIG_SPL_BUILD
 #if defined(CONFIG_DM_VIDEO)
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 #define MXS_LCDIF_BASE MX6UL_LCDIF1_BASE_ADDR
 #endif
diff --git a/include/configs/mx7dsabresd.h b/include/configs/mx7dsabresd.h
index f11e2e3f807..f0ed44cc496 100644
--- a/include/configs/mx7dsabresd.h
+++ b/include/configs/mx7dsabresd.h
@@ -125,7 +125,6 @@
 #define CONFIG_USBD_HS
 
 #ifdef CONFIG_DM_VIDEO
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 #endif
 
diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h
index b37e05406e9..afb91d96a54 100644
--- a/include/configs/nokia_rx51.h
+++ b/include/configs/nokia_rx51.h
@@ -75,7 +75,6 @@
  * Framebuffer
  */
 /* Video console */
-#define CONFIG_VIDEO_LOGO
 #define VIDEO_FB_16BPP_PIXEL_SWAP
 #define VIDEO_FB_16BPP_WORD_SWAP
 
diff --git a/include/configs/novena.h b/include/configs/novena.h
index 28fb1b8d753..ec192c5eecb 100644
--- a/include/configs/novena.h
+++ b/include/configs/novena.h
@@ -87,7 +87,6 @@
 #endif
 
 /* Video output */
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_IMX_HDMI
 #define CONFIG_IMX_VIDEO_SKIP
 
diff --git a/include/configs/opos6uldev.h b/include/configs/opos6uldev.h
index d9311a49350..ad2d3ce29e3 100644
--- a/include/configs/opos6uldev.h
+++ b/include/configs/opos6uldev.h
@@ -41,7 +41,6 @@
 /* LCD */
 #ifndef CONFIG_SPL_BUILD
 #ifdef CONFIG_DM_VIDEO
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 #define MXS_LCDIF_BASE MX6UL_LCDIF1_BASE_ADDR
 #endif
diff --git a/include/configs/pico-imx6.h b/include/configs/pico-imx6.h
index 2528d319d1f..19955623b7f 100644
--- a/include/configs/pico-imx6.h
+++ b/include/configs/pico-imx6.h
@@ -136,7 +136,6 @@
 #define CONFIG_FEC_MXC_PHYADDR		1
 
 /* Framebuffer */
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 #define CONFIG_IMX_HDMI
 #define CONFIG_IMX_VIDEO_SKIP
diff --git a/include/configs/pico-imx6ul.h b/include/configs/pico-imx6ul.h
index 3fe178316f7..442dd2a0fb5 100644
--- a/include/configs/pico-imx6ul.h
+++ b/include/configs/pico-imx6ul.h
@@ -133,7 +133,6 @@
 #define CONFIG_BOARD_SIZE_LIMIT		715776
 
 #ifdef CONFIG_DM_VIDEO
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 #define MXS_LCDIF_BASE MX6UL_LCDIF1_BASE_ADDR
 #endif
diff --git a/include/configs/pico-imx7d.h b/include/configs/pico-imx7d.h
index cbac9505492..253283aab26 100644
--- a/include/configs/pico-imx7d.h
+++ b/include/configs/pico-imx7d.h
@@ -124,7 +124,6 @@
 #define CONFIG_POWER_PFUZE3000_I2C_ADDR	0x08
 
 #ifdef CONFIG_DM_VIDEO
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 #endif
 
diff --git a/include/configs/pxm2.h b/include/configs/pxm2.h
index a333326dff6..498932dcfd7 100644
--- a/include/configs/pxm2.h
+++ b/include/configs/pxm2.h
@@ -108,7 +108,6 @@
 
 #if defined(CONFIG_VIDEO)
 #define CONFIG_VIDEO_DA8XX
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 #define DA8XX_LCD_CNTL_BASE	LCD_CNTL_BASE
 #define PWM_TICKS	0x1388
diff --git a/include/configs/rut.h b/include/configs/rut.h
index 68d68d084d2..b1bf0c23a3c 100644
--- a/include/configs/rut.h
+++ b/include/configs/rut.h
@@ -97,7 +97,6 @@
 
 #if defined(CONFIG_VIDEO)
 #define CONFIG_VIDEO_DA8XX
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 #define DA8XX_LCD_CNTL_BASE	LCD_CNTL_BASE
 
diff --git a/include/configs/s5p4418_nanopi2.h b/include/configs/s5p4418_nanopi2.h
index 2e94613c37a..1b1b2bfb67a 100644
--- a/include/configs/s5p4418_nanopi2.h
+++ b/include/configs/s5p4418_nanopi2.h
@@ -131,8 +131,6 @@
  * VIDEO
  */
 
-#define CONFIG_VIDEO_LOGO
-
 #ifdef CONFIG_VIDEO_LOGO
 #ifdef CONFIG_SPLASH_SCREEN
 #define SPLASH_FILE			logo.bmp
diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h
index ece762e512d..051c18ca232 100644
--- a/include/configs/wandboard.h
+++ b/include/configs/wandboard.h
@@ -32,7 +32,6 @@
 #define CONFIG_MXC_USB_FLAGS		0
 
 /* Framebuffer */
-#define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 #define CONFIG_IMX_HDMI
 #define CONFIG_IMX_VIDEO_SKIP
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index b9c1c61e13d..5c4df1ebccb 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -3052,7 +3052,6 @@ CONFIG_VIDEO_BCM2835
 CONFIG_VIDEO_BMP_LOGO
 CONFIG_VIDEO_DA8XX
 CONFIG_VIDEO_FONT_4X6
-CONFIG_VIDEO_LOGO
 CONFIG_VIDEO_MXS_MODE_SYSTEM
 CONFIG_VIDEO_STD_TIMINGS
 CONFIG_VID_FLS_ENV
-- 
2.34.0.rc2.393.gf8c9666880-goog


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 18/23] video: Drop VIDEO_LOGO from cfb_console
  2021-11-19 20:23 [PATCH 00/23] video: Support a U-Boot logo more easily Simon Glass
                   ` (16 preceding siblings ...)
  2021-11-19 20:24 ` [PATCH 17/23] video: Convert CONFIG_VIDEO_LOGO to Kconfig Simon Glass
@ 2021-11-19 20:24 ` Simon Glass
  2021-11-19 20:24 ` [PATCH 19/23] video: Support showing the U-Boot logo Simon Glass
                   ` (4 subsequent siblings)
  22 siblings, 0 replies; 41+ messages in thread
From: Simon Glass @ 2021-11-19 20:24 UTC (permalink / raw)
  To: U-Boot Mailing List; +Cc: Anatolij Gustschin, Tom Rini, Simon Glass

This driver is obsolete and only used by nokia_rx51. It should be deleted.
For now, drop the VIDEO_LOGO code to avoid confusion with the new
implementation.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/video/cfb_console.c | 325 +-----------------------------------
 1 file changed, 1 insertion(+), 324 deletions(-)

diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 7df7d57e6ec..52b109f1551 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -42,11 +42,6 @@
  * VIDEO_TSTC_FCT	      - keyboard_tstc function
  * VIDEO_GETC_FCT	      - keyboard_getc function
  *
- * CONFIG_VIDEO_LOGO	      - display Linux Logo in upper left corner.
- *				Use CONFIG_SPLASH_SCREEN_ALIGN with
- *				environment variable "splashpos" to place
- *				the logo on other position. In this case
- *				no CONSOLE_EXTRA_INFO is possible.
  * CONFIG_VIDEO_BMP_LOGO      - use bmp_logo instead of linux_logo
  * CONFIG_CONSOLE_EXTRA_INFO  - display additional board information
  *				strings that normaly goes to serial
@@ -127,34 +122,6 @@ void console_cursor(int state);
 #define CURSOR_SET video_set_cursor()
 #endif /* CONFIG_VIDEO_SW_CURSOR */
 
-#ifdef	CONFIG_VIDEO_LOGO
-#ifdef	CONFIG_VIDEO_BMP_LOGO
-#include <bmp_logo.h>
-#include <bmp_logo_data.h>
-#define VIDEO_LOGO_WIDTH	BMP_LOGO_WIDTH
-#define VIDEO_LOGO_HEIGHT	BMP_LOGO_HEIGHT
-#define VIDEO_LOGO_LUT_OFFSET	BMP_LOGO_OFFSET
-#define VIDEO_LOGO_COLORS	BMP_LOGO_COLORS
-
-#else  /* CONFIG_VIDEO_BMP_LOGO */
-#define LINUX_LOGO_WIDTH	80
-#define LINUX_LOGO_HEIGHT	80
-#define LINUX_LOGO_COLORS	214
-#define LINUX_LOGO_LUT_OFFSET	0x20
-#define __initdata
-#include <linux_logo.h>
-#define VIDEO_LOGO_WIDTH	LINUX_LOGO_WIDTH
-#define VIDEO_LOGO_HEIGHT	LINUX_LOGO_HEIGHT
-#define VIDEO_LOGO_LUT_OFFSET	LINUX_LOGO_LUT_OFFSET
-#define VIDEO_LOGO_COLORS	LINUX_LOGO_COLORS
-#endif /* CONFIG_VIDEO_BMP_LOGO */
-#define VIDEO_INFO_X		(VIDEO_LOGO_WIDTH)
-#define VIDEO_INFO_Y		(VIDEO_FONT_HEIGHT/2)
-#else  /* CONFIG_VIDEO_LOGO */
-#define VIDEO_LOGO_WIDTH	0
-#define VIDEO_LOGO_HEIGHT	0
-#endif /* CONFIG_VIDEO_LOGO */
-
 #define VIDEO_COLS		VIDEO_VISIBLE_COLS
 #define VIDEO_ROWS		VIDEO_VISIBLE_ROWS
 #ifndef VIDEO_LINE_LEN
@@ -163,11 +130,7 @@ void console_cursor(int state);
 #define VIDEO_SIZE		(VIDEO_ROWS * VIDEO_LINE_LEN)
 #define VIDEO_BURST_LEN		(VIDEO_COLS/8)
 
-#ifdef	CONFIG_VIDEO_LOGO
-#define CONSOLE_ROWS		((VIDEO_ROWS - video_logo_height) / VIDEO_FONT_HEIGHT)
-#else
 #define CONSOLE_ROWS		(VIDEO_ROWS / VIDEO_FONT_HEIGHT)
-#endif
 
 #define CONSOLE_COLS		(VIDEO_COLS / VIDEO_FONT_WIDTH)
 #define CONSOLE_ROW_SIZE	(VIDEO_FONT_HEIGHT * VIDEO_LINE_LEN)
@@ -214,7 +177,7 @@ static GraphicDevice *pGD;	/* Pointer to Graphic array */
 static void *video_fb_address;	/* frame buffer address */
 static void *video_console_address;	/* console buffer start address */
 
-static int video_logo_height = VIDEO_LOGO_HEIGHT;
+static int video_logo_height;		/* not supported anymore */
 
 static int __maybe_unused cursor_state;
 static int __maybe_unused old_col;
@@ -1670,292 +1633,6 @@ int video_display_bitmap(ulong bmp_image, int x, int y)
 }
 #endif
 
-
-#ifdef CONFIG_VIDEO_LOGO
-static int video_logo_xpos;
-static int video_logo_ypos;
-
-static void plot_logo_or_black(void *screen, int x, int y, int black);
-
-static void logo_plot(void *screen, int x, int y)
-{
-	plot_logo_or_black(screen, x, y, 0);
-}
-
-static void logo_black(void)
-{
-	plot_logo_or_black(video_fb_address, video_logo_xpos, video_logo_ypos,
-			1);
-}
-
-static int do_clrlogo(struct cmd_tbl *cmdtp, int flag, int argc,
-		      char *const argv[])
-{
-	if (argc != 1)
-		return cmd_usage(cmdtp);
-
-	logo_black();
-	return 0;
-}
-
-U_BOOT_CMD(
-	   clrlogo, 1, 0, do_clrlogo,
-	   "fill the boot logo area with black",
-	   " "
-	   );
-
-static void plot_logo_or_black(void *screen, int x, int y, int black)
-{
-
-	int xcount, i;
-	int skip = VIDEO_LINE_LEN - VIDEO_LOGO_WIDTH * VIDEO_PIXEL_SIZE;
-	int ycount = video_logo_height;
-	unsigned char r, g, b, *logo_red, *logo_blue, *logo_green;
-	unsigned char *source;
-	unsigned char *dest;
-
-#ifdef CONFIG_SPLASH_SCREEN_ALIGN
-	if (x == BMP_ALIGN_CENTER)
-		x = max(0, (int)(VIDEO_VISIBLE_COLS - VIDEO_LOGO_WIDTH) / 2);
-	else if (x < 0)
-		x = max(0, (int)(VIDEO_VISIBLE_COLS - VIDEO_LOGO_WIDTH + x + 1));
-
-	if (y == BMP_ALIGN_CENTER)
-		y = max(0, (int)(VIDEO_VISIBLE_ROWS - VIDEO_LOGO_HEIGHT) / 2);
-	else if (y < 0)
-		y = max(0, (int)(VIDEO_VISIBLE_ROWS - VIDEO_LOGO_HEIGHT + y + 1));
-#endif /* CONFIG_SPLASH_SCREEN_ALIGN */
-
-	dest = (unsigned char *)screen + y * VIDEO_LINE_LEN + x * VIDEO_PIXEL_SIZE;
-
-#ifdef CONFIG_VIDEO_BMP_LOGO
-	source = bmp_logo_bitmap;
-
-	/* Allocate temporary space for computing colormap */
-	logo_red = malloc(BMP_LOGO_COLORS);
-	logo_green = malloc(BMP_LOGO_COLORS);
-	logo_blue = malloc(BMP_LOGO_COLORS);
-	/* Compute color map */
-	for (i = 0; i < VIDEO_LOGO_COLORS; i++) {
-		logo_red[i] = (bmp_logo_palette[i] & 0x0f00) >> 4;
-		logo_green[i] = (bmp_logo_palette[i] & 0x00f0);
-		logo_blue[i] = (bmp_logo_palette[i] & 0x000f) << 4;
-	}
-#else
-	source = linux_logo;
-	logo_red = linux_logo_red;
-	logo_green = linux_logo_green;
-	logo_blue = linux_logo_blue;
-#endif
-
-	if (VIDEO_DATA_FORMAT == GDF__8BIT_INDEX) {
-		for (i = 0; i < VIDEO_LOGO_COLORS; i++) {
-			video_set_lut(i + VIDEO_LOGO_LUT_OFFSET,
-				      logo_red[i], logo_green[i],
-				      logo_blue[i]);
-		}
-	}
-
-	while (ycount--) {
-#if defined(VIDEO_FB_16BPP_PIXEL_SWAP)
-		int xpos = x;
-#endif
-		xcount = VIDEO_LOGO_WIDTH;
-		while (xcount--) {
-			if (black) {
-				r = 0x00;
-				g = 0x00;
-				b = 0x00;
-			} else {
-				r = logo_red[*source - VIDEO_LOGO_LUT_OFFSET];
-				g = logo_green[*source - VIDEO_LOGO_LUT_OFFSET];
-				b = logo_blue[*source - VIDEO_LOGO_LUT_OFFSET];
-			}
-
-			switch (VIDEO_DATA_FORMAT) {
-			case GDF__8BIT_INDEX:
-				*dest = *source;
-				break;
-			case GDF__8BIT_332RGB:
-				*dest = ((r >> 5) << 5) |
-					((g >> 5) << 2) |
-					 (b >> 6);
-				break;
-			case GDF_15BIT_555RGB:
-#if defined(VIDEO_FB_16BPP_PIXEL_SWAP)
-				fill_555rgb_pswap(dest, xpos++, r, g, b);
-#else
-				*(unsigned short *) dest =
-					SWAP16((unsigned short) (
-							((r >> 3) << 10) |
-							((g >> 3) <<  5) |
-							 (b >> 3)));
-#endif
-				break;
-			case GDF_16BIT_565RGB:
-				*(unsigned short *) dest =
-					SWAP16((unsigned short) (
-							((r >> 3) << 11) |
-							((g >> 2) <<  5) |
-							 (b >> 3)));
-				break;
-			case GDF_32BIT_X888RGB:
-				*(u32 *) dest =
-					SWAP32((u32) (
-							(r << 16) |
-							(g <<  8) |
-							 b));
-				break;
-			case GDF_24BIT_888RGB:
-#ifdef VIDEO_FB_LITTLE_ENDIAN
-				dest[0] = b;
-				dest[1] = g;
-				dest[2] = r;
-#else
-				dest[0] = r;
-				dest[1] = g;
-				dest[2] = b;
-#endif
-				break;
-			}
-			source++;
-			dest += VIDEO_PIXEL_SIZE;
-		}
-		dest += skip;
-	}
-#ifdef CONFIG_VIDEO_BMP_LOGO
-	free(logo_red);
-	free(logo_green);
-	free(logo_blue);
-#endif
-}
-
-static void *video_logo(void)
-{
-	char info[128];
-	__maybe_unused int y_off = 0;
-	__maybe_unused ulong addr;
-	__maybe_unused char *s;
-	__maybe_unused int len, ret, space;
-
-	splash_get_pos(&video_logo_xpos, &video_logo_ypos);
-
-#ifdef CONFIG_SPLASH_SCREEN
-	s = env_get("splashimage");
-	if (s != NULL) {
-		ret = splash_screen_prepare();
-		if (ret < 0)
-			return video_fb_address;
-		addr = hextoul(s, NULL);
-
-		if (video_display_bitmap(addr,
-					video_logo_xpos,
-					video_logo_ypos) == 0) {
-			video_logo_height = 0;
-			return ((void *) (video_fb_address));
-		}
-	}
-#endif /* CONFIG_SPLASH_SCREEN */
-
-	logo_plot(video_fb_address, video_logo_xpos, video_logo_ypos);
-
-#ifdef CONFIG_SPLASH_SCREEN_ALIGN
-	/*
-	 * when using splashpos for video_logo, skip any info
-	 * output on video console if the logo is not at 0,0
-	 */
-	if (video_logo_xpos || video_logo_ypos) {
-		/*
-		 * video_logo_height is used in text and cursor offset
-		 * calculations. Since the console is below the logo,
-		 * we need to adjust the logo height
-		 */
-		if (video_logo_ypos == BMP_ALIGN_CENTER)
-			video_logo_height += max(0, (int)(VIDEO_VISIBLE_ROWS -
-						     VIDEO_LOGO_HEIGHT) / 2);
-		else if (video_logo_ypos > 0)
-			video_logo_height += video_logo_ypos;
-
-		return video_fb_address + video_logo_height * VIDEO_LINE_LEN;
-	}
-#endif
-	if (board_cfb_skip())
-		return 0;
-
-	sprintf(info, " %s", version_string);
-
-#ifndef CONFIG_HIDE_LOGO_VERSION
-	space = (VIDEO_COLS - VIDEO_INFO_X) / VIDEO_FONT_WIDTH;
-	len = strlen(info);
-
-	if (len > space) {
-		int xx = VIDEO_INFO_X, yy = VIDEO_INFO_Y;
-		uchar *p = (uchar *) info;
-
-		while (len) {
-			if (len > space) {
-				video_drawchars(xx, yy, p, space);
-				len -= space;
-
-				p = (uchar *)p + space;
-
-				if (!y_off) {
-					xx += VIDEO_FONT_WIDTH;
-					space--;
-				}
-				yy += VIDEO_FONT_HEIGHT;
-
-				y_off++;
-			} else {
-				video_drawchars(xx, yy, p, len);
-				len = 0;
-			}
-		}
-	} else
-		video_drawstring(VIDEO_INFO_X, VIDEO_INFO_Y, (uchar *) info);
-
-#ifdef CONFIG_CONSOLE_EXTRA_INFO
-	{
-		int i, n =
-			((video_logo_height -
-			  VIDEO_FONT_HEIGHT) / VIDEO_FONT_HEIGHT);
-
-		for (i = 1; i < n; i++) {
-			video_get_info_str(i, info);
-			if (!*info)
-				continue;
-
-			len = strlen(info);
-			if (len > space) {
-				video_drawchars(VIDEO_INFO_X,
-						VIDEO_INFO_Y +
-						(i + y_off) *
-							VIDEO_FONT_HEIGHT,
-						(uchar *) info, space);
-				y_off++;
-				video_drawchars(VIDEO_INFO_X +
-						VIDEO_FONT_WIDTH,
-						VIDEO_INFO_Y +
-							(i + y_off) *
-							VIDEO_FONT_HEIGHT,
-						(uchar *) info + space,
-						len - space);
-			} else {
-				video_drawstring(VIDEO_INFO_X,
-						 VIDEO_INFO_Y +
-						 (i + y_off) *
-							VIDEO_FONT_HEIGHT,
-						 (uchar *) info);
-			}
-		}
-	}
-#endif
-#endif
-
-	return (video_fb_address + video_logo_height * VIDEO_LINE_LEN);
-}
-#endif
-
 static int cfb_fb_is_in_dram(void)
 {
 	struct bd_info *bd = gd->bd;
-- 
2.34.0.rc2.393.gf8c9666880-goog


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 19/23] video: Support showing the U-Boot logo
  2021-11-19 20:23 [PATCH 00/23] video: Support a U-Boot logo more easily Simon Glass
                   ` (17 preceding siblings ...)
  2021-11-19 20:24 ` [PATCH 18/23] video: Drop VIDEO_LOGO from cfb_console Simon Glass
@ 2021-11-19 20:24 ` Simon Glass
  2022-03-15 16:13   ` Tim Harvey
  2021-11-19 20:24 ` [PATCH 20/23] video: Show the U-Boot logo by default Simon Glass
                   ` (3 subsequent siblings)
  22 siblings, 1 reply; 41+ messages in thread
From: Simon Glass @ 2021-11-19 20:24 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Anatolij Gustschin, Tom Rini, Simon Glass, Alistair Delva,
	Heinrich Schuchardt, Marek Behún, Roger Pau Monne

Show the U-Boot logo by default. This is only 7KB in size so seems like
a useful default for boards that enable a display.

If SPLASH_SCREEN is enabled, it is not enabled by default, so as not to
conflict with that feature.

Also disable it for tests, since we don't want to complicate the output.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/video/Kconfig         |   1 +
 drivers/video/Makefile        |   3 +++
 drivers/video/sandbox_sdl.c   |   2 ++
 drivers/video/u_boot_logo.bmp | Bin 0 -> 6932 bytes
 drivers/video/video-uclass.c  |  26 ++++++++++++++++++++
 include/video.h               |   2 ++
 scripts/Makefile.lib          |  21 +++++++++++++++++
 test/dm/video.c               |  43 +++++++++++++++++++++++++++-------
 8 files changed, 89 insertions(+), 9 deletions(-)
 create mode 100644 drivers/video/u_boot_logo.bmp

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 7a73ecc1f40..e601b47806b 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -17,6 +17,7 @@ config DM_VIDEO
 config VIDEO_LOGO
 	bool "Show the U-Boot logo on the display"
 	depends on DM_VIDEO
+	select VIDEO_BMP_RLE8
 	help
 	  This enables showing the U-Boot logo on the display when a video
 	  device is probed. It appears at the top right. The logo itself is at
diff --git a/drivers/video/Makefile b/drivers/video/Makefile
index 8956b5f9b00..4038395b128 100644
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -17,6 +17,9 @@ obj-$(CONFIG_DM_VIDEO) += video_bmp.o
 obj-$(CONFIG_PANEL) += panel-uclass.o
 obj-$(CONFIG_DM_PANEL_HX8238D) += hx8238d.o
 obj-$(CONFIG_SIMPLE_PANEL) += simple_panel.o
+
+obj-$(CONFIG_VIDEO_LOGO) += u_boot_logo.o
+
 endif
 
 obj-${CONFIG_EXYNOS_FB} += exynos/
diff --git a/drivers/video/sandbox_sdl.c b/drivers/video/sandbox_sdl.c
index 2afe66fab1a..9081c7da62e 100644
--- a/drivers/video/sandbox_sdl.c
+++ b/drivers/video/sandbox_sdl.c
@@ -82,12 +82,14 @@ static void set_bpp(struct udevice *dev, enum video_log2_bpp l2bpp)
 
 int sandbox_sdl_set_bpp(struct udevice *dev, enum video_log2_bpp l2bpp)
 {
+	struct video_uc_plat *uc_plat = dev_get_uclass_plat(dev);
 	int ret;
 
 	if (device_active(dev))
 		return -EINVAL;
 	sandbox_sdl_remove_display();
 
+	uc_plat->hide_logo = true;
 	set_bpp(dev, l2bpp);
 
 	ret = device_probe(dev);
diff --git a/drivers/video/u_boot_logo.bmp b/drivers/video/u_boot_logo.bmp
new file mode 100644
index 0000000000000000000000000000000000000000..47f1e9b99789584d2f6dd71e954b51927b35d783
GIT binary patch
literal 6932
zcmb7J3sjWXwf?sM%m9M}3a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=?pJWRCZ}IWH!~g&Q

literal 0
HcmV?d00001

diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index fafd05e373f..feed9c9a949 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -305,6 +305,24 @@ int video_sync_copy_all(struct udevice *dev)
 
 #endif
 
+#define SPLASH_DECL(_name) \
+	extern u8 __splash_ ## _name ## _begin[]; \
+	extern u8 __splash_ ## _name ## _end[]
+
+#define SPLASH_START(_name)	__splash_ ## _name ## _begin
+
+SPLASH_DECL(u_boot_logo);
+
+static int show_splash(struct udevice *dev)
+{
+	u8 *data = SPLASH_START(u_boot_logo);
+	int ret;
+
+	ret = video_bmp_display(dev, map_to_sysmem(data), -4, 4, true);
+
+	return 0;
+}
+
 /* Set up the display ready for use */
 static int video_post_probe(struct udevice *dev)
 {
@@ -370,6 +388,14 @@ static int video_post_probe(struct udevice *dev)
 		return ret;
 	}
 
+	if (IS_ENABLED(CONFIG_VIDEO_LOGO) && !plat->hide_logo) {
+		ret = show_splash(dev);
+		if (ret) {
+			log_debug("Cannot show splash screen\n");
+			return ret;
+		}
+	}
+
 	return 0;
 };
 
diff --git a/include/video.h b/include/video.h
index 6948cdf5796..59c9d9c18ca 100644
--- a/include/video.h
+++ b/include/video.h
@@ -30,12 +30,14 @@ struct udevice;
  * @base: Base address of frame buffer, 0 if not yet known
  * @copy_base: Base address of a hardware copy of the frame buffer. See
  *	CONFIG_VIDEO_COPY.
+ * @hide_logo: Hide the logo (used for testing)
  */
 struct video_uc_plat {
 	uint align;
 	uint size;
 	ulong base;
 	ulong copy_base;
+	bool hide_logo;
 };
 
 enum video_polarity {
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 39f03398ed8..06cc2d938db 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -372,6 +372,27 @@ cmd_S_ttf=						\
 $(obj)/%.S: $(src)/%.ttf
 	$(call cmd,S_ttf)
 
+# Splash logos
+# ---------------------------------------------------------------------------
+
+# Generate an assembly file to wrap the splash data
+quiet_cmd_S_splash= TTF     $@
+# Modified for U-Boot
+cmd_S_splash=						\
+(							\
+	echo '.section .rodata.splash.init,"a"';		\
+	echo '.balign 16';				\
+	echo '.global __splash_$(*F)_begin';		\
+	echo '__splash_$(*F)_begin:';			\
+	echo '.incbin "$<" ';				\
+	echo '__splash_$(*F)_end:';			\
+	echo '.global __splash_$(*F)_end';			\
+	echo '.balign 16';				\
+) > $@
+
+$(obj)/%.S: $(src)/%.bmp
+	$(call cmd,S_splash)
+
 # EFI applications
 # A Makefile target *.efi is built as EFI application.
 # A Makefile target *_efi.S wraps *.efi as built-in EFI application.
diff --git a/test/dm/video.c b/test/dm/video.c
index 4e76574a913..d4a3c9c6c17 100644
--- a/test/dm/video.c
+++ b/test/dm/video.c
@@ -115,6 +115,31 @@ static int select_vidconsole(struct unit_test_state *uts, const char *drv_name)
 	return 0;
 }
 
+/**
+ * video_get_nologo() - Disable the logo on the video device and return it
+ *
+ * @uts: Test state
+ * @devp: Returns video device
+ * @return 0 if OK, -ve on error
+ */
+static int video_get_nologo(struct unit_test_state *uts, struct udevice **devp)
+{
+	struct video_uc_plat *uc_plat;
+	struct udevice *dev;
+
+	ut_assertok(uclass_find_first_device(UCLASS_VIDEO, &dev));
+	ut_assertnonnull(dev);
+	uc_plat = dev_get_uclass_plat(dev);
+	uc_plat->hide_logo = true;
+
+	/* now probe it */
+	ut_assertok(uclass_first_device_err(UCLASS_VIDEO, &dev));
+	ut_assertnonnull(dev);
+	*devp = dev;
+
+	return 0;
+}
+
 /* Test text output works on the video console */
 static int dm_test_video_text(struct unit_test_state *uts)
 {
@@ -125,7 +150,7 @@ static int dm_test_video_text(struct unit_test_state *uts)
 #define SCROLL_LINES	100
 
 	ut_assertok(select_vidconsole(uts, "vidconsole0"));
-	ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
+	ut_assertok(video_get_nologo(uts, &dev));
 	ut_asserteq(46, compress_frame_buffer(uts, dev));
 
 	ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con));
@@ -157,7 +182,7 @@ static int dm_test_video_chars(struct unit_test_state *uts)
 	const char *test_string = "Well\b\b\b\bxhe is\r \n\ta very \amodest  \bman\n\t\tand Has much to\b\bto be modest about.";
 
 	ut_assertok(select_vidconsole(uts, "vidconsole0"));
-	ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
+	ut_assertok(video_get_nologo(uts, &dev));
 	ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con));
 	vidconsole_put_string(con, test_string);
 	ut_asserteq(466, compress_frame_buffer(uts, dev));
@@ -174,7 +199,7 @@ static int dm_test_video_ansi(struct unit_test_state *uts)
 	struct udevice *dev, *con;
 
 	ut_assertok(select_vidconsole(uts, "vidconsole0"));
-	ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
+	ut_assertok(video_get_nologo(uts, &dev));
 	ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con));
 
 	/* reference clear: */
@@ -222,7 +247,7 @@ static int check_vidconsole_output(struct unit_test_state *uts, int rot,
 	plat = dev_get_plat(dev);
 	plat->rot = rot;
 
-	ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
+	ut_assertok(video_get_nologo(uts, &dev));
 	ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con));
 	ut_asserteq(46, compress_frame_buffer(uts, dev));
 
@@ -311,7 +336,7 @@ static int dm_test_video_bmp(struct unit_test_state *uts)
 	struct udevice *dev;
 	ulong addr;
 
-	ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
+	ut_assertok(video_get_nologo(uts, &dev));
 	ut_assertok(read_file(uts, "tools/logos/denx.bmp", &addr));
 
 	ut_assertok(video_bmp_display(dev, addr, 0, 0, false));
@@ -433,7 +458,7 @@ static int dm_test_video_bmp_comp(struct unit_test_state *uts)
 	struct udevice *dev;
 	ulong addr;
 
-	ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
+	ut_assertok(video_get_nologo(uts, &dev));
 	ut_assertok(read_file(uts, "tools/logos/denx-comp.bmp", &addr));
 
 	ut_assertok(video_bmp_display(dev, addr, 0, 0, false));
@@ -487,7 +512,7 @@ static int dm_test_video_truetype(struct unit_test_state *uts)
 	struct udevice *dev, *con;
 	const char *test_string = "Criticism may not be agreeable, but it is necessary. It fulfils the same function as pain in the human body. It calls attention to an unhealthy state of things. Some see private enterprise as a predatory target to be shot, others as a cow to be milked, but few are those who see it as a sturdy horse pulling the wagon. The \aprice OF\b\bof greatness\n\tis responsibility.\n\nBye";
 
-	ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
+	ut_assertok(video_get_nologo(uts, &dev));
 	ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con));
 	vidconsole_put_string(con, test_string);
 	ut_asserteq(12237, compress_frame_buffer(uts, dev));
@@ -508,7 +533,7 @@ static int dm_test_video_truetype_scroll(struct unit_test_state *uts)
 	plat = dev_get_plat(dev);
 	plat->font_size = 100;
 
-	ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
+	ut_assertok(video_get_nologo(uts, &dev));
 	ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con));
 	vidconsole_put_string(con, test_string);
 	ut_asserteq(35030, compress_frame_buffer(uts, dev));
@@ -529,7 +554,7 @@ static int dm_test_video_truetype_bs(struct unit_test_state *uts)
 	plat = dev_get_plat(dev);
 	plat->font_size = 100;
 
-	ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
+	ut_assertok(video_get_nologo(uts, &dev));
 	ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con));
 	vidconsole_put_string(con, test_string);
 	ut_asserteq(29018, compress_frame_buffer(uts, dev));
-- 
2.34.0.rc2.393.gf8c9666880-goog


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 20/23] video: Show the U-Boot logo by default
  2021-11-19 20:23 [PATCH 00/23] video: Support a U-Boot logo more easily Simon Glass
                   ` (18 preceding siblings ...)
  2021-11-19 20:24 ` [PATCH 19/23] video: Support showing the U-Boot logo Simon Glass
@ 2021-11-19 20:24 ` Simon Glass
  2021-11-19 20:24 ` [PATCH 21/23] video: Support virtio devices with the splash screen Simon Glass
                   ` (2 subsequent siblings)
  22 siblings, 0 replies; 41+ messages in thread
From: Simon Glass @ 2021-11-19 20:24 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Anatolij Gustschin, Tom Rini, Simon Glass, Soeren Moch

Enable this for boards with a display, unless they are using the SPLASH
feature.

This shows a U-Boot logo on boards with a display, which seems like a
useful thing.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 configs/gurnard_defconfig | 1 +
 configs/tbs2910_defconfig | 1 +
 drivers/video/Kconfig     | 1 +
 3 files changed, 3 insertions(+)

diff --git a/configs/gurnard_defconfig b/configs/gurnard_defconfig
index 7c7974c123c..a034cad3608 100644
--- a/configs/gurnard_defconfig
+++ b/configs/gurnard_defconfig
@@ -50,5 +50,6 @@ CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_DM_VIDEO=y
+# CONFIG_VIDEO_LOGO is not set
 # CONFIG_VIDEO_BPP32 is not set
 CONFIG_CMD_DHRYSTONE=y
diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig
index c623a547733..e1278f2e70a 100644
--- a/configs/tbs2910_defconfig
+++ b/configs/tbs2910_defconfig
@@ -94,6 +94,7 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_DM_VIDEO=y
+# CONFIG_VIDEO_LOGO is not set
 # CONFIG_BACKLIGHT is not set
 # CONFIG_CMD_VIDCONSOLE is not set
 # CONFIG_VIDEO_BPP8 is not set
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index e601b47806b..cfa08b501ba 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -17,6 +17,7 @@ config DM_VIDEO
 config VIDEO_LOGO
 	bool "Show the U-Boot logo on the display"
 	depends on DM_VIDEO
+	default y if !SPLASH_SCREEN
 	select VIDEO_BMP_RLE8
 	help
 	  This enables showing the U-Boot logo on the display when a video
-- 
2.34.0.rc2.393.gf8c9666880-goog


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 21/23] video: Support virtio devices with the splash screen
  2021-11-19 20:23 [PATCH 00/23] video: Support a U-Boot logo more easily Simon Glass
                   ` (19 preceding siblings ...)
  2021-11-19 20:24 ` [PATCH 20/23] video: Show the U-Boot logo by default Simon Glass
@ 2021-11-19 20:24 ` Simon Glass
  2021-11-23  2:08   ` Jaehoon Chung
  2021-11-19 20:24 ` [PATCH 22/23] x86: coreboot: Support getting a logo from virtio Simon Glass
  2021-11-19 20:24 ` [PATCH 23/23] x86: coreboot: Add a sample script to build a qemu image Simon Glass
  22 siblings, 1 reply; 41+ messages in thread
From: Simon Glass @ 2021-11-19 20:24 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Anatolij Gustschin, Tom Rini, Simon Glass, Bin Meng, Jaehoon Chung

This is useful for showing a logo when booting from qemu.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 common/splash_source.c | 14 ++++++++++++++
 include/splash.h       |  1 +
 include/virtio.h       |  1 +
 3 files changed, 16 insertions(+)

diff --git a/common/splash_source.c b/common/splash_source.c
index d05670f5ee8..2c03cbdf928 100644
--- a/common/splash_source.c
+++ b/common/splash_source.c
@@ -20,6 +20,7 @@
 #include <spi_flash.h>
 #include <splash.h>
 #include <usb.h>
+#include <virtio.h>
 #include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -179,6 +180,16 @@ static inline int splash_init_sata(void)
 }
 #endif
 
+static int splash_init_virtio(void)
+{
+	if (!IS_ENABLED(CONFIG_VIRTIO)) {
+		printf("Cannot load splash image: no virtio support\n");
+		return -ENOSYS;
+	} else {
+		return virtio_init();
+	}
+}
+
 #ifdef CONFIG_CMD_UBIFS
 static int splash_mount_ubifs(struct splash_location *location)
 {
@@ -233,6 +244,9 @@ static int splash_load_fs(struct splash_location *location, u32 bmp_load_addr)
 	if (location->storage == SPLASH_STORAGE_SATA)
 		res = splash_init_sata();
 
+	if (location->storage == SPLASH_STORAGE_VIRTIO)
+		res = splash_init_virtio();
+
 	if (location->ubivol != NULL)
 		res = splash_mount_ubifs(location);
 
diff --git a/include/splash.h b/include/splash.h
index 7fd2de8fea1..33e45e69416 100644
--- a/include/splash.h
+++ b/include/splash.h
@@ -30,6 +30,7 @@ enum splash_storage {
 	SPLASH_STORAGE_MMC,
 	SPLASH_STORAGE_USB,
 	SPLASH_STORAGE_SATA,
+	SPLASH_STORAGE_VIRTIO,
 };
 
 enum splash_flags {
diff --git a/include/virtio.h b/include/virtio.h
index a42bdad6b87..34e2bfdcdd3 100644
--- a/include/virtio.h
+++ b/include/virtio.h
@@ -20,6 +20,7 @@
 #ifndef __VIRTIO_H__
 #define __VIRTIO_H__
 
+#include <virtio_types.h>
 #include <linux/bitops.h>
 #include <linux/bug.h>
 #define VIRTIO_ID_NET		1 /* virtio net */
-- 
2.34.0.rc2.393.gf8c9666880-goog


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 22/23] x86: coreboot: Support getting a logo from virtio
  2021-11-19 20:23 [PATCH 00/23] video: Support a U-Boot logo more easily Simon Glass
                   ` (20 preceding siblings ...)
  2021-11-19 20:24 ` [PATCH 21/23] video: Support virtio devices with the splash screen Simon Glass
@ 2021-11-19 20:24 ` Simon Glass
  2021-11-19 20:24 ` [PATCH 23/23] x86: coreboot: Add a sample script to build a qemu image Simon Glass
  22 siblings, 0 replies; 41+ messages in thread
From: Simon Glass @ 2021-11-19 20:24 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Anatolij Gustschin, Tom Rini, Simon Glass, Bin Meng,
	Patrick Delaunay, Rick Chen, Sean Anderson, Stefan Reinauer,
	Tero Kristo, Vadim Bendebury

Enable this feature so that a splash screen can be provided.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 board/coreboot/coreboot/coreboot.c | 20 ++++++++++++++++++--
 include/configs/coreboot.h         |  3 +++
 include/configs/x86-common.h       |  6 +++++-
 3 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/board/coreboot/coreboot/coreboot.c b/board/coreboot/coreboot/coreboot.c
index 11294d6e870..3b90ae75386 100644
--- a/board/coreboot/coreboot/coreboot.c
+++ b/board/coreboot/coreboot/coreboot.c
@@ -4,10 +4,11 @@
  */
 
 #include <common.h>
-#include <asm/cb_sysinfo.h>
-#include <asm/global_data.h>
+#include <splash.h>
 #include <init.h>
 #include <smbios.h>
+#include <asm/cb_sysinfo.h>
+#include <asm/global_data.h>
 
 int board_early_init_r(void)
 {
@@ -65,3 +66,18 @@ fallback:
 	return checkboard();
 }
 #endif
+
+static struct splash_location coreboot_splash_locations[] = {
+	{
+		.name = "virtio_fs",
+		.storage = SPLASH_STORAGE_VIRTIO,
+		.flags = SPLASH_STORAGE_RAW,
+		.devpart = "0",
+	},
+};
+
+int splash_screen_prepare(void)
+{
+	return splash_source_load(coreboot_splash_locations,
+				  ARRAY_SIZE(coreboot_splash_locations));
+}
diff --git a/include/configs/coreboot.h b/include/configs/coreboot.h
index 1cf5c037e85..d6d679fd7dd 100644
--- a/include/configs/coreboot.h
+++ b/include/configs/coreboot.h
@@ -10,6 +10,9 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#define SPLASH_SETTINGS "splashsource=virtio_fs\0" \
+	"splashimage=0x1000000\0"
+
 #include <configs/x86-common.h>
 
 #define CONFIG_SYS_MONITOR_LEN		(1 << 20)
diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h
index 486b5ca7765..2d280d5df60 100644
--- a/include/configs/x86-common.h
+++ b/include/configs/x86-common.h
@@ -88,9 +88,14 @@
 #define DISTRO_BOOTENV
 #endif
 
+#ifndef SPLASH_SETTINGS
+#define SPLASH_SETTINGS
+#endif
+
 #define CONFIG_EXTRA_ENV_SETTINGS			\
 	DISTRO_BOOTENV					\
 	CONFIG_STD_DEVICES_SETTINGS			\
+	SPLASH_SETTINGS					\
 	"pciconfighost=1\0"				\
 	"netdev=eth0\0"					\
 	"consoledev=ttyS0\0"				\
@@ -100,7 +105,6 @@
 	"ramdisk_addr_r=0x4000000\0"			\
 	"ramdiskfile=initramfs.gz\0"
 
-
 #define RAMBOOTCOMMAND				\
 	"setenv bootargs root=/dev/ram rw "		\
 	"ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
-- 
2.34.0.rc2.393.gf8c9666880-goog


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 23/23] x86: coreboot: Add a sample script to build a qemu image
  2021-11-19 20:23 [PATCH 00/23] video: Support a U-Boot logo more easily Simon Glass
                   ` (21 preceding siblings ...)
  2021-11-19 20:24 ` [PATCH 22/23] x86: coreboot: Support getting a logo from virtio Simon Glass
@ 2021-11-19 20:24 ` Simon Glass
  22 siblings, 0 replies; 41+ messages in thread
From: Simon Glass @ 2021-11-19 20:24 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Anatolij Gustschin, Tom Rini, Simon Glass, Bin Meng,
	Stefan Reinauer, Vadim Bendebury

It is useful to boot coreboot (with U-Boot as a payload) from qemu. Add
a sample script to show how to do this.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 scripts/build-cb.sh | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100755 scripts/build-cb.sh

diff --git a/scripts/build-cb.sh b/scripts/build-cb.sh
new file mode 100755
index 00000000000..1da708fb6e1
--- /dev/null
+++ b/scripts/build-cb.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Sample script to build a disk image suitable for use with coreboot. The image
+# includes a kernel and initrd.
+#
+# YOU WILL NEED to modify this for your needs, e.g. select a kernel.
+#
+# Run this with:
+# qemu-system-i386 -bios coreboot.rom -drive file=disk.img,if=virtio
+
+qemu-img create -f raw disk.img 120M
+mkfs.ext2 -F disk.img
+sudo mkdir -p /mnt/rootfs
+sudo mount -o loop disk.img /mnt/rootfs
+sudo mkdir -p /mnt/rootfs/boot
+sudo cp /boot/vmlinuz /mnt/rootfs/boot/.
+sudo cp /boot/initrd.img /mnt/rootfs/boot/.
+sudo umount /mnt/rootfs
-- 
2.34.0.rc2.393.gf8c9666880-goog


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* Re: [PATCH 21/23] video: Support virtio devices with the splash screen
  2021-11-19 20:24 ` [PATCH 21/23] video: Support virtio devices with the splash screen Simon Glass
@ 2021-11-23  2:08   ` Jaehoon Chung
  2021-11-23  3:02     ` Peng Fan (OSS)
  0 siblings, 1 reply; 41+ messages in thread
From: Jaehoon Chung @ 2021-11-23  2:08 UTC (permalink / raw)
  To: Simon Glass, U-Boot Mailing List; +Cc: Anatolij Gustschin, Tom Rini, Bin Meng

On 11/20/21 5:24 AM, Simon Glass wrote:
> This is useful for showing a logo when booting from qemu.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
>  common/splash_source.c | 14 ++++++++++++++
>  include/splash.h       |  1 +
>  include/virtio.h       |  1 +
>  3 files changed, 16 insertions(+)
> 
> diff --git a/common/splash_source.c b/common/splash_source.c
> index d05670f5ee8..2c03cbdf928 100644
> --- a/common/splash_source.c
> +++ b/common/splash_source.c
> @@ -20,6 +20,7 @@
>  #include <spi_flash.h>
>  #include <splash.h>
>  #include <usb.h>
> +#include <virtio.h>
>  #include <asm/global_data.h>
>  
>  DECLARE_GLOBAL_DATA_PTR;
> @@ -179,6 +180,16 @@ static inline int splash_init_sata(void)
>  }
>  #endif
>  
> +static int splash_init_virtio(void)
> +{
> +	if (!IS_ENABLED(CONFIG_VIRTIO)) {
> +		printf("Cannot load splash image: no virtio support\n");
> +		return -ENOSYS;
> +	} else {
> +		return virtio_init();
> +	}

Doesn't need to add "else" ?

Best Regards,
Jaehoon Chung

> +}
> +
>  #ifdef CONFIG_CMD_UBIFS
>  static int splash_mount_ubifs(struct splash_location *location)
>  {
> @@ -233,6 +244,9 @@ static int splash_load_fs(struct splash_location *location, u32 bmp_load_addr)
>  	if (location->storage == SPLASH_STORAGE_SATA)
>  		res = splash_init_sata();
>  
> +	if (location->storage == SPLASH_STORAGE_VIRTIO)
> +		res = splash_init_virtio();
> +
>  	if (location->ubivol != NULL)
>  		res = splash_mount_ubifs(location);
>  
> diff --git a/include/splash.h b/include/splash.h
> index 7fd2de8fea1..33e45e69416 100644
> --- a/include/splash.h
> +++ b/include/splash.h
> @@ -30,6 +30,7 @@ enum splash_storage {
>  	SPLASH_STORAGE_MMC,
>  	SPLASH_STORAGE_USB,
>  	SPLASH_STORAGE_SATA,
> +	SPLASH_STORAGE_VIRTIO,
>  };
>  
>  enum splash_flags {
> diff --git a/include/virtio.h b/include/virtio.h
> index a42bdad6b87..34e2bfdcdd3 100644
> --- a/include/virtio.h
> +++ b/include/virtio.h
> @@ -20,6 +20,7 @@
>  #ifndef __VIRTIO_H__
>  #define __VIRTIO_H__
>  
> +#include <virtio_types.h>
>  #include <linux/bitops.h>
>  #include <linux/bug.h>
>  #define VIRTIO_ID_NET		1 /* virtio net */
> 


^ permalink raw reply	[flat|nested] 41+ messages in thread

* RE: [PATCH 21/23] video: Support virtio devices with the splash screen
  2021-11-23  2:08   ` Jaehoon Chung
@ 2021-11-23  3:02     ` Peng Fan (OSS)
  0 siblings, 0 replies; 41+ messages in thread
From: Peng Fan (OSS) @ 2021-11-23  3:02 UTC (permalink / raw)
  To: Jaehoon Chung, Simon Glass, U-Boot Mailing List
  Cc: Anatolij Gustschin, Tom Rini, Bin Meng

> Subject: Re: [PATCH 21/23] video: Support virtio devices with the splash
> screen
> 
> On 11/20/21 5:24 AM, Simon Glass wrote:
> > This is useful for showing a logo when booting from qemu.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> >  common/splash_source.c | 14 ++++++++++++++
> >  include/splash.h       |  1 +
> >  include/virtio.h       |  1 +
> >  3 files changed, 16 insertions(+)
> >
> > diff --git a/common/splash_source.c b/common/splash_source.c index
> > d05670f5ee8..2c03cbdf928 100644
> > --- a/common/splash_source.c
> > +++ b/common/splash_source.c
> > @@ -20,6 +20,7 @@
> >  #include <spi_flash.h>
> >  #include <splash.h>
> >  #include <usb.h>
> > +#include <virtio.h>
> >  #include <asm/global_data.h>
> >
> >  DECLARE_GLOBAL_DATA_PTR;
> > @@ -179,6 +180,16 @@ static inline int splash_init_sata(void)  }
> > #endif
> >
> > +static int splash_init_virtio(void)
> > +{
> > +	if (!IS_ENABLED(CONFIG_VIRTIO)) {
> > +		printf("Cannot load splash image: no virtio support\n");
> > +		return -ENOSYS;
> > +	} else {
> > +		return virtio_init();
> > +	}
> 
> Doesn't need to add "else" ?

Checkpatch would report warning remove else per my understanding.

-Peng

> 
> Best Regards,
> Jaehoon Chung
> 
> > +}
> > +
> >  #ifdef CONFIG_CMD_UBIFS
> >  static int splash_mount_ubifs(struct splash_location *location)  { @@
> > -233,6 +244,9 @@ static int splash_load_fs(struct splash_location *location,
> u32 bmp_load_addr)
> >  	if (location->storage == SPLASH_STORAGE_SATA)
> >  		res = splash_init_sata();
> >
> > +	if (location->storage == SPLASH_STORAGE_VIRTIO)
> > +		res = splash_init_virtio();
> > +
> >  	if (location->ubivol != NULL)
> >  		res = splash_mount_ubifs(location);
> >
> > diff --git a/include/splash.h b/include/splash.h index
> > 7fd2de8fea1..33e45e69416 100644
> > --- a/include/splash.h
> > +++ b/include/splash.h
> > @@ -30,6 +30,7 @@ enum splash_storage {
> >  	SPLASH_STORAGE_MMC,
> >  	SPLASH_STORAGE_USB,
> >  	SPLASH_STORAGE_SATA,
> > +	SPLASH_STORAGE_VIRTIO,
> >  };
> >
> >  enum splash_flags {
> > diff --git a/include/virtio.h b/include/virtio.h index
> > a42bdad6b87..34e2bfdcdd3 100644
> > --- a/include/virtio.h
> > +++ b/include/virtio.h
> > @@ -20,6 +20,7 @@
> >  #ifndef __VIRTIO_H__
> >  #define __VIRTIO_H__
> >
> > +#include <virtio_types.h>
> >  #include <linux/bitops.h>
> >  #include <linux/bug.h>
> >  #define VIRTIO_ID_NET		1 /* virtio net */
> >


^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PATCH 17/23] video: Convert CONFIG_VIDEO_LOGO to Kconfig
  2021-11-19 20:24 ` [PATCH 17/23] video: Convert CONFIG_VIDEO_LOGO to Kconfig Simon Glass
@ 2022-01-22 13:26   ` Pali Rohár
  2022-01-22 15:29     ` Tom Rini
  2022-01-22 17:17     ` Simon Glass
  0 siblings, 2 replies; 41+ messages in thread
From: Pali Rohár @ 2022-01-22 13:26 UTC (permalink / raw)
  To: Simon Glass
  Cc: U-Boot Mailing List, Anatolij Gustschin, Tom Rini,
	Marek Behún, Stefan Roese, Stefano Babic

On Friday 19 November 2021 13:24:01 Simon Glass wrote:
> This converts the following to Kconfig:
>    CONFIG_VIDEO_LOGO
> 
> Note that this option depends on CONFIG_DM_VIDEO now, since cfb_console is
> deprecated. The only relevant code is now in splash.c
> 
> Drop the check for DM_VIDEO in that file.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
...
>  include/configs/nokia_rx51.h           | 1 -
...
> diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h
> index b37e05406e9..afb91d96a54 100644
> --- a/include/configs/nokia_rx51.h
> +++ b/include/configs/nokia_rx51.h
> @@ -75,7 +75,6 @@
>   * Framebuffer
>   */
>  /* Video console */
> -#define CONFIG_VIDEO_LOGO
>  #define VIDEO_FB_16BPP_PIXEL_SWAP
>  #define VIDEO_FB_16BPP_WORD_SWAP

Hello!

This change is now in master branch and it broke support for video logo
on Nokia N900 :-( It does not work anymore and reason is because
CONFIG_VIDEO_LOGO was removed from Nokia N900 config files completely,
despite commit subject says CONFIG_VIDEO_LOGO was converted to Kconfig.

Seems that conversion for Nokia N900 is missing. Could you please look
at this issue? It is visible also in qemu, so no real hardware is needed
for reproducing it.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PATCH 17/23] video: Convert CONFIG_VIDEO_LOGO to Kconfig
  2022-01-22 13:26   ` Pali Rohár
@ 2022-01-22 15:29     ` Tom Rini
  2022-01-22 15:41       ` Pali Rohár
  2022-01-22 17:17     ` Simon Glass
  1 sibling, 1 reply; 41+ messages in thread
From: Tom Rini @ 2022-01-22 15:29 UTC (permalink / raw)
  To: Pali Rohár
  Cc: Simon Glass, U-Boot Mailing List, Anatolij Gustschin,
	Marek Behún, Stefan Roese, Stefano Babic

[-- Attachment #1: Type: text/plain, Size: 1538 bytes --]

On Sat, Jan 22, 2022 at 02:26:11PM +0100, Pali Rohár wrote:
> On Friday 19 November 2021 13:24:01 Simon Glass wrote:
> > This converts the following to Kconfig:
> >    CONFIG_VIDEO_LOGO
> > 
> > Note that this option depends on CONFIG_DM_VIDEO now, since cfb_console is
> > deprecated. The only relevant code is now in splash.c
> > 
> > Drop the check for DM_VIDEO in that file.
> > 
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> ...
> >  include/configs/nokia_rx51.h           | 1 -
> ...
> > diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h
> > index b37e05406e9..afb91d96a54 100644
> > --- a/include/configs/nokia_rx51.h
> > +++ b/include/configs/nokia_rx51.h
> > @@ -75,7 +75,6 @@
> >   * Framebuffer
> >   */
> >  /* Video console */
> > -#define CONFIG_VIDEO_LOGO
> >  #define VIDEO_FB_16BPP_PIXEL_SWAP
> >  #define VIDEO_FB_16BPP_WORD_SWAP
> 
> Hello!
> 
> This change is now in master branch and it broke support for video logo
> on Nokia N900 :-( It does not work anymore and reason is because
> CONFIG_VIDEO_LOGO was removed from Nokia N900 config files completely,
> despite commit subject says CONFIG_VIDEO_LOGO was converted to Kconfig.
> 
> Seems that conversion for Nokia N900 is missing. Could you please look
> at this issue? It is visible also in qemu, so no real hardware is needed
> for reproducing it.

This is perhaps as good/bad time as any to ask about the conversion
efforts for N900 USB things that were discussed before?

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PATCH 17/23] video: Convert CONFIG_VIDEO_LOGO to Kconfig
  2022-01-22 15:29     ` Tom Rini
@ 2022-01-22 15:41       ` Pali Rohár
  2022-01-22 18:41         ` Tom Rini
  0 siblings, 1 reply; 41+ messages in thread
From: Pali Rohár @ 2022-01-22 15:41 UTC (permalink / raw)
  To: Tom Rini, Merlijn Wajer, maemo-leste, Ivaylo Dimitrov
  Cc: Simon Glass, U-Boot Mailing List, Anatolij Gustschin,
	Marek Behún, Stefan Roese, Stefano Babic

Adding other Maemo developers...

On Saturday 22 January 2022 10:29:34 Tom Rini wrote:
> This is perhaps as good/bad time as any to ask about the conversion
> efforts for N900 USB things that were discussed before?

Perhaps it is also a good/bad time for reminding that some N900 U-Boot
patches are waiting for review on the list? :-)

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PATCH 17/23] video: Convert CONFIG_VIDEO_LOGO to Kconfig
  2022-01-22 13:26   ` Pali Rohár
  2022-01-22 15:29     ` Tom Rini
@ 2022-01-22 17:17     ` Simon Glass
  1 sibling, 0 replies; 41+ messages in thread
From: Simon Glass @ 2022-01-22 17:17 UTC (permalink / raw)
  To: Pali Rohár
  Cc: U-Boot Mailing List, Anatolij Gustschin, Tom Rini,
	Marek Behún, Stefan Roese, Stefano Babic

Hi Pali,

On Sat, 22 Jan 2022 at 06:26, Pali Rohár <pali@kernel.org> wrote:
>
> On Friday 19 November 2021 13:24:01 Simon Glass wrote:
> > This converts the following to Kconfig:
> >    CONFIG_VIDEO_LOGO
> >
> > Note that this option depends on CONFIG_DM_VIDEO now, since cfb_console is
> > deprecated. The only relevant code is now in splash.c
> >
> > Drop the check for DM_VIDEO in that file.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> ...
> >  include/configs/nokia_rx51.h           | 1 -
> ...
> > diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h
> > index b37e05406e9..afb91d96a54 100644
> > --- a/include/configs/nokia_rx51.h
> > +++ b/include/configs/nokia_rx51.h
> > @@ -75,7 +75,6 @@
> >   * Framebuffer
> >   */
> >  /* Video console */
> > -#define CONFIG_VIDEO_LOGO
> >  #define VIDEO_FB_16BPP_PIXEL_SWAP
> >  #define VIDEO_FB_16BPP_WORD_SWAP
>
> Hello!
>
> This change is now in master branch and it broke support for video logo
> on Nokia N900 :-( It does not work anymore and reason is because
> CONFIG_VIDEO_LOGO was removed from Nokia N900 config files completely,
> despite commit subject says CONFIG_VIDEO_LOGO was converted to Kconfig.
>
> Seems that conversion for Nokia N900 is missing. Could you please look
> at this issue? It is visible also in qemu, so no real hardware is needed
> for reproducing it.

I believe this is because you need to move to DM_VIDEO. Everything
else has, I believe, which is why the migration messages have been
dropped.

+Anatolij Gustschin is looking at removing lcd.c and cfb_console.c I think?

Regards,
Simon

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PATCH 17/23] video: Convert CONFIG_VIDEO_LOGO to Kconfig
  2022-01-22 15:41       ` Pali Rohár
@ 2022-01-22 18:41         ` Tom Rini
  2022-01-23 14:48           ` Pali Rohár
  0 siblings, 1 reply; 41+ messages in thread
From: Tom Rini @ 2022-01-22 18:41 UTC (permalink / raw)
  To: Pali Rohár
  Cc: Merlijn Wajer, maemo-leste, Ivaylo Dimitrov, Simon Glass,
	U-Boot Mailing List, Anatolij Gustschin, Marek Behún,
	Stefan Roese, Stefano Babic

[-- Attachment #1: Type: text/plain, Size: 572 bytes --]

On Sat, Jan 22, 2022 at 04:41:42PM +0100, Pali Rohár wrote:
> Adding other Maemo developers...
> 
> On Saturday 22 January 2022 10:29:34 Tom Rini wrote:
> > This is perhaps as good/bad time as any to ask about the conversion
> > efforts for N900 USB things that were discussed before?
> 
> Perhaps it is also a good/bad time for reminding that some N900 U-Boot
> patches are waiting for review on the list? :-)

The last ones I saw weren't clear what it depended on and should get
re-posted.  But I didn't see anything about the USB DM conversion.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PATCH 17/23] video: Convert CONFIG_VIDEO_LOGO to Kconfig
  2022-01-22 18:41         ` Tom Rini
@ 2022-01-23 14:48           ` Pali Rohár
  2022-01-23 14:54             ` Tom Rini
  0 siblings, 1 reply; 41+ messages in thread
From: Pali Rohár @ 2022-01-23 14:48 UTC (permalink / raw)
  To: Tom Rini
  Cc: Merlijn Wajer, maemo-leste, Ivaylo Dimitrov, Simon Glass,
	U-Boot Mailing List, Anatolij Gustschin, Marek Behún,
	Stefan Roese, Stefano Babic

On Saturday 22 January 2022 13:41:01 Tom Rini wrote:
> On Sat, Jan 22, 2022 at 04:41:42PM +0100, Pali Rohár wrote:
> > Adding other Maemo developers...
> > 
> > On Saturday 22 January 2022 10:29:34 Tom Rini wrote:
> > > This is perhaps as good/bad time as any to ask about the conversion
> > > efforts for N900 USB things that were discussed before?
> > 
> > Perhaps it is also a good/bad time for reminding that some N900 U-Boot
> > patches are waiting for review on the list? :-)
> 
> The last ones I saw weren't clear what it depended on and should get
> re-posted.

And how should I or anybody else know this if nobody is responding to
emails asking for review of pending patches?

> But I didn't see anything about the USB DM conversion.

Of course, as there are waiting other patches and other emails without
replies, it is not a wise idea to start working on something other or
starting discussion about something totally new if existing things are
waiting for maintainers...

I wanted to look at other stuff after pending patches are in accepted
state. But I'm not superman to work on 10 parallel things at the same
time and specially if I see that reviewing N900 patches is slow and
takes about half of year.

If I see that maintainer is busy then I send just one patch and next
after it is accepted. And not sending thousands of patches at the same
time. If I would be in the "busy maintainer" position I also would not
like to see thousands of patches waiting from other developers and
rather would see one patch and after it is accepted then another patch.

So, could you please make a time and look at pending N900 patching?
So we can move forward? I have feeling that this is repeating every year
and the ball is not on my side.

For example I'm still waiting for reply for this email from July 2021:
https://lists.denx.de/pipermail/u-boot/2021-July/455710.html

And sending reminder for another patch in December 2021 has no reply too:
https://lists.denx.de/pipermail/u-boot/2021-December/468744.html

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PATCH 17/23] video: Convert CONFIG_VIDEO_LOGO to Kconfig
  2022-01-23 14:48           ` Pali Rohár
@ 2022-01-23 14:54             ` Tom Rini
  2022-01-23 15:11               ` Pali Rohár
  0 siblings, 1 reply; 41+ messages in thread
From: Tom Rini @ 2022-01-23 14:54 UTC (permalink / raw)
  To: Pali Rohár
  Cc: Merlijn Wajer, maemo-leste, Ivaylo Dimitrov, Simon Glass,
	U-Boot Mailing List, Anatolij Gustschin, Marek Behún,
	Stefan Roese, Stefano Babic

[-- Attachment #1: Type: text/plain, Size: 2723 bytes --]

On Sun, Jan 23, 2022 at 03:48:17PM +0100, Pali Rohár wrote:
> On Saturday 22 January 2022 13:41:01 Tom Rini wrote:
> > On Sat, Jan 22, 2022 at 04:41:42PM +0100, Pali Rohár wrote:
> > > Adding other Maemo developers...
> > > 
> > > On Saturday 22 January 2022 10:29:34 Tom Rini wrote:
> > > > This is perhaps as good/bad time as any to ask about the conversion
> > > > efforts for N900 USB things that were discussed before?
> > > 
> > > Perhaps it is also a good/bad time for reminding that some N900 U-Boot
> > > patches are waiting for review on the list? :-)
> > 
> > The last ones I saw weren't clear what it depended on and should get
> > re-posted.
> 
> And how should I or anybody else know this if nobody is responding to
> emails asking for review of pending patches?

I thought the last time you ping'd on it Lokesh was confused about what
this was on top of / required.

> > But I didn't see anything about the USB DM conversion.
> 
> Of course, as there are waiting other patches and other emails without
> replies, it is not a wise idea to start working on something other or
> starting discussion about something totally new if existing things are
> waiting for maintainers...

I believe it was someone else that is interested in N900 that said they
would look at it.

> I wanted to look at other stuff after pending patches are in accepted
> state. But I'm not superman to work on 10 parallel things at the same
> time and specially if I see that reviewing N900 patches is slow and
> takes about half of year.
> 
> If I see that maintainer is busy then I send just one patch and next
> after it is accepted. And not sending thousands of patches at the same
> time. If I would be in the "busy maintainer" position I also would not
> like to see thousands of patches waiting from other developers and
> rather would see one patch and after it is accepted then another patch.
> 
> So, could you please make a time and look at pending N900 patching?
> So we can move forward? I have feeling that this is repeating every year
> and the ball is not on my side.
> 
> For example I'm still waiting for reply for this email from July 2021:
> https://lists.denx.de/pipermail/u-boot/2021-July/455710.html
> 
> And sending reminder for another patch in December 2021 has no reply too:
> https://lists.denx.de/pipermail/u-boot/2021-December/468744.html

My problem is that re-reading those threads again just now leaves me at
"please re-base and re-post everything because it wasn't clear at all
what goes where".  My only other feedback is that it would I think be
better to move and then update the documentation, not improve, migrate,
improve more.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PATCH 17/23] video: Convert CONFIG_VIDEO_LOGO to Kconfig
  2022-01-23 14:54             ` Tom Rini
@ 2022-01-23 15:11               ` Pali Rohár
  2022-01-23 16:14                 ` Tom Rini
  2022-01-24  9:39                 ` Merlijn Wajer
  0 siblings, 2 replies; 41+ messages in thread
From: Pali Rohár @ 2022-01-23 15:11 UTC (permalink / raw)
  To: Tom Rini
  Cc: Merlijn Wajer, maemo-leste, Ivaylo Dimitrov, Simon Glass,
	U-Boot Mailing List, Anatolij Gustschin, Marek Behún,
	Stefan Roese, Stefano Babic

On Sunday 23 January 2022 09:54:02 Tom Rini wrote:
> On Sun, Jan 23, 2022 at 03:48:17PM +0100, Pali Rohár wrote:
> > On Saturday 22 January 2022 13:41:01 Tom Rini wrote:
> > > On Sat, Jan 22, 2022 at 04:41:42PM +0100, Pali Rohár wrote:
> > > > Adding other Maemo developers...
> > > > 
> > > > On Saturday 22 January 2022 10:29:34 Tom Rini wrote:
> > > > > This is perhaps as good/bad time as any to ask about the conversion
> > > > > efforts for N900 USB things that were discussed before?
> > > > 
> > > > Perhaps it is also a good/bad time for reminding that some N900 U-Boot
> > > > patches are waiting for review on the list? :-)
> > > 
> > > The last ones I saw weren't clear what it depended on and should get
> > > re-posted.
> > 
> > And how should I or anybody else know this if nobody is responding to
> > emails asking for review of pending patches?
> 
> I thought the last time you ping'd on it Lokesh was confused about what
> this was on top of / required.

I think I sent info how to apply it. But as I have not received any
reply even after reminding, how should I have know it?

> > > But I didn't see anything about the USB DM conversion.
> > 
> > Of course, as there are waiting other patches and other emails without
> > replies, it is not a wise idea to start working on something other or
> > starting discussion about something totally new if existing things are
> > waiting for maintainers...
> 
> I believe it was someone else that is interested in N900 that said they
> would look at it.

Yea, for USB it was Merlijn. He wrote me that would reply later to this
thread. This thread started about video and not USB, so there is just
big mix of things and I forgot about what we are talking here...

> > I wanted to look at other stuff after pending patches are in accepted
> > state. But I'm not superman to work on 10 parallel things at the same
> > time and specially if I see that reviewing N900 patches is slow and
> > takes about half of year.
> > 
> > If I see that maintainer is busy then I send just one patch and next
> > after it is accepted. And not sending thousands of patches at the same
> > time. If I would be in the "busy maintainer" position I also would not
> > like to see thousands of patches waiting from other developers and
> > rather would see one patch and after it is accepted then another patch.
> > 
> > So, could you please make a time and look at pending N900 patching?
> > So we can move forward? I have feeling that this is repeating every year
> > and the ball is not on my side.
> > 
> > For example I'm still waiting for reply for this email from July 2021:
> > https://lists.denx.de/pipermail/u-boot/2021-July/455710.html
> > 
> > And sending reminder for another patch in December 2021 has no reply too:
> > https://lists.denx.de/pipermail/u-boot/2021-December/468744.html
> 
> My problem is that re-reading those threads again just now leaves me at
> "please re-base and re-post everything because it wasn't clear at all
> what goes where".  My only other feedback is that it would I think be
> better to move and then update the documentation, not improve, migrate,
> improve more.

Ok, so I will resend patches. When would you have a time to review these
patches? I do not want again to repeat situation that I will send a
patch and after half of year I get reply that it does not apply on
master and rebasing is needed. So please let me know when you would have
a time for review of N900 so I would send patches at correct timing
without need from my side to rebase and rebase patches again and
again... because this is really annoying for me and also wasting of time
... and it happened with more N900 patch in last 2 years.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PATCH 17/23] video: Convert CONFIG_VIDEO_LOGO to Kconfig
  2022-01-23 15:11               ` Pali Rohár
@ 2022-01-23 16:14                 ` Tom Rini
  2022-01-24  9:39                 ` Merlijn Wajer
  1 sibling, 0 replies; 41+ messages in thread
From: Tom Rini @ 2022-01-23 16:14 UTC (permalink / raw)
  To: Pali Rohár
  Cc: Merlijn Wajer, maemo-leste, Ivaylo Dimitrov, Simon Glass,
	U-Boot Mailing List, Anatolij Gustschin, Marek Behún,
	Stefan Roese, Stefano Babic

[-- Attachment #1: Type: text/plain, Size: 4406 bytes --]

On Sun, Jan 23, 2022 at 04:11:00PM +0100, Pali Rohár wrote:
> On Sunday 23 January 2022 09:54:02 Tom Rini wrote:
> > On Sun, Jan 23, 2022 at 03:48:17PM +0100, Pali Rohár wrote:
> > > On Saturday 22 January 2022 13:41:01 Tom Rini wrote:
> > > > On Sat, Jan 22, 2022 at 04:41:42PM +0100, Pali Rohár wrote:
> > > > > Adding other Maemo developers...
> > > > > 
> > > > > On Saturday 22 January 2022 10:29:34 Tom Rini wrote:
> > > > > > This is perhaps as good/bad time as any to ask about the conversion
> > > > > > efforts for N900 USB things that were discussed before?
> > > > > 
> > > > > Perhaps it is also a good/bad time for reminding that some N900 U-Boot
> > > > > patches are waiting for review on the list? :-)
> > > > 
> > > > The last ones I saw weren't clear what it depended on and should get
> > > > re-posted.
> > > 
> > > And how should I or anybody else know this if nobody is responding to
> > > emails asking for review of pending patches?
> > 
> > I thought the last time you ping'd on it Lokesh was confused about what
> > this was on top of / required.
> 
> I think I sent info how to apply it. But as I have not received any
> reply even after reminding, how should I have know it?

Other people re-base and re-post, or ping more often.

> > > > But I didn't see anything about the USB DM conversion.
> > > 
> > > Of course, as there are waiting other patches and other emails without
> > > replies, it is not a wise idea to start working on something other or
> > > starting discussion about something totally new if existing things are
> > > waiting for maintainers...
> > 
> > I believe it was someone else that is interested in N900 that said they
> > would look at it.
> 
> Yea, for USB it was Merlijn. He wrote me that would reply later to this
> thread. This thread started about video and not USB, so there is just
> big mix of things and I forgot about what we are talking here...

Thanks.

> > > I wanted to look at other stuff after pending patches are in accepted
> > > state. But I'm not superman to work on 10 parallel things at the same
> > > time and specially if I see that reviewing N900 patches is slow and
> > > takes about half of year.
> > > 
> > > If I see that maintainer is busy then I send just one patch and next
> > > after it is accepted. And not sending thousands of patches at the same
> > > time. If I would be in the "busy maintainer" position I also would not
> > > like to see thousands of patches waiting from other developers and
> > > rather would see one patch and after it is accepted then another patch.
> > > 
> > > So, could you please make a time and look at pending N900 patching?
> > > So we can move forward? I have feeling that this is repeating every year
> > > and the ball is not on my side.
> > > 
> > > For example I'm still waiting for reply for this email from July 2021:
> > > https://lists.denx.de/pipermail/u-boot/2021-July/455710.html
> > > 
> > > And sending reminder for another patch in December 2021 has no reply too:
> > > https://lists.denx.de/pipermail/u-boot/2021-December/468744.html
> > 
> > My problem is that re-reading those threads again just now leaves me at
> > "please re-base and re-post everything because it wasn't clear at all
> > what goes where".  My only other feedback is that it would I think be
> > better to move and then update the documentation, not improve, migrate,
> > improve more.
> 
> Ok, so I will resend patches. When would you have a time to review these
> patches? I do not want again to repeat situation that I will send a
> patch and after half of year I get reply that it does not apply on
> master and rebasing is needed. So please let me know when you would have
> a time for review of N900 so I would send patches at correct timing
> without need from my side to rebase and rebase patches again and
> again... because this is really annoying for me and also wasting of time
> ... and it happened with more N900 patch in last 2 years.

Documentation patches will go to Heinrich and so long as "make htmldocs"
passes, likely be picked up in short order.  In general, yes, things
will get picked up in the usual cadence of U-Boot release cycles.  These
particular patches got stuck because of unclear / non-obvious apply
order and also Lokesh having been a bit overloaded (I suspect).

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PATCH 17/23] video: Convert CONFIG_VIDEO_LOGO to Kconfig
  2022-01-23 15:11               ` Pali Rohár
  2022-01-23 16:14                 ` Tom Rini
@ 2022-01-24  9:39                 ` Merlijn Wajer
  2022-01-24 14:42                   ` Tom Rini
  1 sibling, 1 reply; 41+ messages in thread
From: Merlijn Wajer @ 2022-01-24  9:39 UTC (permalink / raw)
  To: Pali Rohár, Tom Rini
  Cc: maemo-leste, Ivaylo Dimitrov, Simon Glass, U-Boot Mailing List,
	Anatolij Gustschin, Marek Behún, Stefan Roese,
	Stefano Babic

Hi Pali, Tom, Simon,

On 23/01/2022 16:11, Pali Rohár wrote:

>>>> But I didn't see anything about the USB DM conversion.
>>>
>>> Of course, as there are waiting other patches and other emails without
>>> replies, it is not a wise idea to start working on something other or
>>> starting discussion about something totally new if existing things are
>>> waiting for maintainers...
>>
>> I believe it was someone else that is interested in N900 that said they
>> would look at it.
> 
> Yea, for USB it was Merlijn. He wrote me that would reply later to this
> thread. This thread started about video and not USB, so there is just
> big mix of things and I forgot about what we are talking here...

I have a tight deadline in the next two weeks, but after that I can pick 
up this work (USB DM conversion for the N900). I assume it won't take 
much more than a week or two to then get this ready, so let's say I can 
try to send a RFC patch by mid February? Does that block/conflict u-boot 
release/merge planning? If sooner is required, please let me know and 
I'll try my best to accommodate that somehow.

Regards,
Merlijn

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PATCH 17/23] video: Convert CONFIG_VIDEO_LOGO to Kconfig
  2022-01-24  9:39                 ` Merlijn Wajer
@ 2022-01-24 14:42                   ` Tom Rini
  0 siblings, 0 replies; 41+ messages in thread
From: Tom Rini @ 2022-01-24 14:42 UTC (permalink / raw)
  To: Merlijn Wajer
  Cc: Pali Rohár, maemo-leste, Ivaylo Dimitrov, Simon Glass,
	U-Boot Mailing List, Anatolij Gustschin, Marek Behún,
	Stefan Roese, Stefano Babic

[-- Attachment #1: Type: text/plain, Size: 1514 bytes --]

On Mon, Jan 24, 2022 at 10:39:27AM +0100, Merlijn Wajer wrote:
> Hi Pali, Tom, Simon,
> 
> On 23/01/2022 16:11, Pali Rohár wrote:
> 
> > > > > But I didn't see anything about the USB DM conversion.
> > > > 
> > > > Of course, as there are waiting other patches and other emails without
> > > > replies, it is not a wise idea to start working on something other or
> > > > starting discussion about something totally new if existing things are
> > > > waiting for maintainers...
> > > 
> > > I believe it was someone else that is interested in N900 that said they
> > > would look at it.
> > 
> > Yea, for USB it was Merlijn. He wrote me that would reply later to this
> > thread. This thread started about video and not USB, so there is just
> > big mix of things and I forgot about what we are talking here...
> 
> I have a tight deadline in the next two weeks, but after that I can pick up
> this work (USB DM conversion for the N900). I assume it won't take much more
> than a week or two to then get this ready, so let's say I can try to send a
> RFC patch by mid February? Does that block/conflict u-boot release/merge
> planning? If sooner is required, please let me know and I'll try my best to
> accommodate that somehow.

That timing is probably fine, but please speak up if you're not able to
pick up the work again when you expect to as that sounds about like what
you said for having things around November?  But stuff comes up and I
understand that.  Thanks.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PATCH 19/23] video: Support showing the U-Boot logo
  2021-11-19 20:24 ` [PATCH 19/23] video: Support showing the U-Boot logo Simon Glass
@ 2022-03-15 16:13   ` Tim Harvey
  2022-03-28  6:35     ` Simon Glass
  0 siblings, 1 reply; 41+ messages in thread
From: Tim Harvey @ 2022-03-15 16:13 UTC (permalink / raw)
  To: Simon Glass
  Cc: U-Boot Mailing List, Anatolij Gustschin, Tom Rini,
	Alistair Delva, Heinrich Schuchardt, Marek Behún,
	Roger Pau Monne

On Fri, Nov 19, 2021 at 12:28 PM Simon Glass <sjg@chromium.org> wrote:
>
> Show the U-Boot logo by default. This is only 7KB in size so seems like
> a useful default for boards that enable a display.
>
> If SPLASH_SCREEN is enabled, it is not enabled by default, so as not to
> conflict with that feature.
>
> Also disable it for tests, since we don't want to complicate the output.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  drivers/video/Kconfig         |   1 +
>  drivers/video/Makefile        |   3 +++
>  drivers/video/sandbox_sdl.c   |   2 ++
>  drivers/video/u_boot_logo.bmp | Bin 0 -> 6932 bytes
>  drivers/video/video-uclass.c  |  26 ++++++++++++++++++++
>  include/video.h               |   2 ++
>  scripts/Makefile.lib          |  21 +++++++++++++++++
>  test/dm/video.c               |  43 +++++++++++++++++++++++++++-------
>  8 files changed, 89 insertions(+), 9 deletions(-)
>  create mode 100644 drivers/video/u_boot_logo.bmp
>
> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> index 7a73ecc1f40..e601b47806b 100644
> --- a/drivers/video/Kconfig
> +++ b/drivers/video/Kconfig
> @@ -17,6 +17,7 @@ config DM_VIDEO
>  config VIDEO_LOGO
>         bool "Show the U-Boot logo on the display"
>         depends on DM_VIDEO
> +       select VIDEO_BMP_RLE8
>         help
>           This enables showing the U-Boot logo on the display when a video
>           device is probed. It appears at the top right. The logo itself is at
> diff --git a/drivers/video/Makefile b/drivers/video/Makefile
> index 8956b5f9b00..4038395b128 100644
> --- a/drivers/video/Makefile
> +++ b/drivers/video/Makefile
> @@ -17,6 +17,9 @@ obj-$(CONFIG_DM_VIDEO) += video_bmp.o
>  obj-$(CONFIG_PANEL) += panel-uclass.o
>  obj-$(CONFIG_DM_PANEL_HX8238D) += hx8238d.o
>  obj-$(CONFIG_SIMPLE_PANEL) += simple_panel.o
> +
> +obj-$(CONFIG_VIDEO_LOGO) += u_boot_logo.o
> +
>  endif
>
>  obj-${CONFIG_EXYNOS_FB} += exynos/
> diff --git a/drivers/video/sandbox_sdl.c b/drivers/video/sandbox_sdl.c
> index 2afe66fab1a..9081c7da62e 100644
> --- a/drivers/video/sandbox_sdl.c
> +++ b/drivers/video/sandbox_sdl.c
> @@ -82,12 +82,14 @@ static void set_bpp(struct udevice *dev, enum video_log2_bpp l2bpp)
>
>  int sandbox_sdl_set_bpp(struct udevice *dev, enum video_log2_bpp l2bpp)
>  {
> +       struct video_uc_plat *uc_plat = dev_get_uclass_plat(dev);
>         int ret;
>
>         if (device_active(dev))
>                 return -EINVAL;
>         sandbox_sdl_remove_display();
>
> +       uc_plat->hide_logo = true;
>         set_bpp(dev, l2bpp);
>
>         ret = device_probe(dev);
> diff --git a/drivers/video/u_boot_logo.bmp b/drivers/video/u_boot_logo.bmp
> new file mode 100644
> index 0000000000000000000000000000000000000000..47f1e9b99789584d2f6dd71e954b51927b35d783
> GIT binary patch
> literal 6932
> zcmb7J3sjWXwf?sM%m9M}3aA(*B(X##snNz*U$IeRG>LimKpwtD@qvhnD4<9bH9<{c
> zuq4JwK}|`-nLKJMq^L<PK@Al`udF+i3Xw;XLK{Z}O8hCe_d7pBVs3NqT9@Ul|D3(|
> z`OZH3?7h!E$7#<54T15u)dZ|(>zL;!@P@FRI}mW$dVc?6U;U=doSVeY|Ld>M|BzlY
> zU9fTnu=epjSoH)D$KUFieXwSh32UFUVBJ&Rh=1COl}`m>&9h#JdwL+&%nnBEvw>Lm
> zd|#}e>xWg(55mf4?nT1fepoYa2v*F!7i;GaMeMx$urA_mteig#@e4w+EMg?qN8W>k
> zsCy9`^&r+pkHE^vM-U$qj%Cq5!TLoHAYsvi*sx?2Vi!)v#-$G-e(6{&T{IQzmyg5p
> zrPHxt#ZQqKJ07viXJF~_S=h8{A`(_Vh83}MusC);HmsS7#I@6~aosd5i(7zA@sDHq
> z>L?_{&q89tlUTBLA(pIJj*SU(uxwo{HYd)*qWCx@ZQ|HXQCPZREjA`aW8sEP*qpo&
> zNn00T>E>i4rz}BC(l%^LU5-UbJFz)!1(LSMB06~&w(MAm<n%Z!+?I*0=?U1Jo`}V%
> z`;e5e3DK#qV9N`ek-RGj3%9?DZJEi~oVg8))3Xts{w7lQZo`(nsff<VLGr#dEX=SY
> za#t?4Wu+tKrA(ym--)!WJ&4(J9Lf7%#DdI|*m~e4MD8iTwu4znd3isg_BoLH$^pc@
> z_#V<;J&5gxUPeULhuHesAw=yjLdxN6q-MW?B?nI<`oKqsICvImKYtV3bB<!cE9VjQ
> z^6!!U##=}|l85<+E+XyCV~BX|61E>bj`c@A#18ujL>?|f`de=!D*JQHJN!pv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YE{zO|ON>N#Vw=x*w^~EOV}?
> z`s^&vog;GpNY9=BS=xNW@?%wJ?R$O_ZqWK;r}3^3fE~t5MIh3Q*N`Bj7_Te?u+{TI
> zBwDi38i*~z{|rJfHW@Eo!ARu#)VrE`4NNfJ?S^2T@jf^dYm8UO5X2cTnS4{#Vnw}*
> z-h-Z3*4}s5`>>EG>Ls@Kbv6tOjMv)U*V_?zUes%DIA)7_-|c<#<twn(^9szDVQq?x
> wA@94_V)cG3+BniCF!%phCa^V`EuNoDjq0U&Do6FaK0m2mbu}=?pJWRCZ}IWH!~g&Q
>
> literal 0
> HcmV?d00001
>
> diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
> index fafd05e373f..feed9c9a949 100644
> --- a/drivers/video/video-uclass.c
> +++ b/drivers/video/video-uclass.c
> @@ -305,6 +305,24 @@ int video_sync_copy_all(struct udevice *dev)
>
>  #endif
>
> +#define SPLASH_DECL(_name) \
> +       extern u8 __splash_ ## _name ## _begin[]; \
> +       extern u8 __splash_ ## _name ## _end[]
> +
> +#define SPLASH_START(_name)    __splash_ ## _name ## _begin
> +
> +SPLASH_DECL(u_boot_logo);
> +
> +static int show_splash(struct udevice *dev)
> +{
> +       u8 *data = SPLASH_START(u_boot_logo);
> +       int ret;
> +
> +       ret = video_bmp_display(dev, map_to_sysmem(data), -4, 4, true);
> +
> +       return 0;
> +}
> +
>  /* Set up the display ready for use */
>  static int video_post_probe(struct udevice *dev)
>  {
> @@ -370,6 +388,14 @@ static int video_post_probe(struct udevice *dev)
>                 return ret;
>         }
>
> +       if (IS_ENABLED(CONFIG_VIDEO_LOGO) && !plat->hide_logo) {
> +               ret = show_splash(dev);
> +               if (ret) {
> +                       log_debug("Cannot show splash screen\n");
> +                       return ret;
> +               }
> +       }
> +
>         return 0;
>  };
>
> diff --git a/include/video.h b/include/video.h
> index 6948cdf5796..59c9d9c18ca 100644
> --- a/include/video.h
> +++ b/include/video.h
> @@ -30,12 +30,14 @@ struct udevice;
>   * @base: Base address of frame buffer, 0 if not yet known
>   * @copy_base: Base address of a hardware copy of the frame buffer. See
>   *     CONFIG_VIDEO_COPY.
> + * @hide_logo: Hide the logo (used for testing)
>   */
>  struct video_uc_plat {
>         uint align;
>         uint size;
>         ulong base;
>         ulong copy_base;
> +       bool hide_logo;
>  };
>
>  enum video_polarity {
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index 39f03398ed8..06cc2d938db 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -372,6 +372,27 @@ cmd_S_ttf=                                         \
>  $(obj)/%.S: $(src)/%.ttf
>         $(call cmd,S_ttf)
>
> +# Splash logos
> +# ---------------------------------------------------------------------------
> +
> +# Generate an assembly file to wrap the splash data
> +quiet_cmd_S_splash= TTF     $@
> +# Modified for U-Boot
> +cmd_S_splash=                                          \
> +(                                                      \
> +       echo '.section .rodata.splash.init,"a"';                \
> +       echo '.balign 16';                              \
> +       echo '.global __splash_$(*F)_begin';            \
> +       echo '__splash_$(*F)_begin:';                   \
> +       echo '.incbin "$<" ';                           \
> +       echo '__splash_$(*F)_end:';                     \
> +       echo '.global __splash_$(*F)_end';                      \
> +       echo '.balign 16';                              \
> +) > $@
> +
> +$(obj)/%.S: $(src)/%.bmp
> +       $(call cmd,S_splash)
> +
>  # EFI applications
>  # A Makefile target *.efi is built as EFI application.
>  # A Makefile target *_efi.S wraps *.efi as built-in EFI application.
> diff --git a/test/dm/video.c b/test/dm/video.c
> index 4e76574a913..d4a3c9c6c17 100644
> --- a/test/dm/video.c
> +++ b/test/dm/video.c
> @@ -115,6 +115,31 @@ static int select_vidconsole(struct unit_test_state *uts, const char *drv_name)
>         return 0;
>  }
>
> +/**
> + * video_get_nologo() - Disable the logo on the video device and return it
> + *
> + * @uts: Test state
> + * @devp: Returns video device
> + * @return 0 if OK, -ve on error
> + */
> +static int video_get_nologo(struct unit_test_state *uts, struct udevice **devp)
> +{
> +       struct video_uc_plat *uc_plat;
> +       struct udevice *dev;
> +
> +       ut_assertok(uclass_find_first_device(UCLASS_VIDEO, &dev));
> +       ut_assertnonnull(dev);
> +       uc_plat = dev_get_uclass_plat(dev);
> +       uc_plat->hide_logo = true;
> +
> +       /* now probe it */
> +       ut_assertok(uclass_first_device_err(UCLASS_VIDEO, &dev));
> +       ut_assertnonnull(dev);
> +       *devp = dev;
> +
> +       return 0;
> +}
> +
>  /* Test text output works on the video console */
>  static int dm_test_video_text(struct unit_test_state *uts)
>  {
> @@ -125,7 +150,7 @@ static int dm_test_video_text(struct unit_test_state *uts)
>  #define SCROLL_LINES   100
>
>         ut_assertok(select_vidconsole(uts, "vidconsole0"));
> -       ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
> +       ut_assertok(video_get_nologo(uts, &dev));
>         ut_asserteq(46, compress_frame_buffer(uts, dev));
>
>         ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con));
> @@ -157,7 +182,7 @@ static int dm_test_video_chars(struct unit_test_state *uts)
>         const char *test_string = "Well\b\b\b\bxhe is\r \n\ta very \amodest  \bman\n\t\tand Has much to\b\bto be modest about.";
>
>         ut_assertok(select_vidconsole(uts, "vidconsole0"));
> -       ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
> +       ut_assertok(video_get_nologo(uts, &dev));
>         ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con));
>         vidconsole_put_string(con, test_string);
>         ut_asserteq(466, compress_frame_buffer(uts, dev));
> @@ -174,7 +199,7 @@ static int dm_test_video_ansi(struct unit_test_state *uts)
>         struct udevice *dev, *con;
>
>         ut_assertok(select_vidconsole(uts, "vidconsole0"));
> -       ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
> +       ut_assertok(video_get_nologo(uts, &dev));
>         ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con));
>
>         /* reference clear: */
> @@ -222,7 +247,7 @@ static int check_vidconsole_output(struct unit_test_state *uts, int rot,
>         plat = dev_get_plat(dev);
>         plat->rot = rot;
>
> -       ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
> +       ut_assertok(video_get_nologo(uts, &dev));
>         ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con));
>         ut_asserteq(46, compress_frame_buffer(uts, dev));
>
> @@ -311,7 +336,7 @@ static int dm_test_video_bmp(struct unit_test_state *uts)
>         struct udevice *dev;
>         ulong addr;
>
> -       ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
> +       ut_assertok(video_get_nologo(uts, &dev));
>         ut_assertok(read_file(uts, "tools/logos/denx.bmp", &addr));
>
>         ut_assertok(video_bmp_display(dev, addr, 0, 0, false));
> @@ -433,7 +458,7 @@ static int dm_test_video_bmp_comp(struct unit_test_state *uts)
>         struct udevice *dev;
>         ulong addr;
>
> -       ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
> +       ut_assertok(video_get_nologo(uts, &dev));
>         ut_assertok(read_file(uts, "tools/logos/denx-comp.bmp", &addr));
>
>         ut_assertok(video_bmp_display(dev, addr, 0, 0, false));
> @@ -487,7 +512,7 @@ static int dm_test_video_truetype(struct unit_test_state *uts)
>         struct udevice *dev, *con;
>         const char *test_string = "Criticism may not be agreeable, but it is necessary. It fulfils the same function as pain in the human body. It calls attention to an unhealthy state of things. Some see private enterprise as a predatory target to be shot, others as a cow to be milked, but few are those who see it as a sturdy horse pulling the wagon. The \aprice OF\b\bof greatness\n\tis responsibility.\n\nBye";
>
> -       ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
> +       ut_assertok(video_get_nologo(uts, &dev));
>         ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con));
>         vidconsole_put_string(con, test_string);
>         ut_asserteq(12237, compress_frame_buffer(uts, dev));
> @@ -508,7 +533,7 @@ static int dm_test_video_truetype_scroll(struct unit_test_state *uts)
>         plat = dev_get_plat(dev);
>         plat->font_size = 100;
>
> -       ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
> +       ut_assertok(video_get_nologo(uts, &dev));
>         ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con));
>         vidconsole_put_string(con, test_string);
>         ut_asserteq(35030, compress_frame_buffer(uts, dev));
> @@ -529,7 +554,7 @@ static int dm_test_video_truetype_bs(struct unit_test_state *uts)
>         plat = dev_get_plat(dev);
>         plat->font_size = 100;
>
> -       ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
> +       ut_assertok(video_get_nologo(uts, &dev));
>         ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con));
>         vidconsole_put_string(con, test_string);
>         ut_asserteq(29018, compress_frame_buffer(uts, dev));
> --
> 2.34.0.rc2.393.gf8c9666880-goog
>

Simon,

I find that this patch enables the default U-Boot Logo in the
top-right corner for gwventana_*_defconfig even though I have a custom
splash-screen (so I see both).

I have the following in my defconfig:
$ grep -e "SPLASH\|LOGO" configs/gwventana_nand_defconfig
CONFIG_VIDEO_LOGO=y
CONFIG_SPLASH_SCREEN=y
CONFIG_SPLASH_SCREEN_ALIGN=y

If I disable VIDEO_LOGO I don't see either the U-Boot logo or my
SPLASH_SCREEN. The commit log says "If SPLASH_SCREEN is enabled, it is
not enabled by default, so as not to conflict with that feature." but
I don't see where you do anything in this patch with SPLASH_SCREEN.

Ideas?

Best Regards,

Tim

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PATCH 19/23] video: Support showing the U-Boot logo
  2022-03-15 16:13   ` Tim Harvey
@ 2022-03-28  6:35     ` Simon Glass
  2022-03-28 18:50       ` Tim Harvey
  0 siblings, 1 reply; 41+ messages in thread
From: Simon Glass @ 2022-03-28  6:35 UTC (permalink / raw)
  To: Tim Harvey
  Cc: U-Boot Mailing List, Anatolij Gustschin, Tom Rini,
	Alistair Delva, Heinrich Schuchardt, Marek Behún,
	Roger Pau Monne

Hi Tim,

On Tue, 15 Mar 2022 at 10:14, Tim Harvey <tharvey@gateworks.com> wrote:
>
> On Fri, Nov 19, 2021 at 12:28 PM Simon Glass <sjg@chromium.org> wrote:
> >
> > Show the U-Boot logo by default. This is only 7KB in size so seems like
> > a useful default for boards that enable a display.
> >
> > If SPLASH_SCREEN is enabled, it is not enabled by default, so as not to
> > conflict with that feature.
> >
> > Also disable it for tests, since we don't want to complicate the output.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> >  drivers/video/Kconfig         |   1 +
> >  drivers/video/Makefile        |   3 +++
> >  drivers/video/sandbox_sdl.c   |   2 ++
> >  drivers/video/u_boot_logo.bmp | Bin 0 -> 6932 bytes
> >  drivers/video/video-uclass.c  |  26 ++++++++++++++++++++
> >  include/video.h               |   2 ++
> >  scripts/Makefile.lib          |  21 +++++++++++++++++
> >  test/dm/video.c               |  43 +++++++++++++++++++++++++++-------
> >  8 files changed, 89 insertions(+), 9 deletions(-)
> >  create mode 100644 drivers/video/u_boot_logo.bmp
> >
> > diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> > index 7a73ecc1f40..e601b47806b 100644
> > --- a/drivers/video/Kconfig
> > +++ b/drivers/video/Kconfig
> > @@ -17,6 +17,7 @@ config DM_VIDEO
> >  config VIDEO_LOGO
> >         bool "Show the U-Boot logo on the display"
> >         depends on DM_VIDEO
> > +       select VIDEO_BMP_RLE8
> >         help
> >           This enables showing the U-Boot logo on the display when a video
> >           device is probed. It appears at the top right. The logo itself is at
> > diff --git a/drivers/video/Makefile b/drivers/video/Makefile
> > index 8956b5f9b00..4038395b128 100644
> > --- a/drivers/video/Makefile
> > +++ b/drivers/video/Makefile
> > @@ -17,6 +17,9 @@ obj-$(CONFIG_DM_VIDEO) += video_bmp.o
> >  obj-$(CONFIG_PANEL) += panel-uclass.o
> >  obj-$(CONFIG_DM_PANEL_HX8238D) += hx8238d.o
> >  obj-$(CONFIG_SIMPLE_PANEL) += simple_panel.o
> > +
> > +obj-$(CONFIG_VIDEO_LOGO) += u_boot_logo.o
> > +
> >  endif
> >
> >  obj-${CONFIG_EXYNOS_FB} += exynos/
> > diff --git a/drivers/video/sandbox_sdl.c b/drivers/video/sandbox_sdl.c
> > index 2afe66fab1a..9081c7da62e 100644
> > --- a/drivers/video/sandbox_sdl.c
> > +++ b/drivers/video/sandbox_sdl.c
> > @@ -82,12 +82,14 @@ static void set_bpp(struct udevice *dev, enum video_log2_bpp l2bpp)
> >
> >  int sandbox_sdl_set_bpp(struct udevice *dev, enum video_log2_bpp l2bpp)
> >  {
> > +       struct video_uc_plat *uc_plat = dev_get_uclass_plat(dev);
> >         int ret;
> >
> >         if (device_active(dev))
> >                 return -EINVAL;
> >         sandbox_sdl_remove_display();
> >
> > +       uc_plat->hide_logo = true;
> >         set_bpp(dev, l2bpp);
> >
> >         ret = device_probe(dev);
> > diff --git a/drivers/video/u_boot_logo.bmp b/drivers/video/u_boot_logo.bmp
> > new file mode 100644
> > index 0000000000000000000000000000000000000000..47f1e9b99789584d2f6dd71e954b51927b35d783
> > GIT binary patch
> > literal 6932
> > zcmb7J3sjWXwf?sM%m9M}3aA(*B(X##snNz*U$IeRG>LimKpwtD@qvhnD4<9bH9<{c
> > zuq4JwK}|`-nLKJMq^L<PK@Al`udF+i3Xw;XLK{Z}O8hCe_d7pBVs3NqT9@Ul|D3(|
> > z`OZH3?7h!E$7#<54T15u)dZ|(>zL;!@P@FRI}mW$dVc?6U;U=doSVeY|Ld>M|BzlY
> > zU9fTnu=epjSoH)D$KUFieXwSh32UFUVBJ&Rh=1COl}`m>&9h#JdwL+&%nnBEvw>Lm
> > zd|#}e>xWg(55mf4?nT1fepoYa2v*F!7i;GaMeMx$urA_mteig#@e4w+EMg?qN8W>k
> > zsCy9`^&r+pkHE^vM-U$qj%Cq5!TLoHAYsvi*sx?2Vi!)v#-$G-e(6{&T{IQzmyg5p
> > zrPHxt#ZQqKJ07viXJF~_S=h8{A`(_Vh83}MusC);HmsS7#I@6~aosd5i(7zA@sDHq
> > z>L?_{&q89tlUTBLA(pIJj*SU(uxwo{H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#OYeA{_ntngk~Hx)1Cw>o04vu$Pvw~7CkhH2FgvvZIWBnv
> > z?ef}iPfh!%$P+)YOZpxCk?cp^(KpG<W9;(4{hrF2Bc_hFOUm%?`X<>hikLFEhh_m~
> > ztdjJgT@K0p!#%bB6k5Ri^kIxtx0?YYJXFzs#zf;gc}3E$LwnLqDYD<kAusr*z<bB8
> > zgNL@Rdh+g(T$Q>}c;RW*iaf)^CVOrm>`!AqVv^@3^pvpbW5s+&-y*je4c&6rL_@|0
> > zlsQeAstKMO7yB`+T+WGU9OqHDFe{!k-it{6N~S;JxzSN>H#4UB*2gc6)bJ2<h`Q<d
> > zD%l{pscM?WJiC3Jd6aPz?5pUJ%)I%`%#Z)rb6X@$lcSuyh86dI(H=1FoHiwEG2R6$
> > zm}UKXsD6rSlMi{`m5@3(+;i)t9u~=9mZ&7v+C%kMmYE{zO|ON>N#Vw=x*w^~EOV}?
> > z`s^&vog;GpNY9=BS=xNW@?%wJ?R$O_ZqWK;r}3^3fE~t5MIh3Q*N`Bj7_Te?u+{TI
> > zBwDi38i*~z{|rJfHW@Eo!ARu#)VrE`4NNfJ?S^2T@jf^dYm8UO5X2cTnS4{#Vnw}*
> > z-h-Z3*4}s5`>>EG>Ls@Kbv6tOjMv)U*V_?zUes%DIA)7_-|c<#<twn(^9szDVQq?x
> > wA@94_V)cG3+BniCF!%phCa^V`EuNoDjq0U&Do6FaK0m2mbu}=?pJWRCZ}IWH!~g&Q
> >
> > literal 0
> > HcmV?d00001
> >
> > diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
> > index fafd05e373f..feed9c9a949 100644
> > --- a/drivers/video/video-uclass.c
> > +++ b/drivers/video/video-uclass.c
> > @@ -305,6 +305,24 @@ int video_sync_copy_all(struct udevice *dev)
> >
> >  #endif
> >
> > +#define SPLASH_DECL(_name) \
> > +       extern u8 __splash_ ## _name ## _begin[]; \
> > +       extern u8 __splash_ ## _name ## _end[]
> > +
> > +#define SPLASH_START(_name)    __splash_ ## _name ## _begin
> > +
> > +SPLASH_DECL(u_boot_logo);
> > +
> > +static int show_splash(struct udevice *dev)
> > +{
> > +       u8 *data = SPLASH_START(u_boot_logo);
> > +       int ret;
> > +
> > +       ret = video_bmp_display(dev, map_to_sysmem(data), -4, 4, true);
> > +
> > +       return 0;
> > +}
> > +
> >  /* Set up the display ready for use */
> >  static int video_post_probe(struct udevice *dev)
> >  {
> > @@ -370,6 +388,14 @@ static int video_post_probe(struct udevice *dev)
> >                 return ret;
> >         }
> >
> > +       if (IS_ENABLED(CONFIG_VIDEO_LOGO) && !plat->hide_logo) {
> > +               ret = show_splash(dev);
> > +               if (ret) {
> > +                       log_debug("Cannot show splash screen\n");
> > +                       return ret;
> > +               }
> > +       }
> > +
> >         return 0;
> >  };
> >
> > diff --git a/include/video.h b/include/video.h
> > index 6948cdf5796..59c9d9c18ca 100644
> > --- a/include/video.h
> > +++ b/include/video.h
> > @@ -30,12 +30,14 @@ struct udevice;
> >   * @base: Base address of frame buffer, 0 if not yet known
> >   * @copy_base: Base address of a hardware copy of the frame buffer. See
> >   *     CONFIG_VIDEO_COPY.
> > + * @hide_logo: Hide the logo (used for testing)
> >   */
> >  struct video_uc_plat {
> >         uint align;
> >         uint size;
> >         ulong base;
> >         ulong copy_base;
> > +       bool hide_logo;
> >  };
> >
> >  enum video_polarity {
> > diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> > index 39f03398ed8..06cc2d938db 100644
> > --- a/scripts/Makefile.lib
> > +++ b/scripts/Makefile.lib
> > @@ -372,6 +372,27 @@ cmd_S_ttf=                                         \
> >  $(obj)/%.S: $(src)/%.ttf
> >         $(call cmd,S_ttf)
> >
> > +# Splash logos
> > +# ---------------------------------------------------------------------------
> > +
> > +# Generate an assembly file to wrap the splash data
> > +quiet_cmd_S_splash= TTF     $@
> > +# Modified for U-Boot
> > +cmd_S_splash=                                          \
> > +(                                                      \
> > +       echo '.section .rodata.splash.init,"a"';                \
> > +       echo '.balign 16';                              \
> > +       echo '.global __splash_$(*F)_begin';            \
> > +       echo '__splash_$(*F)_begin:';                   \
> > +       echo '.incbin "$<" ';                           \
> > +       echo '__splash_$(*F)_end:';                     \
> > +       echo '.global __splash_$(*F)_end';                      \
> > +       echo '.balign 16';                              \
> > +) > $@
> > +
> > +$(obj)/%.S: $(src)/%.bmp
> > +       $(call cmd,S_splash)
> > +
> >  # EFI applications
> >  # A Makefile target *.efi is built as EFI application.
> >  # A Makefile target *_efi.S wraps *.efi as built-in EFI application.
> > diff --git a/test/dm/video.c b/test/dm/video.c
> > index 4e76574a913..d4a3c9c6c17 100644
> > --- a/test/dm/video.c
> > +++ b/test/dm/video.c
> > @@ -115,6 +115,31 @@ static int select_vidconsole(struct unit_test_state *uts, const char *drv_name)
> >         return 0;
> >  }
> >
> > +/**
> > + * video_get_nologo() - Disable the logo on the video device and return it
> > + *
> > + * @uts: Test state
> > + * @devp: Returns video device
> > + * @return 0 if OK, -ve on error
> > + */
> > +static int video_get_nologo(struct unit_test_state *uts, struct udevice **devp)
> > +{
> > +       struct video_uc_plat *uc_plat;
> > +       struct udevice *dev;
> > +
> > +       ut_assertok(uclass_find_first_device(UCLASS_VIDEO, &dev));
> > +       ut_assertnonnull(dev);
> > +       uc_plat = dev_get_uclass_plat(dev);
> > +       uc_plat->hide_logo = true;
> > +
> > +       /* now probe it */
> > +       ut_assertok(uclass_first_device_err(UCLASS_VIDEO, &dev));
> > +       ut_assertnonnull(dev);
> > +       *devp = dev;
> > +
> > +       return 0;
> > +}
> > +
> >  /* Test text output works on the video console */
> >  static int dm_test_video_text(struct unit_test_state *uts)
> >  {
> > @@ -125,7 +150,7 @@ static int dm_test_video_text(struct unit_test_state *uts)
> >  #define SCROLL_LINES   100
> >
> >         ut_assertok(select_vidconsole(uts, "vidconsole0"));
> > -       ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
> > +       ut_assertok(video_get_nologo(uts, &dev));
> >         ut_asserteq(46, compress_frame_buffer(uts, dev));
> >
> >         ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con));
> > @@ -157,7 +182,7 @@ static int dm_test_video_chars(struct unit_test_state *uts)
> >         const char *test_string = "Well\b\b\b\bxhe is\r \n\ta very \amodest  \bman\n\t\tand Has much to\b\bto be modest about.";
> >
> >         ut_assertok(select_vidconsole(uts, "vidconsole0"));
> > -       ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
> > +       ut_assertok(video_get_nologo(uts, &dev));
> >         ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con));
> >         vidconsole_put_string(con, test_string);
> >         ut_asserteq(466, compress_frame_buffer(uts, dev));
> > @@ -174,7 +199,7 @@ static int dm_test_video_ansi(struct unit_test_state *uts)
> >         struct udevice *dev, *con;
> >
> >         ut_assertok(select_vidconsole(uts, "vidconsole0"));
> > -       ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
> > +       ut_assertok(video_get_nologo(uts, &dev));
> >         ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con));
> >
> >         /* reference clear: */
> > @@ -222,7 +247,7 @@ static int check_vidconsole_output(struct unit_test_state *uts, int rot,
> >         plat = dev_get_plat(dev);
> >         plat->rot = rot;
> >
> > -       ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
> > +       ut_assertok(video_get_nologo(uts, &dev));
> >         ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con));
> >         ut_asserteq(46, compress_frame_buffer(uts, dev));
> >
> > @@ -311,7 +336,7 @@ static int dm_test_video_bmp(struct unit_test_state *uts)
> >         struct udevice *dev;
> >         ulong addr;
> >
> > -       ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
> > +       ut_assertok(video_get_nologo(uts, &dev));
> >         ut_assertok(read_file(uts, "tools/logos/denx.bmp", &addr));
> >
> >         ut_assertok(video_bmp_display(dev, addr, 0, 0, false));
> > @@ -433,7 +458,7 @@ static int dm_test_video_bmp_comp(struct unit_test_state *uts)
> >         struct udevice *dev;
> >         ulong addr;
> >
> > -       ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
> > +       ut_assertok(video_get_nologo(uts, &dev));
> >         ut_assertok(read_file(uts, "tools/logos/denx-comp.bmp", &addr));
> >
> >         ut_assertok(video_bmp_display(dev, addr, 0, 0, false));
> > @@ -487,7 +512,7 @@ static int dm_test_video_truetype(struct unit_test_state *uts)
> >         struct udevice *dev, *con;
> >         const char *test_string = "Criticism may not be agreeable, but it is necessary. It fulfils the same function as pain in the human body. It calls attention to an unhealthy state of things. Some see private enterprise as a predatory target to be shot, others as a cow to be milked, but few are those who see it as a sturdy horse pulling the wagon. The \aprice OF\b\bof greatness\n\tis responsibility.\n\nBye";
> >
> > -       ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
> > +       ut_assertok(video_get_nologo(uts, &dev));
> >         ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con));
> >         vidconsole_put_string(con, test_string);
> >         ut_asserteq(12237, compress_frame_buffer(uts, dev));
> > @@ -508,7 +533,7 @@ static int dm_test_video_truetype_scroll(struct unit_test_state *uts)
> >         plat = dev_get_plat(dev);
> >         plat->font_size = 100;
> >
> > -       ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
> > +       ut_assertok(video_get_nologo(uts, &dev));
> >         ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con));
> >         vidconsole_put_string(con, test_string);
> >         ut_asserteq(35030, compress_frame_buffer(uts, dev));
> > @@ -529,7 +554,7 @@ static int dm_test_video_truetype_bs(struct unit_test_state *uts)
> >         plat = dev_get_plat(dev);
> >         plat->font_size = 100;
> >
> > -       ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
> > +       ut_assertok(video_get_nologo(uts, &dev));
> >         ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con));
> >         vidconsole_put_string(con, test_string);
> >         ut_asserteq(29018, compress_frame_buffer(uts, dev));
> > --
> > 2.34.0.rc2.393.gf8c9666880-goog
> >
>
> Simon,
>
> I find that this patch enables the default U-Boot Logo in the
> top-right corner for gwventana_*_defconfig even though I have a custom
> splash-screen (so I see both).
>
> I have the following in my defconfig:
> $ grep -e "SPLASH\|LOGO" configs/gwventana_nand_defconfig
> CONFIG_VIDEO_LOGO=y
> CONFIG_SPLASH_SCREEN=y
> CONFIG_SPLASH_SCREEN_ALIGN=y
>
> If I disable VIDEO_LOGO I don't see either the U-Boot logo or my
> SPLASH_SCREEN. The commit log says "If SPLASH_SCREEN is enabled, it is
> not enabled by default, so as not to conflict with that feature." but
> I don't see where you do anything in this patch with SPLASH_SCREEN.

I just mean in the Kconfig:

config VIDEO_LOGO
   bool "Show the U-Boot logo on the display"
   depends on DM_VIDEO
   default y if !SPLASH_SCREEN
             ^^^^^

So if you enable both of them, you will get both, but by default
VIDEO_LOGO should be enabled only if SPLASH_SCREEN is not enabled.

The splash code needs a rework too, I think. I just didn't get that far.

Regards,
Simon

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PATCH 19/23] video: Support showing the U-Boot logo
  2022-03-28  6:35     ` Simon Glass
@ 2022-03-28 18:50       ` Tim Harvey
  2022-03-28 19:00         ` Fabio Estevam
  0 siblings, 1 reply; 41+ messages in thread
From: Tim Harvey @ 2022-03-28 18:50 UTC (permalink / raw)
  To: Simon Glass, festevam
  Cc: U-Boot Mailing List, Anatolij Gustschin, Tom Rini,
	Alistair Delva, Heinrich Schuchardt, Marek Behún,
	Roger Pau Monne

On Sun, Mar 27, 2022 at 11:36 PM Simon Glass <sjg@chromium.org> wrote:
>
> Hi Tim,
>
> On Tue, 15 Mar 2022 at 10:14, Tim Harvey <tharvey@gateworks.com> wrote:
> >
> > On Fri, Nov 19, 2021 at 12:28 PM Simon Glass <sjg@chromium.org> wrote:
> > >
> > > Show the U-Boot logo by default. This is only 7KB in size so seems like
> > > a useful default for boards that enable a display.
> > >
> > > If SPLASH_SCREEN is enabled, it is not enabled by default, so as not to
> > > conflict with that feature.
> > >
> > > Also disable it for tests, since we don't want to complicate the output.
> > >
> > > Signed-off-by: Simon Glass <sjg@chromium.org>
> > > ---
> > >
> > >  drivers/video/Kconfig         |   1 +
> > >  drivers/video/Makefile        |   3 +++
> > >  drivers/video/sandbox_sdl.c   |   2 ++
> > >  drivers/video/u_boot_logo.bmp | Bin 0 -> 6932 bytes
> > >  drivers/video/video-uclass.c  |  26 ++++++++++++++++++++
> > >  include/video.h               |   2 ++
> > >  scripts/Makefile.lib          |  21 +++++++++++++++++
> > >  test/dm/video.c               |  43 +++++++++++++++++++++++++++-------
> > >  8 files changed, 89 insertions(+), 9 deletions(-)
> > >  create mode 100644 drivers/video/u_boot_logo.bmp
> > >
> > > diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> > > index 7a73ecc1f40..e601b47806b 100644
> > > --- a/drivers/video/Kconfig
> > > +++ b/drivers/video/Kconfig
> > > @@ -17,6 +17,7 @@ config DM_VIDEO
> > >  config VIDEO_LOGO
> > >         bool "Show the U-Boot logo on the display"
> > >         depends on DM_VIDEO
> > > +       select VIDEO_BMP_RLE8
> > >         help
> > >           This enables showing the U-Boot logo on the display when a video
> > >           device is probed. It appears at the top right. The logo itself is at
> > > diff --git a/drivers/video/Makefile b/drivers/video/Makefile
> > > index 8956b5f9b00..4038395b128 100644
> > > --- a/drivers/video/Makefile
> > > +++ b/drivers/video/Makefile
> > > @@ -17,6 +17,9 @@ obj-$(CONFIG_DM_VIDEO) += video_bmp.o
> > >  obj-$(CONFIG_PANEL) += panel-uclass.o
> > >  obj-$(CONFIG_DM_PANEL_HX8238D) += hx8238d.o
> > >  obj-$(CONFIG_SIMPLE_PANEL) += simple_panel.o
> > > +
> > > +obj-$(CONFIG_VIDEO_LOGO) += u_boot_logo.o
> > > +
> > >  endif
> > >
> > >  obj-${CONFIG_EXYNOS_FB} += exynos/
> > > diff --git a/drivers/video/sandbox_sdl.c b/drivers/video/sandbox_sdl.c
> > > index 2afe66fab1a..9081c7da62e 100644
> > > --- a/drivers/video/sandbox_sdl.c
> > > +++ b/drivers/video/sandbox_sdl.c
> > > @@ -82,12 +82,14 @@ static void set_bpp(struct udevice *dev, enum video_log2_bpp l2bpp)
> > >
> > >  int sandbox_sdl_set_bpp(struct udevice *dev, enum video_log2_bpp l2bpp)
> > >  {
> > > +       struct video_uc_plat *uc_plat = dev_get_uclass_plat(dev);
> > >         int ret;
> > >
> > >         if (device_active(dev))
> > >                 return -EINVAL;
> > >         sandbox_sdl_remove_display();
> > >
> > > +       uc_plat->hide_logo = true;
> > >         set_bpp(dev, l2bpp);
> > >
> > >         ret = device_probe(dev);
> > > diff --git a/drivers/video/u_boot_logo.bmp b/drivers/video/u_boot_logo.bmp
> > > new file mode 100644
> > > index 0000000000000000000000000000000000000000..47f1e9b99789584d2f6dd71e954b51927b35d783
> > > GIT binary patch
> > > literal 6932
> > > zcmb7J3sjWXwf?sM%m9M}3aA(*B(X##snNz*U$IeRG>LimKpwtD@qvhnD4<9bH9<{c
> > > zuq4JwK}|`-nLKJMq^L<PK@Al`udF+i3Xw;XLK{Z}O8hCe_d7pBVs3NqT9@Ul|D3(|
> > > z`OZH3?7h!E$7#<54T15u)dZ|(>zL;!@P@FRI}mW$dVc?6U;U=doSVeY|Ld>M|BzlY
> > > zU9fTnu=epjSoH)D$KUFieXwSh32UFUVBJ&Rh=1COl}`m>&9h#JdwL+&%nnBEvw>Lm
> > > zd|#}e>xWg(55mf4?nT1fepoYa2v*F!7i;GaMeMx$urA_mteig#@e4w+EMg?qN8W>k
> > > zsCy9`^&r+pkHE^vM-U$qj%Cq5!TLoHAYsvi*sx?2Vi!)v#-$G-e(6{&T{IQzmyg5p
> > > zrPHxt#ZQqKJ07viXJF~_S=h8{A`(_Vh83}MusC);HmsS7#I@6~aosd5i(7zA@sDHq
> > > z>L?_{&q89tlUTBLA(pIJj*SU(uxwo{HYd)*qWCx@ZQ|HXQCPZREjA`aW8sEP*qpo&
> > > zNn00T>E>i4r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0
> > > zu5WT1zG>}ne_2;uSyEV#OYeA{_ntngk~Hx)1Cw>o04vu$Pvw~7CkhH2FgvvZIWBnv
> > > z?ef}iPfh!%$P+)YOZpxCk?cp^(KpG<W9;(4{hrF2Bc_hFOUm%?`X<>hikLFEhh_m~
> > > ztdjJgT@K0p!#%bB6k5Ri^kIxtx0?YYJXFzs#zf;gc}3E$LwnLqDYD<kAusr*z<bB8
> > > zgNL@Rdh+g(T$Q>}c;RW*iaf)^CVOrm>`!AqVv^@3^pvpbW5s+&-y*je4c&6rL_@|0
> > > zlsQeAstKMO7yB`+T+WGU9OqHDFe{!k-it{6N~S;JxzSN>H#4UB*2gc6)bJ2<h`Q<d
> > > zD%l{pscM?WJiC3Jd6aPz?5pUJ%)I%`%#Z)rb6X@$lcSuyh86dI(H=1FoHiwEG2R6$
> > > zm}UKXsD6rSlMi{`m5@3(+;i)t9u~=9mZ&7v+C%kMmYE{zO|ON>N#Vw=x*w^~EOV}?
> > > z`s^&vog;GpNY9=BS=xNW@?%wJ?R$O_ZqWK;r}3^3fE~t5MIh3Q*N`Bj7_Te?u+{TI
> > > zBwDi38i*~z{|rJfHW@Eo!ARu#)VrE`4NNfJ?S^2T@jf^dYm8UO5X2cTnS4{#Vnw}*
> > > z-h-Z3*4}s5`>>EG>Ls@Kbv6tOjMv)U*V_?zUes%DIA)7_-|c<#<twn(^9szDVQq?x
> > > wA@94_V)cG3+BniCF!%phCa^V`EuNoDjq0U&Do6FaK0m2mbu}=?pJWRCZ}IWH!~g&Q
> > >
> > > literal 0
> > > HcmV?d00001
> > >
> > > diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
> > > index fafd05e373f..feed9c9a949 100644
> > > --- a/drivers/video/video-uclass.c
> > > +++ b/drivers/video/video-uclass.c
> > > @@ -305,6 +305,24 @@ int video_sync_copy_all(struct udevice *dev)
> > >
> > >  #endif
> > >
> > > +#define SPLASH_DECL(_name) \
> > > +       extern u8 __splash_ ## _name ## _begin[]; \
> > > +       extern u8 __splash_ ## _name ## _end[]
> > > +
> > > +#define SPLASH_START(_name)    __splash_ ## _name ## _begin
> > > +
> > > +SPLASH_DECL(u_boot_logo);
> > > +
> > > +static int show_splash(struct udevice *dev)
> > > +{
> > > +       u8 *data = SPLASH_START(u_boot_logo);
> > > +       int ret;
> > > +
> > > +       ret = video_bmp_display(dev, map_to_sysmem(data), -4, 4, true);
> > > +
> > > +       return 0;
> > > +}
> > > +
> > >  /* Set up the display ready for use */
> > >  static int video_post_probe(struct udevice *dev)
> > >  {
> > > @@ -370,6 +388,14 @@ static int video_post_probe(struct udevice *dev)
> > >                 return ret;
> > >         }
> > >
> > > +       if (IS_ENABLED(CONFIG_VIDEO_LOGO) && !plat->hide_logo) {
> > > +               ret = show_splash(dev);
> > > +               if (ret) {
> > > +                       log_debug("Cannot show splash screen\n");
> > > +                       return ret;
> > > +               }
> > > +       }
> > > +
> > >         return 0;
> > >  };
> > >
> > > diff --git a/include/video.h b/include/video.h
> > > index 6948cdf5796..59c9d9c18ca 100644
> > > --- a/include/video.h
> > > +++ b/include/video.h
> > > @@ -30,12 +30,14 @@ struct udevice;
> > >   * @base: Base address of frame buffer, 0 if not yet known
> > >   * @copy_base: Base address of a hardware copy of the frame buffer. See
> > >   *     CONFIG_VIDEO_COPY.
> > > + * @hide_logo: Hide the logo (used for testing)
> > >   */
> > >  struct video_uc_plat {
> > >         uint align;
> > >         uint size;
> > >         ulong base;
> > >         ulong copy_base;
> > > +       bool hide_logo;
> > >  };
> > >
> > >  enum video_polarity {
> > > diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> > > index 39f03398ed8..06cc2d938db 100644
> > > --- a/scripts/Makefile.lib
> > > +++ b/scripts/Makefile.lib
> > > @@ -372,6 +372,27 @@ cmd_S_ttf=                                         \
> > >  $(obj)/%.S: $(src)/%.ttf
> > >         $(call cmd,S_ttf)
> > >
> > > +# Splash logos
> > > +# ---------------------------------------------------------------------------
> > > +
> > > +# Generate an assembly file to wrap the splash data
> > > +quiet_cmd_S_splash= TTF     $@
> > > +# Modified for U-Boot
> > > +cmd_S_splash=                                          \
> > > +(                                                      \
> > > +       echo '.section .rodata.splash.init,"a"';                \
> > > +       echo '.balign 16';                              \
> > > +       echo '.global __splash_$(*F)_begin';            \
> > > +       echo '__splash_$(*F)_begin:';                   \
> > > +       echo '.incbin "$<" ';                           \
> > > +       echo '__splash_$(*F)_end:';                     \
> > > +       echo '.global __splash_$(*F)_end';                      \
> > > +       echo '.balign 16';                              \
> > > +) > $@
> > > +
> > > +$(obj)/%.S: $(src)/%.bmp
> > > +       $(call cmd,S_splash)
> > > +
> > >  # EFI applications
> > >  # A Makefile target *.efi is built as EFI application.
> > >  # A Makefile target *_efi.S wraps *.efi as built-in EFI application.
> > > diff --git a/test/dm/video.c b/test/dm/video.c
> > > index 4e76574a913..d4a3c9c6c17 100644
> > > --- a/test/dm/video.c
> > > +++ b/test/dm/video.c
> > > @@ -115,6 +115,31 @@ static int select_vidconsole(struct unit_test_state *uts, const char *drv_name)
> > >         return 0;
> > >  }
> > >
> > > +/**
> > > + * video_get_nologo() - Disable the logo on the video device and return it
> > > + *
> > > + * @uts: Test state
> > > + * @devp: Returns video device
> > > + * @return 0 if OK, -ve on error
> > > + */
> > > +static int video_get_nologo(struct unit_test_state *uts, struct udevice **devp)
> > > +{
> > > +       struct video_uc_plat *uc_plat;
> > > +       struct udevice *dev;
> > > +
> > > +       ut_assertok(uclass_find_first_device(UCLASS_VIDEO, &dev));
> > > +       ut_assertnonnull(dev);
> > > +       uc_plat = dev_get_uclass_plat(dev);
> > > +       uc_plat->hide_logo = true;
> > > +
> > > +       /* now probe it */
> > > +       ut_assertok(uclass_first_device_err(UCLASS_VIDEO, &dev));
> > > +       ut_assertnonnull(dev);
> > > +       *devp = dev;
> > > +
> > > +       return 0;
> > > +}
> > > +
> > >  /* Test text output works on the video console */
> > >  static int dm_test_video_text(struct unit_test_state *uts)
> > >  {
> > > @@ -125,7 +150,7 @@ static int dm_test_video_text(struct unit_test_state *uts)
> > >  #define SCROLL_LINES   100
> > >
> > >         ut_assertok(select_vidconsole(uts, "vidconsole0"));
> > > -       ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
> > > +       ut_assertok(video_get_nologo(uts, &dev));
> > >         ut_asserteq(46, compress_frame_buffer(uts, dev));
> > >
> > >         ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con));
> > > @@ -157,7 +182,7 @@ static int dm_test_video_chars(struct unit_test_state *uts)
> > >         const char *test_string = "Well\b\b\b\bxhe is\r \n\ta very \amodest  \bman\n\t\tand Has much to\b\bto be modest about.";
> > >
> > >         ut_assertok(select_vidconsole(uts, "vidconsole0"));
> > > -       ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
> > > +       ut_assertok(video_get_nologo(uts, &dev));
> > >         ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con));
> > >         vidconsole_put_string(con, test_string);
> > >         ut_asserteq(466, compress_frame_buffer(uts, dev));
> > > @@ -174,7 +199,7 @@ static int dm_test_video_ansi(struct unit_test_state *uts)
> > >         struct udevice *dev, *con;
> > >
> > >         ut_assertok(select_vidconsole(uts, "vidconsole0"));
> > > -       ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
> > > +       ut_assertok(video_get_nologo(uts, &dev));
> > >         ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con));
> > >
> > >         /* reference clear: */
> > > @@ -222,7 +247,7 @@ static int check_vidconsole_output(struct unit_test_state *uts, int rot,
> > >         plat = dev_get_plat(dev);
> > >         plat->rot = rot;
> > >
> > > -       ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
> > > +       ut_assertok(video_get_nologo(uts, &dev));
> > >         ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con));
> > >         ut_asserteq(46, compress_frame_buffer(uts, dev));
> > >
> > > @@ -311,7 +336,7 @@ static int dm_test_video_bmp(struct unit_test_state *uts)
> > >         struct udevice *dev;
> > >         ulong addr;
> > >
> > > -       ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
> > > +       ut_assertok(video_get_nologo(uts, &dev));
> > >         ut_assertok(read_file(uts, "tools/logos/denx.bmp", &addr));
> > >
> > >         ut_assertok(video_bmp_display(dev, addr, 0, 0, false));
> > > @@ -433,7 +458,7 @@ static int dm_test_video_bmp_comp(struct unit_test_state *uts)
> > >         struct udevice *dev;
> > >         ulong addr;
> > >
> > > -       ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
> > > +       ut_assertok(video_get_nologo(uts, &dev));
> > >         ut_assertok(read_file(uts, "tools/logos/denx-comp.bmp", &addr));
> > >
> > >         ut_assertok(video_bmp_display(dev, addr, 0, 0, false));
> > > @@ -487,7 +512,7 @@ static int dm_test_video_truetype(struct unit_test_state *uts)
> > >         struct udevice *dev, *con;
> > >         const char *test_string = "Criticism may not be agreeable, but it is necessary. It fulfils the same function as pain in the human body. It calls attention to an unhealthy state of things. Some see private enterprise as a predatory target to be shot, others as a cow to be milked, but few are those who see it as a sturdy horse pulling the wagon. The \aprice OF\b\bof greatness\n\tis responsibility.\n\nBye";
> > >
> > > -       ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
> > > +       ut_assertok(video_get_nologo(uts, &dev));
> > >         ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con));
> > >         vidconsole_put_string(con, test_string);
> > >         ut_asserteq(12237, compress_frame_buffer(uts, dev));
> > > @@ -508,7 +533,7 @@ static int dm_test_video_truetype_scroll(struct unit_test_state *uts)
> > >         plat = dev_get_plat(dev);
> > >         plat->font_size = 100;
> > >
> > > -       ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
> > > +       ut_assertok(video_get_nologo(uts, &dev));
> > >         ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con));
> > >         vidconsole_put_string(con, test_string);
> > >         ut_asserteq(35030, compress_frame_buffer(uts, dev));
> > > @@ -529,7 +554,7 @@ static int dm_test_video_truetype_bs(struct unit_test_state *uts)
> > >         plat = dev_get_plat(dev);
> > >         plat->font_size = 100;
> > >
> > > -       ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
> > > +       ut_assertok(video_get_nologo(uts, &dev));
> > >         ut_assertok(uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con));
> > >         vidconsole_put_string(con, test_string);
> > >         ut_asserteq(29018, compress_frame_buffer(uts, dev));
> > > --
> > > 2.34.0.rc2.393.gf8c9666880-goog
> > >
> >
> > Simon,
> >
> > I find that this patch enables the default U-Boot Logo in the
> > top-right corner for gwventana_*_defconfig even though I have a custom
> > splash-screen (so I see both).
> >
> > I have the following in my defconfig:
> > $ grep -e "SPLASH\|LOGO" configs/gwventana_nand_defconfig
> > CONFIG_VIDEO_LOGO=y
> > CONFIG_SPLASH_SCREEN=y
> > CONFIG_SPLASH_SCREEN_ALIGN=y
> >
> > If I disable VIDEO_LOGO I don't see either the U-Boot logo or my
> > SPLASH_SCREEN. The commit log says "If SPLASH_SCREEN is enabled, it is
> > not enabled by default, so as not to conflict with that feature." but
> > I don't see where you do anything in this patch with SPLASH_SCREEN.
>
> I just mean in the Kconfig:
>
> config VIDEO_LOGO
>    bool "Show the U-Boot logo on the display"
>    depends on DM_VIDEO
>    default y if !SPLASH_SCREEN
>              ^^^^^
>
> So if you enable both of them, you will get both, but by default
> VIDEO_LOGO should be enabled only if SPLASH_SCREEN is not enabled.
>
> The splash code needs a rework too, I think. I just didn't get that far.
>
> Regards,
> Simon

Simon,

Ok, sorry, I missed the 'default y if !SPLASH_SCREEN' as that was from
a different patch.

Currently if I disable VIDEO_LOGO and leave only SPASH_SCREEN enabled
I get no display. Similarly if I enable VIDEO_LOGO and not
SPLASH_SCREEN I get no display.

If I go back to prior to this series (3a8b919932fd) splash works just
fine so I'm trying to understand why now I loose video completely if I
disable VIDEO_LOGO (which I wish wasn't enabled by default anyway when
using my existing gwventana defconfigs).

Fabio, do you have any imx6 boards that have defconfigs that enable
SPLASH_SCREEN you can see if the same behavior occurs on?  The
behavior is that VIDEO_LOGO got enabled by default so you see the
custom splash along with the U-Boot logo and if you disable VIDEO_LOGO
you also loose the custom splash.

Best Regards,

Tim

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PATCH 19/23] video: Support showing the U-Boot logo
  2022-03-28 18:50       ` Tim Harvey
@ 2022-03-28 19:00         ` Fabio Estevam
  0 siblings, 0 replies; 41+ messages in thread
From: Fabio Estevam @ 2022-03-28 19:00 UTC (permalink / raw)
  To: Tim Harvey
  Cc: Simon Glass, U-Boot Mailing List, Anatolij Gustschin, Tom Rini,
	Alistair Delva, Heinrich Schuchardt, Marek Behún,
	Roger Pau Monne

Hi Tim,

On Mon, Mar 28, 2022 at 3:50 PM Tim Harvey <tharvey@gateworks.com> wrote:

> Fabio, do you have any imx6 boards that have defconfigs that enable
> SPLASH_SCREEN you can see if the same behavior occurs on?  The
> behavior is that VIDEO_LOGO got enabled by default so you see the
> custom splash along with the U-Boot logo and if you disable VIDEO_LOGO
> you also loose the custom splash.

Yes, I am able to reproduce the same behavior on an imx6sabresd
running top of head U-Boot:
I do see both the Freescale logo and the U-Boot logo.

If VIDEO_LOGO is disabled, nothing is seen on the LCD.

^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2022-03-28 19:00 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-19 20:23 [PATCH 00/23] video: Support a U-Boot logo more easily Simon Glass
2021-11-19 20:23 ` [PATCH 01/23] sandbox: video: Support 8bpp depth Simon Glass
2021-11-19 20:23 ` [PATCH 02/23] video: sandbox: Avoid duplicate display windows Simon Glass
2021-11-19 20:23 ` [PATCH 03/23] console: Avoid serial output before the console is running Simon Glass
2021-11-19 20:23 ` [PATCH 04/23] video: sandbox: Set a maximum frame-buffer size Simon Glass
2021-11-19 20:23 ` [PATCH 05/23] sandbox: video: Correct the address of the copy base Simon Glass
2021-11-19 20:23 ` [PATCH 06/23] sandbox: video: Add BMP tests for 32bpp and 8bpp modes Simon Glass
2021-11-19 20:23 ` [PATCH 07/23] video: Expand video debugging buffer size Simon Glass
2021-11-19 20:23 ` [PATCH 08/23] sandbox: Enable support for the gzip command Simon Glass
2021-11-19 20:23 ` [PATCH 09/23] video: Drop fb_put_byte() el at Simon Glass
2021-11-19 20:23 ` [PATCH 10/23] video: Move BMP pixel-writing into a function Simon Glass
2021-11-19 20:23 ` [PATCH 11/23] video: bmp: Update RLE8 support to use the write function Simon Glass
2021-11-19 20:23 ` [PATCH 12/23] video: Drop the uclass colour map Simon Glass
2021-11-19 20:23 ` [PATCH 13/23] video: Tidy up 24/32 BMP blitting Simon Glass
2021-11-19 20:23 ` [PATCH 14/23] video: Add a test for 16bpp BMP files Simon Glass
2021-11-19 20:23 ` [PATCH 15/23] video: theadorable: Use RGB565 for BMP blitting Simon Glass
2021-11-19 20:24 ` [PATCH 16/23] video: Drop #ifdefs from video_bmp Simon Glass
2021-11-19 20:24 ` [PATCH 17/23] video: Convert CONFIG_VIDEO_LOGO to Kconfig Simon Glass
2022-01-22 13:26   ` Pali Rohár
2022-01-22 15:29     ` Tom Rini
2022-01-22 15:41       ` Pali Rohár
2022-01-22 18:41         ` Tom Rini
2022-01-23 14:48           ` Pali Rohár
2022-01-23 14:54             ` Tom Rini
2022-01-23 15:11               ` Pali Rohár
2022-01-23 16:14                 ` Tom Rini
2022-01-24  9:39                 ` Merlijn Wajer
2022-01-24 14:42                   ` Tom Rini
2022-01-22 17:17     ` Simon Glass
2021-11-19 20:24 ` [PATCH 18/23] video: Drop VIDEO_LOGO from cfb_console Simon Glass
2021-11-19 20:24 ` [PATCH 19/23] video: Support showing the U-Boot logo Simon Glass
2022-03-15 16:13   ` Tim Harvey
2022-03-28  6:35     ` Simon Glass
2022-03-28 18:50       ` Tim Harvey
2022-03-28 19:00         ` Fabio Estevam
2021-11-19 20:24 ` [PATCH 20/23] video: Show the U-Boot logo by default Simon Glass
2021-11-19 20:24 ` [PATCH 21/23] video: Support virtio devices with the splash screen Simon Glass
2021-11-23  2:08   ` Jaehoon Chung
2021-11-23  3:02     ` Peng Fan (OSS)
2021-11-19 20:24 ` [PATCH 22/23] x86: coreboot: Support getting a logo from virtio Simon Glass
2021-11-19 20:24 ` [PATCH 23/23] x86: coreboot: Add a sample script to build a qemu image Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.