瀏覽代碼

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>
Liu Ying 14 年之前
父節點
當前提交
8d46d5b186
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      common/lcd.c

+ 1 - 1
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 */