summaryrefslogtreecommitdiffstats
path: root/drivers/video/cfb_console.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-08-04 12:21:40 +0200
committerHans de Goede <hdegoede@redhat.com>2015-08-14 08:37:36 +0200
commitc4c9e81f45be621fbc812e250ade665d56c38957 (patch)
tree5053ce683b90cf6c9df4bbf3328c5841a00a2115 /drivers/video/cfb_console.c
parentbbc1b99e8b8a1b87c2d0d959a1fcd1990abe82dd (diff)
downloadtalos-obmc-uboot-c4c9e81f45be621fbc812e250ade665d56c38957.tar.gz
talos-obmc-uboot-c4c9e81f45be621fbc812e250ade665d56c38957.zip
cfbconsole: Remove width argument from the logo functions
The passed in width is always VIDEO_COLS. This is a preparation patch for adding stride != width support to the cfbconsole code. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'drivers/video/cfb_console.c')
-rw-r--r--drivers/video/cfb_console.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 7f2ddc10c6..d122ef7cd0 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -1826,20 +1826,16 @@ int video_display_bitmap(ulong bmp_image, int x, int y)
static int video_logo_xpos;
static int video_logo_ypos;
-static void plot_logo_or_black(void *screen, int width, int x, int y, \
- int black);
+static void plot_logo_or_black(void *screen, int x, int y, int black);
-static void logo_plot(void *screen, int width, int x, int y)
+static void logo_plot(void *screen, int x, int y)
{
- plot_logo_or_black(screen, width, x, y, 0);
+ plot_logo_or_black(screen, x, y, 0);
}
static void logo_black(void)
{
- plot_logo_or_black(video_fb_address, \
- VIDEO_COLS, \
- video_logo_xpos, \
- video_logo_ypos, \
+ plot_logo_or_black(video_fb_address, video_logo_xpos, video_logo_ypos,
1);
}
@@ -1858,11 +1854,11 @@ U_BOOT_CMD(
" "
);
-static void plot_logo_or_black(void *screen, int width, int x, int y, int black)
+static void plot_logo_or_black(void *screen, int x, int y, int black)
{
int xcount, i;
- int skip = (width - VIDEO_LOGO_WIDTH) * VIDEO_PIXEL_SIZE;
+ int skip = (VIDEO_COLS - VIDEO_LOGO_WIDTH) * VIDEO_PIXEL_SIZE;
int ycount = video_logo_height;
unsigned char r, g, b, *logo_red, *logo_blue, *logo_green;
unsigned char *source;
@@ -1880,7 +1876,7 @@ static void plot_logo_or_black(void *screen, int width, int x, int y, int black)
y = max(0, (int)(VIDEO_VISIBLE_ROWS - VIDEO_LOGO_HEIGHT + y + 1));
#endif /* CONFIG_SPLASH_SCREEN_ALIGN */
- dest = (unsigned char *)screen + (y * width + x) * VIDEO_PIXEL_SIZE;
+ dest = (unsigned char *)screen + (y * VIDEO_COLS + x) * VIDEO_PIXEL_SIZE;
#ifdef CONFIG_VIDEO_BMP_LOGO
source = bmp_logo_bitmap;
@@ -2009,8 +2005,7 @@ static void *video_logo(void)
}
#endif /* CONFIG_SPLASH_SCREEN */
- logo_plot(video_fb_address, VIDEO_COLS,
- video_logo_xpos, video_logo_ypos);
+ logo_plot(video_fb_address, video_logo_xpos, video_logo_ypos);
#ifdef CONFIG_SPLASH_SCREEN_ALIGN
/*
OpenPOWER on IntegriCloud