public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] video: fix bug in logo_plot
@ 2008-08-08 16:00 Anatolij Gustschin
  2008-08-08 16:00 ` [U-Boot] [PATCH 2/2] video: fix bug in cfb_console code Anatolij Gustschin
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Anatolij Gustschin @ 2008-08-08 16:00 UTC (permalink / raw)
  To: u-boot

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>
---
 drivers/video/cfb_console.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 68b9861..97a37ba 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;
-- 
1.5.4.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-08-10 22:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-08 16:00 [U-Boot] [PATCH 1/2] video: fix bug in logo_plot Anatolij Gustschin
2008-08-08 16:00 ` [U-Boot] [PATCH 2/2] video: fix bug in cfb_console code Anatolij Gustschin
2008-08-10 22:25   ` Wolfgang Denk
2008-08-09  8:21 ` [U-Boot] [PATCH 1/2] video: fix bug in logo_plot Jean-Christophe PLAGNIOL-VILLARD
2008-08-09  9:13   ` Anatolij Gustschin
2008-08-10 22:24 ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox