Add necessary Kconfigs to enable video driver and enable splash screen
at spl stage.
CONFIG_SPL_VIDEO enables all necessary configs enabled by CONFIG_VIDEO
at spl stage.
CONFIG_SPL_SYS_WHITE_ON_BLACK allows displaying on black background at
spl stage.

These configs are specific to SPL and will allow us to enable the video
driver and splash screen at SPL stage only and not at u-boot proper.
The existing Kconfigs from u-boot proper were not used to make SPL
splash screen independent to them.

Enable BMP_GZIP at SPL stage when SPL_SPLASH_SCREEN or SPL_CMD_BMP are
defined.

Signed-off-by: Nikhil M Jain <n-ja...@ti.com>
Reviewed-by: Devarsh Thakkar <devar...@ti.com>
---
 drivers/video/Kconfig | 30 +++++++++++++++++++++++++++---
 1 file changed, 27 insertions(+), 3 deletions(-)

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 2a76d19cc8..1097e2c623 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -14,7 +14,17 @@ config VIDEO
          option compiles in the video uclass and routes all LCD/video access
          through this.
 
-if VIDEO
+config SPL_VIDEO
+       bool "Enable driver model support for LCD/video"
+       depends on SPL_DM
+       help
+         The video subsystem adds a small amount of overhead to the image.
+         If this is acceptable and you have a need to use video drivers in
+         SPL, enable this option. It might provide a cleaner interface to
+         setting up video within SPL, and allows the same drivers to be
+         used as U-Boot proper.
+
+if VIDEO || SPL_VIDEO
 
 config VIDEO_LOGO
        bool "Show the U-Boot logo on the display"
@@ -193,6 +203,14 @@ config SYS_WHITE_ON_BLACK
         better in low-light situations or to reduce eye strain in some
         cases.
 
+config SPL_SYS_WHITE_ON_BLACK
+       bool "Display console as white on a black background"
+       help
+        Normally the display is black on a white background, Enable this
+        option to invert this, i.e. white on a black background at spl stage.
+        This can be better in low-light situations or to reduce eye strain in
+        some cases.
+
 config NO_FB_CLEAR
        bool "Skip framebuffer clear"
        help
@@ -795,7 +813,13 @@ 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 SPL_SPLASH_SCREEN
+       bool "Show a splash-screen image"
+       help
+         If this option is set, the environment is checked for a variable
+         "splashimage" at spl stage.
+
+if SPLASH_SCREEN || SPL_SPLASH_SCREEN
 
 config SPLASH_SCREEN_ALIGN
        bool "Allow positioning the splash image anywhere on the display"
@@ -863,7 +887,7 @@ endif # SPLASH_SCREEN
 
 config VIDEO_BMP_GZIP
        bool "Gzip compressed BMP image support"
-       depends on CMD_BMP || SPLASH_SCREEN
+       depends on CMD_BMP || SPLASH_SCREEN || SPL_SPLASH_SCREEN || SPL_CMD_BMP
        help
          If this option is set, additionally to standard BMP
          images, gzipped BMP images can be displayed via the
-- 
2.34.1

Reply via email to