summaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2008-08-08 18:00:39 +0200
committerWolfgang Denk <wd@denx.de>2008-08-11 00:24:04 +0200
commitd9015f6a50d7258125349ef5c2af836458a0029a (patch)
treee975e66dd6346f1676ff5bdb90e622787ce27eb3 /drivers/video
parent406819ae94f79f5b59e01d163380ca7d83709251 (diff)
downloadtalos-obmc-uboot-d9015f6a50d7258125349ef5c2af836458a0029a.tar.gz
talos-obmc-uboot-d9015f6a50d7258125349ef5c2af836458a0029a.zip
video: fix bug in logo_plot
If logo_plot() should ever be called with x starting position other than zero and for pixel depths greater than 8bpp, logo colors distortion will be observed. This patch fixes the issue. Signed-off-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/cfb_console.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 68b9861d41..97a37ba50c 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -1071,7 +1071,9 @@ void logo_plot (void *screen, int width, int x, int y)
int ycount = VIDEO_LOGO_HEIGHT;
unsigned char r, g, b, *logo_red, *logo_blue, *logo_green;
unsigned char *source;
- unsigned char *dest = (unsigned char *)screen + ((y * width * VIDEO_PIXEL_SIZE) + x);
+ unsigned char *dest = (unsigned char *)screen +
+ ((y * width * VIDEO_PIXEL_SIZE) +
+ x * VIDEO_PIXEL_SIZE);
#ifdef CONFIG_VIDEO_BMP_LOGO
source = bmp_logo_bitmap;
OpenPOWER on IntegriCloud