[omap3isp,RFC,02/10] omap3isp: ccdc: Write SYN_MODE.INPMOD based on fmt

Message ID 1289596693-27660-3-git-send-email-saaguirre@ti.com (mailing list archive)
State RFC, archived
Headers

Commit Message

Aguirre Rodriguez, Sergio Alberto Nov. 12, 2010, 9:18 p.m. UTC
  This takes into account the input format to select the
adequate configuration for SYNC mode.

Also, change bitmask ISPCCDC_SYN_MODE_INPMOD_MASK to be
more consistent with other bitmasks.

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
---
 drivers/media/video/isp/ispccdc.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
  

Comments

Laurent Pinchart Nov. 15, 2010, 10:36 a.m. UTC | #1
Hi Sergio,

Thanks for the patch.

On Friday 12 November 2010 22:18:05 Sergio Aguirre wrote:
> This takes into account the input format to select the
> adequate configuration for SYNC mode.
> 
> Also, change bitmask ISPCCDC_SYN_MODE_INPMOD_MASK to be
> more consistent with other bitmasks.

Could you please squash this with the previous patch ?
  
Aguirre Rodriguez, Sergio Alberto Nov. 15, 2010, 2:20 p.m. UTC | #2
Hi Laurent,

> -----Original Message-----
> From: Laurent Pinchart [mailto:laurent.pinchart@ideasonboard.com]
> Sent: Monday, November 15, 2010 4:37 AM
> To: Aguirre, Sergio
> Cc: linux-media@vger.kernel.org
> Subject: Re: [omap3isp RFC][PATCH 02/10] omap3isp: ccdc: Write
> SYN_MODE.INPMOD based on fmt
> 
> Hi Sergio,
> 
> Thanks for the patch.

Thanks for reviewing.

> 
> On Friday 12 November 2010 22:18:05 Sergio Aguirre wrote:
> > This takes into account the input format to select the
> > adequate configuration for SYNC mode.
> >
> > Also, change bitmask ISPCCDC_SYN_MODE_INPMOD_MASK to be
> > more consistent with other bitmasks.
> 
> Could you please squash this with the previous patch ?

Sure. I will resend the updated patchset in a couple of minutes.

Regards,
Sergio

> 
> --
> Regards,
> 
> Laurent Pinchart
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  

Patch

diff --git a/drivers/media/video/isp/ispccdc.c b/drivers/media/video/isp/ispccdc.c
index bee2bbe..c3d1d7a 100644
--- a/drivers/media/video/isp/ispccdc.c
+++ b/drivers/media/video/isp/ispccdc.c
@@ -1071,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
@@ -1088,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) {