From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753363Ab1I0Nmg (ORCPT ); Tue, 27 Sep 2011 09:42:36 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:53057 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752914Ab1I0Nln (ORCPT ); Tue, 27 Sep 2011 09:41:43 -0400 From: Deepthy Ravi To: , , , , , , , , , , , , , CC: , Deepthy Ravi Subject: [PATCH v2 4/5] ispccdc: Configure CCDC_SYN_MODE register Date: Tue, 27 Sep 2011 19:10:47 +0530 Message-ID: <1317130848-21136-5-git-send-email-deepthy.ravi@ti.com> X-Mailer: git-send-email 1.6.2.4 In-Reply-To: <1317130848-21136-1-git-send-email-deepthy.ravi@ti.com> References: <1317130848-21136-1-git-send-email-deepthy.ravi@ti.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Configure INPMOD and PACK8 fileds for UYVY8_2X8 and YUYV8_2X8 formats. Signed-off-by: Deepthy Ravi --- drivers/media/video/omap3isp/ispccdc.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/media/video/omap3isp/ispccdc.c b/drivers/media/video/omap3isp/ispccdc.c index 3bc9b7d..7791acb 100644 --- a/drivers/media/video/omap3isp/ispccdc.c +++ b/drivers/media/video/omap3isp/ispccdc.c @@ -985,8 +985,12 @@ static void ccdc_config_sync_if(struct isp_ccdc_device *ccdc, syn_mode &= ~ISPCCDC_SYN_MODE_INPMOD_MASK; if (format->code == V4L2_MBUS_FMT_YUYV8_2X8 || - format->code == V4L2_MBUS_FMT_UYVY8_2X8) - syn_mode |= ISPCCDC_SYN_MODE_INPMOD_YCBCR8; + format->code == V4L2_MBUS_FMT_UYVY8_2X8){ + if (pdata && pdata->bt656) + syn_mode |= ISPCCDC_SYN_MODE_INPMOD_YCBCR8; + else + syn_mode |= ISPCCDC_SYN_MODE_INPMOD_YCBCR16; + } else if (format->code == V4L2_MBUS_FMT_YUYV8_1X16 || format->code == V4L2_MBUS_FMT_UYVY8_1X16) syn_mode |= ISPCCDC_SYN_MODE_INPMOD_YCBCR16; @@ -1172,7 +1176,8 @@ static void ccdc_configure(struct isp_ccdc_device *ccdc) syn_mode &= ~ISPCCDC_SYN_MODE_SDR2RSZ; /* Use PACK8 mode for 1byte per pixel formats. */ - if (omap3isp_video_format_info(format->code)->width <= 8) + if ((omap3isp_video_format_info(format->code)->width <= 8) && + (omap3isp_video_format_info(format->code)->bpp <= 8)) syn_mode |= ISPCCDC_SYN_MODE_PACK8; else syn_mode &= ~ISPCCDC_SYN_MODE_PACK8; -- 1.7.0.4