summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-10-18 15:24:16 +0300
committerAnatolij Gustschin <agust@denx.de>2022-10-30 22:07:16 +0300
commit988d19dd5bd38181f3bfcafb2c159f367e39d627 (patch)
tree38641ca519e1611f55191c4769ce4d917c8fb0a9
parent7fcb30c0e023fcdce59eb28a824faac5d527d99d (diff)
downloadu-boot-988d19dd5bd38181f3bfcafb2c159f367e39d627.tar.xz
video: Split SPLASH_SCREEN_ALIGN from bmp command
The bmp command already has a way to centre the image. Using this CONFIG option to also centre it makes it impossible to control where images are placed on the screen. Drop the extra check. Simplify the Kconfig file we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r--cmd/bmp.c4
-rw-r--r--drivers/video/Kconfig7
2 files changed, 5 insertions, 6 deletions
diff --git a/cmd/bmp.c b/cmd/bmp.c
index 45f4c1296d..d72a826ae7 100644
--- a/cmd/bmp.c
+++ b/cmd/bmp.c
@@ -259,9 +259,7 @@ int bmp_display(ulong addr, int x, int y)
if (!ret) {
bool align = false;
- if (CONFIG_IS_ENABLED(SPLASH_SCREEN_ALIGN) ||
- x == BMP_ALIGN_CENTER ||
- y == BMP_ALIGN_CENTER)
+ if (x == BMP_ALIGN_CENTER || y == BMP_ALIGN_CENTER)
align = true;
ret = video_bmp_display(dev, addr, x, y, align);
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 3293837665..4d6c987df9 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -838,9 +838,10 @@ config SPLASH_SCREEN
image data before it is processed and sent to the frame buffer by
U-Boot. Define your own version to use this feature.
+if SPLASH_SCREEN
+
config SPLASHIMAGE_GUARD
bool "Support unaligned BMP images"
- depends on SPLASH_SCREEN
help
If this option is set, then U-Boot will prevent the environment
variable "splashimage" from being set to a problematic address
@@ -854,7 +855,6 @@ config SPLASHIMAGE_GUARD
config SPLASH_SCREEN_ALIGN
bool "Allow positioning the splash image anywhere on the display"
- depends on SPLASH_SCREEN || CMD_BMP
help
If this option is set the splash image can be freely positioned
on the screen. Environment variable "splashpos" specifies the
@@ -876,7 +876,6 @@ config SPLASH_SCREEN_ALIGN
config SPLASH_SOURCE
bool "Control the source of the splash image"
- depends on SPLASH_SCREEN
help
Use the splash_source.c library. This library provides facilities to
declare board specific splash image locations, routines for loading
@@ -907,6 +906,8 @@ config SPLASH_SOURCE
In case the environment variable "splashfile" is not defined the
default name 'splash.bmp' will be used.
+endif # SPLASH_SCREEN
+
config VIDEO_BMP_GZIP
bool "Gzip compressed BMP image support"
depends on CMD_BMP || SPLASH_SCREEN