]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
video: add config option to skip framebuffer clear
authorRob Clark <robdclark@gmail.com>
Thu, 3 Aug 2017 16:47:01 +0000 (12:47 -0400)
committerAnatolij Gustschin <agust@denx.de>
Tue, 12 Sep 2017 11:40:47 +0000 (13:40 +0200)
The use-case is that the thing that loaded u-boot already put a splash
image on screen.  And we want to preserve that until grub boot menu
takes over.

Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/video/Kconfig
drivers/video/cfb_console.c
drivers/video/video-uclass.c

index 5505ee6f57dc56f61c0e1d3fdb054c9ae0cbc5e2..7ba7b580db1158f5ee4acaa8b004f603e7519efe 100644 (file)
@@ -119,6 +119,14 @@ config SYS_WHITE_ON_BLACK
         better in low-light situations or to reduce eye strain in some
         cases.
 
+config NO_FB_CLEAR
+       bool "Skip framebuffer clear"
+       help
+         If firmware (whatever loads u-boot) has already put a splash image
+         on screen, you might want to preserve it until whatever u-boot
+         loads takes over the screen.  This, for example, can be used to
+         keep splash image on screen until grub graphical boot menu starts.
+
 source "drivers/video/fonts/Kconfig"
 
 config VIDCONSOLE_AS_LCD
index 6c5425c195e927d4594d6f4ccc97cbb56f88bbfa..74cc20d6532f374c87e96dd5b9c372b8973a91f6 100644 (file)
@@ -2081,7 +2081,8 @@ static int cfg_video_init(void)
        }
        eorx = fgx ^ bgx;
 
-       video_clear();
+       if (!CONFIG_IS_ENABLED(NO_FB_CLEAR))
+               video_clear();
 
 #ifdef CONFIG_VIDEO_LOGO
        /* Plot the logo and get start point of console */
index 3036e3a1f25f054617bbf5852f762268bf72027e..dfa39b0d1b893ad774e0fa35bb57760b34bf8973 100644 (file)
@@ -199,7 +199,9 @@ static int video_post_probe(struct udevice *dev)
 #else
        priv->colour_bg = 0xffffff;
 #endif
-       video_clear(dev);
+
+       if (!CONFIG_IS_ENABLED(NO_FB_CLEAR))
+               video_clear(dev);
 
        /*
         * Create a text console device. For now we always do this, although