diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2011-08-31 15:53:41 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-08-11 21:02:01 +0200 |
commit | 73ea57eb5442aece696a7a03e2cd4509d38e55fd (patch) | |
tree | 04d48cc7bf37d6e3ca617820d3ed1a10c74c54e8 /drivers/media/video/omap3isp/ispccdc.c | |
parent | [media] omap3isp: ccdc: Remove support for interlaced data and master HS/VS mode (diff) | |
download | linux-73ea57eb5442aece696a7a03e2cd4509d38e55fd.tar.xz linux-73ea57eb5442aece696a7a03e2cd4509d38e55fd.zip |
[media] omap3isp: ccdc: Remove ispccdc_syncif structure
The structure is only used to store configuration data and pass it to
CCDC configuration functions. Access the data directly from the
locations that need it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/omap3isp/ispccdc.c')
-rw-r--r-- | drivers/media/video/omap3isp/ispccdc.c | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/drivers/media/video/omap3isp/ispccdc.c b/drivers/media/video/omap3isp/ispccdc.c index 8dbb55a92fcf..c58b0c68ce36 100644 --- a/drivers/media/video/omap3isp/ispccdc.c +++ b/drivers/media/video/omap3isp/ispccdc.c @@ -627,9 +627,12 @@ static void ccdc_configure_lpf(struct isp_ccdc_device *ccdc) static void ccdc_configure_alaw(struct isp_ccdc_device *ccdc) { struct isp_device *isp = to_isp_device(ccdc); + const struct isp_format_info *info; u32 alaw = 0; - switch (ccdc->syncif.datsz) { + info = omap3isp_video_format_info(ccdc->formats[CCDC_PAD_SINK].code); + + switch (info->width) { case 8: return; @@ -813,6 +816,7 @@ static void ccdc_config_vp(struct isp_ccdc_device *ccdc) { struct isp_pipeline *pipe = to_isp_pipeline(&ccdc->subdev.entity); struct isp_device *isp = to_isp_device(ccdc); + const struct isp_format_info *info; unsigned long l3_ick = pipe->l3_ick; unsigned int max_div = isp->revision == ISP_REVISION_15_0 ? 64 : 8; unsigned int div = 0; @@ -821,7 +825,9 @@ static void ccdc_config_vp(struct isp_ccdc_device *ccdc) fmtcfg_vp = isp_reg_readl(isp, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FMTCFG) & ~(ISPCCDC_FMTCFG_VPIN_MASK | ISPCCDC_FMTCFG_VPIF_FRQ_MASK); - switch (ccdc->syncif.datsz) { + info = omap3isp_video_format_info(ccdc->formats[CCDC_PAD_SINK].code); + + switch (info->width) { case 8: case 10: fmtcfg_vp |= ISPCCDC_FMTCFG_VPIN_9_0; @@ -959,17 +965,17 @@ void omap3isp_ccdc_max_rate(struct isp_ccdc_device *ccdc, /* * ccdc_config_sync_if - Set CCDC sync interface configuration * @ccdc: Pointer to ISP CCDC device. - * @syncif: Structure containing the sync parameters like field state, CCDC in - * master/slave mode, raw/yuv data, polarity of data, field, hs, vs - * signals. + * @pdata: Parallel interface platform data (may be NULL) + * @data_size: Data size */ static void ccdc_config_sync_if(struct isp_ccdc_device *ccdc, - struct ispccdc_syncif *syncif) + struct isp_parallel_platform_data *pdata, + unsigned int data_size) { struct isp_device *isp = to_isp_device(ccdc); u32 syn_mode = ISPCCDC_SYN_MODE_VDHDEN; - switch (syncif->datsz) { + switch (data_size) { case 8: syn_mode |= ISPCCDC_SYN_MODE_DATSIZ_8; break; @@ -984,20 +990,16 @@ static void ccdc_config_sync_if(struct isp_ccdc_device *ccdc, break; } - if (syncif->datapol) + if (pdata && pdata->data_pol) syn_mode |= ISPCCDC_SYN_MODE_DATAPOL; - if (syncif->hdpol) + if (pdata && pdata->hs_pol) syn_mode |= ISPCCDC_SYN_MODE_HDPOL; - if (syncif->vdpol) + if (pdata && pdata->vs_pol) syn_mode |= ISPCCDC_SYN_MODE_VDPOL; isp_reg_writel(isp, syn_mode, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SYN_MODE); - - if (!syncif->bt_r656_en) - isp_reg_clr(isp, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_REC656IF, - ISPCCDC_REC656IF_R656ON); } /* CCDC formats descriptions */ @@ -1111,11 +1113,7 @@ static void ccdc_configure(struct isp_ccdc_device *ccdc) shift = depth_in - depth_out; omap3isp_configure_bridge(isp, ccdc->input, pdata, shift); - ccdc->syncif.datsz = depth_out; - ccdc->syncif.datapol = 0; - ccdc->syncif.hdpol = pdata ? pdata->hs_pol : 0; - ccdc->syncif.vdpol = pdata ? pdata->vs_pol : 0; - ccdc_config_sync_if(ccdc, &ccdc->syncif); + ccdc_config_sync_if(ccdc, pdata, depth_out); /* CCDC_PAD_SINK */ format = &ccdc->formats[CCDC_PAD_SINK]; @@ -2446,8 +2444,6 @@ int omap3isp_ccdc_init(struct isp_device *isp) INIT_LIST_HEAD(&ccdc->lsc.free_queue); spin_lock_init(&ccdc->lsc.req_lock); - ccdc->syncif.datsz = 0; - ccdc->clamp.oblen = 0; ccdc->clamp.dcsubval = 0; |