From patchwork Mon Nov 15 14:29:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Aguirre Rodriguez, Sergio Alberto" X-Patchwork-Id: 4891 Return-path: Envelope-to: mchehab@pedra Delivery-date: Tue, 16 Nov 2010 09:49:48 -0200 Received: from mchehab by pedra with local (Exim 4.72) (envelope-from ) id 1PIK2m-0001bS-4x for mchehab@pedra; Tue, 16 Nov 2010 09:49:48 -0200 Received: from casper.infradead.org [85.118.1.10] by pedra with IMAP (fetchmail-6.3.17) for (single-drop); Tue, 16 Nov 2010 09:49:48 -0200 (BRST) Received: from vger.kernel.org ([209.132.180.67]) by casper.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1PI04U-0008TB-Vk; Mon, 15 Nov 2010 14:30:15 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757380Ab0KOOaD (ORCPT + 1 other); Mon, 15 Nov 2010 09:30:03 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:60870 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756897Ab0KOOaC (ORCPT ); Mon, 15 Nov 2010 09:30:02 -0500 Received: from dlep33.itg.ti.com ([157.170.170.112]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id oAFETxHT001402 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 15 Nov 2010 08:29:59 -0600 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id oAFETwtx001986; Mon, 15 Nov 2010 08:29:59 -0600 (CST) Received: from localhost (dtx0091359-ubuntu-1.am.dhcp.ti.com [128.247.79.64]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id oAFETwf09556; Mon, 15 Nov 2010 08:29:58 -0600 (CST) From: Sergio Aguirre To: Laurent Pinchart Cc: linux-media@vger.kernel.org, Sergio Aguirre Subject: [omap3isp][PATCH v2 1/9] omap3isp: ccdc: Add support for YUV format Date: Mon, 15 Nov 2010 08:29:53 -0600 Message-Id: <1289831401-593-2-git-send-email-saaguirre@ti.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1289831401-593-1-git-send-email-saaguirre@ti.com> References: <1289831401-593-1-git-send-email-saaguirre@ti.com> Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Sender: We were just supporting RAW10 formats, and we really support more options. Strictly speaking, CCDC needs at least to distinguish between RAW and YUV formats for proper configuration. Signed-off-by: Sergio Aguirre --- drivers/media/video/isp/ispccdc.c | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/media/video/isp/ispccdc.c b/drivers/media/video/isp/ispccdc.c index be4581e..c3d1d7a 100644 --- a/drivers/media/video/isp/ispccdc.c +++ b/drivers/media/video/isp/ispccdc.c @@ -45,6 +45,8 @@ static const unsigned int ccdc_fmts[] = { V4L2_MBUS_FMT_SRGGB10_1X10, V4L2_MBUS_FMT_SBGGR10_1X10, V4L2_MBUS_FMT_SGBRG10_1X10, + V4L2_MBUS_FMT_YUYV8_1X16, + V4L2_MBUS_FMT_UYVY8_1X16, }; /* @@ -1069,6 +1071,9 @@ static void ccdc_configure(struct isp_ccdc_device *ccdc) isp_configure_bridge(isp, ccdc->input, pdata); ispccdc_config_sync_if(ccdc, &ccdc->syncif); + /* CCDC_PAD_SINK */ + format = &ccdc->formats[CCDC_PAD_SINK]; + syn_mode = isp_reg_readl(isp, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SYN_MODE); /* Use the raw, unprocessed data when writing to memory. The H3A and @@ -1086,10 +1091,13 @@ static void ccdc_configure(struct isp_ccdc_device *ccdc) else syn_mode &= ~ISPCCDC_SYN_MODE_SDR2RSZ; - isp_reg_writel(isp, syn_mode, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SYN_MODE); + if ((format->code == V4L2_MBUS_FMT_YUYV8_1X16) || + (format->code == V4L2_MBUS_FMT_UYVY8_1X16)) + syn_mode |= ISPCCDC_SYN_MODE_INPMOD_YCBCR16; + else + syn_mode &= ~ISPCCDC_SYN_MODE_INPMOD_MASK; - /* CCDC_PAD_SINK */ - format = &ccdc->formats[CCDC_PAD_SINK]; + isp_reg_writel(isp, syn_mode, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SYN_MODE); /* Mosaic filter */ switch (format->code) {