From patchwork Thu Dec 20 10:52:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Kiryanov X-Patchwork-Id: 207649 X-Patchwork-Delegate: agust@denx.de 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 6A88F2C00A5 for ; Thu, 20 Dec 2012 21:54:47 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DEAB44A0B3; Thu, 20 Dec 2012 11:54:43 +0100 (CET) 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 1KS52O-8Cg-S; Thu, 20 Dec 2012 11:54:43 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3A3D64A09F; Thu, 20 Dec 2012 11:54:41 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0F55F4A09F for ; Thu, 20 Dec 2012 11:54:37 +0100 (CET) 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 j-SmRU9C9k4v for ; Thu, 20 Dec 2012 11:54:35 +0100 (CET) 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 compulab.co.il (softlayer.compulab.co.il [50.23.254.55]) by theia.denx.de (Postfix) with ESMTPS id 57E274A09E for ; Thu, 20 Dec 2012 11:54:33 +0100 (CET) Received: from [62.90.235.247] (port=16642 helo=zimbra-mta.compulab.co.il) by softlayer.compulab.co.il with esmtp (Exim 4.80) (envelope-from ) id 1Tldln-0004R0-11; Thu, 20 Dec 2012 12:54:31 +0200 Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id 4A284644198; Thu, 20 Dec 2012 12:54:30 +0200 (IST) X-Virus-Scanned: amavisd-new at compulab.co.il Received: from zimbra-mta.compulab.co.il ([127.0.0.1]) by localhost (zimbra-mta.compulab.co.il [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WcxK00AJCizR; Thu, 20 Dec 2012 12:54:29 +0200 (IST) Received: from compulab.co.il (nikita-pc.compulab.local [192.168.11.211]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id 8F201644194; Thu, 20 Dec 2012 12:54:29 +0200 (IST) Received: by compulab.co.il (Postfix, from userid 1000) id 6A835FC0054; Thu, 20 Dec 2012 12:54:29 +0200 (IST) From: Nikita Kiryanov To: u-boot@lists.denx.de Date: Thu, 20 Dec 2012 12:52:34 +0200 Message-Id: <1356000754-17329-1-git-send-email-nikita@compulab.co.il> X-Mailer: git-send-email 1.7.10.4 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - softlayer.compulab.co.il X-AntiAbuse: Original Domain - lists.denx.de X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - compulab.co.il X-Get-Message-Sender-Via: softlayer.compulab.co.il: acl_c_relayhosts_text_entry: nikita@compulab.co.il|compulab.co.il Subject: [U-Boot] [PATCH] lcd: restore ability to display 8 bpp BMPs on 16 bpp LCDs 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 Commit fb6a9aab7ae78c (LCD: display 32bpp decompressed bitmap image) broke the check that allowed U-Boot to display 8 bpp BMPs on a 16 bpp LCD screen, effectively turning this feature off. Restore this feature by changing the check back to the same meaning it originally had. To avoid future confusion, the check has also been rephrased to make its meaning clear. Signed-off-by: Nikita Kiryanov Signed-off-by: Igor Grinberg --- common/lcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/lcd.c b/common/lcd.c index 4c83a8b..cfa1134 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -834,7 +834,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y) } /* We support displaying 8bpp BMPs on 16bpp LCDs */ - if (bpix != bmp_bpix && (bmp_bpix != 8 || bpix != 16 || bpix != 32)) { + if (bpix != bmp_bpix && !(bmp_bpix == 8 && bpix == 16)) { printf ("Error: %d bit/pixel mode, but BMP has %d bit/pixel\n", bpix, le16_to_cpu(bmp->header.bit_count));