From patchwork Tue Sep 27 12:09:25 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 116591 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 D83B5B6F72 for ; Tue, 27 Sep 2011 22:09:40 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 21143283FB; Tue, 27 Sep 2011 14:09:39 +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 wVnJ0TYh-zND; Tue, 27 Sep 2011 14:09:38 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DDA93283A2; Tue, 27 Sep 2011 14:09:36 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 87F47283A2 for ; Tue, 27 Sep 2011 14:09:34 +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 DTG3qAqKRV6Z for ; Tue, 27 Sep 2011 14:09:33 +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 mail-ey0-f172.google.com (mail-ey0-f172.google.com [209.85.215.172]) by theia.denx.de (Postfix) with ESMTPS id 8E994280F5 for ; Tue, 27 Sep 2011 14:09:32 +0200 (CEST) Received: by eye4 with SMTP id 4so5529657eye.3 for ; Tue, 27 Sep 2011 05:09:31 -0700 (PDT) Received: by 10.213.17.140 with SMTP id s12mr2734144eba.86.1317125371685; Tue, 27 Sep 2011 05:09:31 -0700 (PDT) Received: from mashiro.ms.mff.cuni.cz (eduroam32.ms.mff.cuni.cz. [195.113.21.32]) by mx.google.com with ESMTPS id f56sm69817135eea.0.2011.09.27.05.09.31 (version=SSLv3 cipher=OTHER); Tue, 27 Sep 2011 05:09:31 -0700 (PDT) From: Marek Vasut To: u-boot@lists.denx.de Date: Tue, 27 Sep 2011 14:09:25 +0200 Message-Id: <1317125366-16059-1-git-send-email-marek.vasut@gmail.com> X-Mailer: git-send-email 1.7.5.4 Subject: [U-Boot] [PATCH] MX5: Make IPU display output and pixel format configurable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 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 Signed-off-by: Marek Vasut Cc: Stefano Babic --- drivers/video/mxc_ipuv3_fb.c | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/video/mxc_ipuv3_fb.c b/drivers/video/mxc_ipuv3_fb.c index a66981c..c4443e8 100644 --- a/drivers/video/mxc_ipuv3_fb.c +++ b/drivers/video/mxc_ipuv3_fb.c @@ -42,6 +42,16 @@ DECLARE_GLOBAL_DATA_PTR; +/* Use DISP #1 by default. */ +#ifndef CONFIG_VIDEO_MX5_OUTPUT +#define CONFIG_VIDEO_MX5_OUTPUT 0 +#endif + +/* Use RGB666 pixel format by default. */ +#ifndef CONFIG_VIDEO_MX5_PIXFMT +#define CONFIG_VIDEO_MX5_PIXFMT IPU_PIX_FMT_RGB666 +#endif + void *lcd_base; /* Start of framebuffer memory */ void *lcd_console_address; /* Start of console buffer */ @@ -550,7 +560,7 @@ static int mxcfb_probe(u32 interface_pix_fmt, struct fb_videomode *mode) mxcfbi->blank = FB_BLANK_POWERDOWN; } - mxcfbi->ipu_di = 0; + mxcfbi->ipu_di = CONFIG_VIDEO_MX5_OUTPUT; ipu_disp_set_global_alpha(mxcfbi->ipu_ch, 1, 0x80); ipu_disp_set_color_key(mxcfbi->ipu_ch, 0, 0); @@ -636,7 +646,7 @@ int mx51_fb_init(struct fb_videomode *mode) lcd_base += 56; debug("Framebuffer at 0x%x\n", (unsigned int)lcd_base); - ret = mxcfb_probe(IPU_PIX_FMT_RGB666, mode); + ret = mxcfb_probe(CONFIG_VIDEO_MX5_PIXFMT, mode); return ret; }