summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-12-28 19:28:31 +0300
committerTom Rini <trini@konsulko.com>2021-12-28 19:28:31 +0300
commit87a9aa604de8a4a50642e25b88af328ab375893b (patch)
tree863b4beef53827cddf2813dd7627aaa0bac62cda /common
parent111a8b57354bb5aff55635502a0cdf74cb63e835 (diff)
parent92302ab1a279859824ec0f2e3864be44e883bff9 (diff)
downloadu-boot-87a9aa604de8a4a50642e25b88af328ab375893b.tar.xz
Merge tag 'video-next-20211228' of https://source.denx.de/u-boot/custodians/u-boot-video into next
- various fixes to the sandbox display support - support for showing a logo without splash screen config - support for BMP drawing to depths other than 16bpp - tests for the different types of supported BMP images - support showing a logo when running coreboot via qemu
Diffstat (limited to 'common')
-rw-r--r--common/console.c6
-rw-r--r--common/splash.c2
-rw-r--r--common/splash_source.c14
3 files changed, 19 insertions, 3 deletions
diff --git a/common/console.c b/common/console.c
index 0c9099ca52..2bccc8ab10 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);
}
diff --git a/common/splash.c b/common/splash.c
index de720df9f5..98f0089266 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/common/splash_source.c b/common/splash_source.c
index d05670f5ee..2c03cbdf92 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);