summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiu Ying <Ying.Liu@freescale.com>2011-01-11 15:29:58 +0800
committerAnatolij Gustschin <agust@denx.de>2011-01-27 00:20:59 +0100
commit8d46d5b1864aa49830c58abfdd230c7224b83459 (patch)
tree47bf74ec1f4b36cbd677a5833658afa2929d69e5
parent8aba9dceebb14144e07d19593111ee3a999c37fc (diff)
downloadu-boot-imx-8d46d5b1864aa49830c58abfdd230c7224b83459.zip
u-boot-imx-8d46d5b1864aa49830c58abfdd230c7224b83459.tar.gz
u-boot-imx-8d46d5b1864aa49830c58abfdd230c7224b83459.tar.bz2
lcd: align fb writing address for horizontal display offset
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>
-rw-r--r--common/lcd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/lcd.c b/common/lcd.c
index d854c21..0555ab4 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -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 */