]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
lcd: align fb writing address for horizontal display offset
authorLiu Ying <Ying.Liu@freescale.com>
Tue, 11 Jan 2011 07:29:58 +0000 (15:29 +0800)
committerAnatolij Gustschin <agust@denx.de>
Wed, 26 Jan 2011 23:20:59 +0000 (00:20 +0100)
CONFIG_SPLASH_SCREEN_ALIGN makes uboot support display
offset for splashimage. The framebuffer writing address
should be calculated according to different kinds of
framebuffer pixel format, i.e., bits per pixel value.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
common/lcd.c

index d854c21e95ab377303bf18003f6cc28e16a57409..0555ab4fb72117ec6e903a68561d54c05dfce244 100644 (file)
@@ -731,7 +731,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
 
        bmap = (uchar *)bmp + le32_to_cpu (bmp->header.data_offset);
        fb   = (uchar *) (lcd_base +
-               (y + height - 1) * lcd_line_length + x);
+               (y + height - 1) * lcd_line_length + x * bpix / 8);
 
        switch (bmp_bpix) {
        case 1: /* pass through */