Hi Nikhil,

Thanks for the patch.

On 14/03/23 10:20, Nikhil M Jain wrote:
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>
---
  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.

My understanding is that for all the common macros under (VIDEO || SPL_VIDEO)

(for e.g. like CONFIG_VIDEO_LOGO) code will get compiled in both u-boot proper at SPL even

if intended to be enabled for only on of them.

For e.g. you enable CONFIG_VIDEO_LOGO with CONFIG_VIDEO set aiming to compiled them

only for u-boot proper but corresponding code will also get compiled for u-boot SPL now.

Please confirm but If this is true then from my point of view I think we need

unique SPL_VIDEO_* macro (which will depend on SPL_VIDEO) for each of the VIDEO_* macros

getting used generally or probably all of them. And use CONFIG_IS_ENABLED at all places in video drivers

for each of the macros. Lastly you may also have to update relevant docs viz.

docs/README.spl and video related docs if any.

+config SPL_SYS_WHITE_ON_BLACK
+       bool "Display console as white on a black background"
+       help
This should depend upon SPL_VIDEO
+        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"
Same here.
+       help
+         If this option is set, the environment is checked for a variable
+         "splashimage" at spl stage.
+
+if SPLASH_SCREEN || SPL_SPLASH_SCREEN

If going with above suggested approach then you will need to make

unique macros for SPL.


Regards

Devarsh

  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

Reply via email to