From patchwork Fri Oct 19 15:34:06 2012
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Piotr Wilczek
X-Patchwork-Id: 192740
X-Patchwork-Delegate: promsoft@gmail.com
Return-Path:
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@bilbo.ozlabs.org
Received: from theia.denx.de (theia.denx.de [85.214.87.163])
by ozlabs.org (Postfix) with ESMTP id F3F062C0082
for ;
Sat, 20 Oct 2012 02:35:21 +1100 (EST)
Received: from localhost (localhost [127.0.0.1])
by theia.denx.de (Postfix) with ESMTP id 64A4C4A541;
Fri, 19 Oct 2012 17:35:06 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at theia.denx.de
Received: from theia.denx.de ([127.0.0.1])
by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id 3mdZ+Jn7zvgm; Fri, 19 Oct 2012 17:35:06 +0200 (CEST)
Received: from theia.denx.de (localhost [127.0.0.1])
by theia.denx.de (Postfix) with ESMTP id 6A8304A55F;
Fri, 19 Oct 2012 17:34:46 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
by theia.denx.de (Postfix) with ESMTP id 6BAB64A47A
for ; Fri, 19 Oct 2012 17:34:41 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at theia.denx.de
Received: from theia.denx.de ([127.0.0.1])
by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id TY+Z7SFgiSaR for ;
Fri, 19 Oct 2012 17:34:40 +0200 (CEST)
X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5
NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested)
Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24])
by theia.denx.de (Postfix) with ESMTP id AFADA4A492
for ; Fri, 19 Oct 2012 17:34:33 +0200 (CEST)
Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27])
by mailout1.samsung.com
(Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit
(built Nov
17 2011)) with ESMTP id <0MC500I58CLDFRX0@mailout1.samsung.com> for
u-boot@lists.denx.de; Sat, 20 Oct 2012 00:34:31 +0900 (KST)
X-AuditID: cbfee61b-b7fd46d0000046e0-94-508173079c11
Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA)
with SMTP id A2.48.18144.70371805;
Sat, 20 Oct 2012 00:34:31 +0900 (KST)
Received: from mcdsrvbld02.digital.local ([106.116.37.23])
by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01
(7.0.4.24.0) 64bit (built Nov 17 2011))
with ESMTPA id <0MC500AEECKZDJA0@mmp2.samsung.com> for
u-boot@lists.denx.de; Sat, 20 Oct 2012 00:34:31 +0900 (KST)
From: Piotr Wilczek
To: u-boot@lists.denx.de
Date: Fri, 19 Oct 2012 17:34:06 +0200
Message-id: <1350660847-29138-5-git-send-email-p.wilczek@samsung.com>
X-Mailer: git-send-email 1.7.10
In-reply-to: <1350660847-29138-1-git-send-email-p.wilczek@samsung.com>
References: <1348828478-31298-2-git-send-email-p.wilczek@samsung.com>
<1350660847-29138-1-git-send-email-p.wilczek@samsung.com>
X-Brightmail-Tracker:
H4sIAAAAAAAAA+NgFnrEJMWRmVeSWpSXmKPExsVy+t9jQV324sYAg1u/hSze7u1kd2D0OHtn
B2MAYxSXTUpqTmZZapG+XQJXxqJ7O9kKZnBVtLS8Zm1gnM7RxcjJISFgInHpdBMzhC0mceHe
erYuRi4OIYHpjBKX199lAkkICSxmkpiy0gfEZhPQllj+5g0jiC0iICHxq/8qI0gDs8ApRol3
7TeBJnFwCAtYSRw8aQxSwyKgKvF/xUUmkDCvgKtEU4cmxC55iaf3+9hAbE4BN4lvU4+xQOxt
ZJS4s30u0wRG3gWMDKsYRVMLkguKk9JzjfSKE3OLS/PS9ZLzczcxgn3+THoH46oGi0OMAhyM
Sjy8jI8bAoRYE8uKK3MPMUpwMCuJ8LqxNwYI8aYkVlalFuXHF5XmpBYfYpTmYFES5232SAkQ
EkhPLEnNTk0tSC2CyTJxcEo1MApa96fZ+6/i9JT3nbybfWnGzQ+X2UUEDdifFzXuOGnx7O0c
/7TnrpVPpzs/n3XlSM4+ib13FrEtY/twiX/9TyUDy9zdGZ9Yg1ZstcubeXXP3NiS/q+vctYy
/66xX20dE/K9ss/+xtOH13UuWa/0rrjanOBkLKsskLFZ6TLzPkmRskUVJ/TmFiqxFGckGmox
FxUnAgDNJ5J89QEAAA==
Cc: Piotr Wilczek ,
Kyungmin Park ,
Donghwa Lee
Subject: [U-Boot] [PATCH v5 4/5] drivers: video: fix image position
X-BeenThere: u-boot@lists.denx.de
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: U-Boot discussion
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
MIME-Version: 1.0
Sender: u-boot-bounces@lists.denx.de
Errors-To: u-boot-bounces@lists.denx.de
This patch fixes image position on screen when images's height or width is biger then the lcd's.
Signed-off-by: Piotr Wilczek
Signed-off-by: Kyungmin Park
CC: Minkyu Kang
---
Changes in v2:
- none
Changes in v3:
- none
Changes in v4:
- none
Changes in v4:
- none
drivers/video/exynos_fb.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c
index e31a0fd..d9a3f9a 100644
--- a/drivers/video/exynos_fb.c
+++ b/drivers/video/exynos_fb.c
@@ -70,8 +70,19 @@ static void draw_logo(void)
int x, y;
ulong addr;
- x = ((panel_width - panel_info.logo_width) >> 1);
- y = ((panel_height - panel_info.logo_height) >> 1) - 4;
+ if (panel_width >= panel_info.logo_width) {
+ x = ((panel_width - panel_info.logo_width) >> 1);
+ } else {
+ x = 0;
+ printf("Warning: image width is bigger than display width\n");
+ }
+
+ if (panel_height >= panel_info.logo_height) {
+ y = ((panel_height - panel_info.logo_height) >> 1) - 4;
+ } else {
+ y = 0;
+ printf("Warning: image height is bigger than display height\n");
+ }
addr = panel_info.logo_addr;
bmp_display(addr, x, y);