diff mbox

[U-Boot,1/1] lcd: align fb writing address for horizontal display offset

Message ID 1294730998-7737-1-git-send-email-Ying.Liu@freescale.com
State Accepted
Delegated to: Anatolij Gustschin
Headers show

Commit Message

Liu Ying Jan. 11, 2011, 7:29 a.m. UTC
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 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Anatolij Gustschin Jan. 26, 2011, 11:28 p.m. UTC | #1
Hello,

On Tue, 11 Jan 2011 15:29:58 +0800
Liu Ying <Ying.Liu@freescale.com> wrote:

> 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 |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied to u-boot-video/master. Thanks!

Anatolij
Liu Ying-B17645 Jan. 27, 2011, 2:05 a.m. UTC | #2
Hello, Anatolij,

Thanks for your review!

Best Regards,
Liu Ying
-----Original Message-----
From: Anatolij Gustschin [mailto:agust@denx.de] 
Sent: Thursday, January 27, 2011 7:29 AM
To: Liu Ying-B17645
Cc: u-boot@lists.denx.de
Subject: Re: [U-Boot] [PATCH 1/1] lcd: align fb writing address for horizontal display offset

Hello,

On Tue, 11 Jan 2011 15:29:58 +0800
Liu Ying <Ying.Liu@freescale.com> wrote:

> 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 |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied to u-boot-video/master. Thanks!

Anatolij
diff mbox

Patch

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