From patchwork Sun Nov 30 12:29:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Kiryanov X-Patchwork-Id: 416088 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 9E074140119 for ; Sun, 30 Nov 2014 23:31:26 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0C7C04B76D; Sun, 30 Nov 2014 13:30:49 +0100 (CET) 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 fqylA5c--hgo; Sun, 30 Nov 2014 13:30:48 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B9D944B77C; Sun, 30 Nov 2014 13:30:16 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A7AE94B6BE for ; Sun, 30 Nov 2014 13:29:59 +0100 (CET) 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 8XhPNjcLe3lz for ; Sun, 30 Nov 2014 13:29:59 +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 (unknown [50.23.254.55]) by theia.denx.de (Postfix) with ESMTPS id C93F04B6A9 for ; Sun, 30 Nov 2014 13:29:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=compulab.co.il; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=oaQ26dUiO1gUut0eH+0Fkl8MafIVMHA/wpeiLmKPHy4=; b=Vlkqxs7eFAzb3zKvrIuSK4cxCB+nJjPwSXg06PG7t6RCWyskNPMpYp0ADKtKXO+Mv60YtnKEIUsH8dVHmucOj0szFaUmbP/v+4tzV3rB/Bk985VrN6jxghs1vcQ7yINw3GP7FUXl3zWDuIQFyLAJNM06XKVyS5BWvYl7PqR4Uwc=; Received: from [62.90.235.247] (port=30171 helo=zimbra-mta.compulab.co.il) by softlayer.compulab.co.il with esmtp (Exim 4.82) (envelope-from ) id 1Xv3dU-0000ab-88; Sun, 30 Nov 2014 14:29:56 +0200 Received: from localhost (localhost [127.0.0.1]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id 440E3483F25; Sun, 30 Nov 2014 14:29:55 +0200 (IST) 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 10032) with ESMTP id FoeSVNppUfpk; Sun, 30 Nov 2014 14:29:50 +0200 (IST) Received: from localhost (localhost [127.0.0.1]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id 420B3483F2D; Sun, 30 Nov 2014 14:29:46 +0200 (IST) X-Virus-Scanned: amavisd-new at zimbra-mta.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 10026) with ESMTP id KZ1Y2T8yZOOe; Sun, 30 Nov 2014 14:29:46 +0200 (IST) Received: from skynet.compulab.local (nikita-pc.compulab.local [192.168.11.211]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id 246AB483F20; Sun, 30 Nov 2014 14:29:46 +0200 (IST) From: Nikita Kiryanov To: u-boot@lists.denx.de Date: Sun, 30 Nov 2014 14:29:41 +0200 Message-Id: <1417350585-22669-9-git-send-email-nikita@compulab.co.il> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1417350585-22669-1-git-send-email-nikita@compulab.co.il> References: <1417350585-22669-1-git-send-email-nikita@compulab.co.il> 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 V2 08/12] lcd: get rid of COLOR_MASK X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 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 COLOR_MASK macro doesn't do anything; Remove it to reduce visual complexity. This is a preparatory step for extracting lcd console code into its own file. Signed-off-by: Nikita Kiryanov Cc: Anatolij Gustschin Cc: Simon Glass Acked-by: Simon Glass Tested-by: Simon Glass --- Changes in V2: - New patch. common/lcd.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/common/lcd.c b/common/lcd.c index bc15c78..f98aaaf 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -89,10 +89,8 @@ #define CONSOLE_SIZE (CONSOLE_ROW_SIZE * console_rows) #define CONSOLE_SCROLL_SIZE (CONSOLE_SIZE - CONSOLE_ROW_SIZE) -#if (LCD_BPP == LCD_COLOR8) || (LCD_BPP == LCD_COLOR16) || \ - (LCD_BPP == LCD_COLOR32) -# define COLOR_MASK(c) (c) -#else +#if (LCD_BPP != LCD_COLOR8) && (LCD_BPP != LCD_COLOR16) && \ + (LCD_BPP != LCD_COLOR32) # error Unsupported LCD BPP. #endif @@ -188,7 +186,7 @@ static void console_scrollup(void) /* Clear the last rows */ #if (LCD_BPP != LCD_COLOR32) memset(lcd_console_address + CONSOLE_SIZE - CONSOLE_ROW_SIZE * rows, - COLOR_MASK(lcd_color_bg), + lcd_color_bg, CONSOLE_ROW_SIZE * rows); #else u32 *ppix = lcd_console_address + @@ -197,7 +195,7 @@ static void console_scrollup(void) for (i = 0; i < (CONSOLE_ROW_SIZE * rows) / NBYTES(panel_info.vl_bpix); i++) { - *ppix++ = COLOR_MASK(lcd_color_bg); + *ppix++ = lcd_color_bg; } #endif lcd_sync(); @@ -462,7 +460,7 @@ void lcd_clear(void) /* set framebuffer to background color */ #if (LCD_BPP != LCD_COLOR32) memset((char *)lcd_base, - COLOR_MASK(lcd_color_bg), + lcd_color_bg, lcd_line_length * panel_info.vl_row); #else u32 *ppix = lcd_base; @@ -470,7 +468,7 @@ void lcd_clear(void) for (i = 0; i < (lcd_line_length * panel_info.vl_row)/NBYTES(panel_info.vl_bpix); i++) { - *ppix++ = COLOR_MASK(lcd_color_bg); + *ppix++ = lcd_color_bg; } #endif #endif