aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBastian Ruppert <Bastian.Ruppert@Sewerin.de>2012-09-13 22:29:02 +0000
committerTom Rini <trini@ti.com>2012-10-01 10:02:13 -0700
commit4b7d3a0e80b32a7b64282ff91ff660c0e52e2be0 (patch)
treee5c3da39ead481a9ae2b8e39c35967d4f29b61cd /drivers
parent1e681f9ad8dd18aa15319ae4951b8eeaeb70da16 (diff)
downloadu-boot-4b7d3a0e80b32a7b64282ff91ff660c0e52e2be0.zip
u-boot-4b7d3a0e80b32a7b64282ff91ff660c0e52e2be0.tar.gz
u-boot-4b7d3a0e80b32a7b64282ff91ff660c0e52e2be0.tar.bz2
video: cfb_console: add function to plot the logo area black
Signed-off-by: Bastian Ruppert <Bastian.Ruppert@Sewerin.de> CC: Anatolij Gustschin <agust@denx.de> CC: Tom Rini <trini@ti.com> CC: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/cfb_console.c46
1 files changed, 42 insertions, 4 deletions
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index fc4ea72..9f7794f 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -1487,7 +1487,39 @@ int video_display_bitmap(ulong bmp_image, int x, int y)
static int video_logo_xpos;
static int video_logo_ypos;
-void logo_plot(void *screen, int width, int x, int y)
+static void plot_logo_or_black(void *screen, int width, int x, int y, \
+ int black);
+
+static void logo_plot(void *screen, int width, int x, int y)
+{
+ plot_logo_or_black(screen, width, x, y, 0);
+}
+
+static void logo_black(void)
+{
+ plot_logo_or_black(video_fb_address, \
+ VIDEO_COLS, \
+ video_logo_xpos, \
+ video_logo_ypos, \
+ 1);
+}
+
+static int do_clrlogo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+ if (argc != 1)
+ return cmd_usage(cmdtp);
+
+ logo_black();
+ return 0;
+}
+
+U_BOOT_CMD(
+ clrlogo, 1, 0, do_clrlogo,
+ "fill the boot logo area with black",
+ " "
+ );
+
+static void plot_logo_or_black(void *screen, int width, int x, int y, int black)
{
int xcount, i;
@@ -1545,9 +1577,15 @@ void logo_plot(void *screen, int width, int x, int y)
#endif
xcount = VIDEO_LOGO_WIDTH;
while (xcount--) {
- r = logo_red[*source - VIDEO_LOGO_LUT_OFFSET];
- g = logo_green[*source - VIDEO_LOGO_LUT_OFFSET];
- b = logo_blue[*source - VIDEO_LOGO_LUT_OFFSET];
+ if (black) {
+ r = 0x00;
+ g = 0x00;
+ b = 0x00;
+ } else {
+ r = logo_red[*source - VIDEO_LOGO_LUT_OFFSET];
+ g = logo_green[*source - VIDEO_LOGO_LUT_OFFSET];
+ b = logo_blue[*source - VIDEO_LOGO_LUT_OFFSET];
+ }
switch (VIDEO_DATA_FORMAT) {
case GDF__8BIT_INDEX: