summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2017-08-03 12:47:01 -0400
committerAnatolij Gustschin <agust@denx.de>2017-09-12 13:40:47 +0200
commit8ef05352508f99b9e69feeca17a49671cc3d0ccf (patch)
tree2d306cda8e7d18c70881e1b816f344d73d33809c /drivers/video
parent971d7e64245d5970ae9fe9a1f418e2900663248a (diff)
video: add config option to skip framebuffer clear
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>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/Kconfig8
-rw-r--r--drivers/video/cfb_console.c3
-rw-r--r--drivers/video/video-uclass.c4
3 files changed, 13 insertions, 2 deletions
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 5505ee6f57..7ba7b580db 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -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
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 6c5425c195..74cc20d653 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -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 */
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index 3036e3a1f2..dfa39b0d1b 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -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