summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2013-10-22 11:06:06 +0200
committerAnatolij Gustschin <agust@denx.de>2013-10-30 10:48:37 +0100
commit45ae2546ef157b647d8684845c6554283b80be92 (patch)
treebcd787b8daaa3e2eb5b345313f536ae5e764e3a4 /drivers
parent2740e5de4f3cd0aa36efcfe1a995fb6e3858cc97 (diff)
downloadu-boot-imx-45ae2546ef157b647d8684845c6554283b80be92.zip
u-boot-imx-45ae2546ef157b647d8684845c6554283b80be92.tar.gz
u-boot-imx-45ae2546ef157b647d8684845c6554283b80be92.tar.bz2
video, cfb_console: make background and foreground color configurable
make CONSOLE_BG_COL/CONSOLE_FG_COL configurable through board config file. Clear video screen in video_init(). Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/cfb_console.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index a2946c7..6db4073 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -2108,6 +2108,24 @@ defined(CONFIG_SANDBOX) || defined(CONFIG_X86)
return 0;
}
+void video_clear(void)
+{
+ if (!video_fb_address)
+ return;
+#ifdef VIDEO_HW_RECTFILL
+ video_hw_rectfill(VIDEO_PIXEL_SIZE, /* bytes per pixel */
+ 0, /* dest pos x */
+ 0, /* dest pos y */
+ VIDEO_VISIBLE_COLS, /* frame width */
+ VIDEO_VISIBLE_ROWS, /* frame height */
+ bgx /* fill color */
+ );
+#else
+ memsetl(video_fb_address,
+ (VIDEO_VISIBLE_ROWS * VIDEO_LINE_LEN) / sizeof(int), bgx);
+#endif
+}
+
static int video_init(void)
{
unsigned char color8;
@@ -2194,6 +2212,8 @@ static int video_init(void)
}
eorx = fgx ^ bgx;
+ video_clear();
+
#ifdef CONFIG_VIDEO_LOGO
/* Plot the logo and get start point of console */
debug("Video: Drawing the logo ...\n");
@@ -2297,21 +2317,3 @@ int video_get_screen_columns(void)
{
return CONSOLE_COLS;
}
-
-void video_clear(void)
-{
- if (!video_fb_address)
- return;
-#ifdef VIDEO_HW_RECTFILL
- video_hw_rectfill(VIDEO_PIXEL_SIZE, /* bytes per pixel */
- 0, /* dest pos x */
- 0, /* dest pos y */
- VIDEO_VISIBLE_COLS, /* frame width */
- VIDEO_VISIBLE_ROWS, /* frame height */
- bgx /* fill color */
- );
-#else
- memsetl(video_fb_address,
- (VIDEO_VISIBLE_ROWS * VIDEO_LINE_LEN) / sizeof(int), bgx);
-#endif
-}