From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
William Swanson <swansontec@gmail.com>
Cc: "linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
William Swanson <william.swanson@fuel7.com>
Subject: Re: [PATCH] omap3isp: Add support for interlaced input data
Date: Thu, 27 Dec 2012 18:27:09 -0200 [thread overview]
Message-ID: <20121227182709.5e89a61a@redhat.com> (raw)
In-Reply-To: <1447136.vJuIcl6Gth@avalon>
Em Tue, 25 Dec 2012 22:05:48 +0100
Laurent Pinchart <laurent.pinchart@ideasonboard.com> escreveu:
> Hi William,
>
> Thanks for the patch.
Btw, you missed to add a Signed-off-by: line on it.
>
> On Monday 17 December 2012 18:12:19 William Swanson wrote:
> > If the remote video sensor reports an interlaced video mode, the CCDC block
> > should configure itself appropriately.
>
> What will the CCDC do in that case ? Will it capture fields or frames to
> memory ? If frames, what's the field layout ? You will most likely need to
> modify ispvideo.c as well, to support interlacing in the V4L2 API, and
> possibly add interlaced formats support to the media bus API.
>
> > ---
> > drivers/media/platform/omap3isp/ispccdc.c | 16 ++++++++++++++--
> > include/media/omap3isp.h | 3 +++
> > 2 files changed, 17 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/media/platform/omap3isp/ispccdc.c
> > b/drivers/media/platform/omap3isp/ispccdc.c index 60e60aa..5443ef4 100644
> > --- a/drivers/media/platform/omap3isp/ispccdc.c
> > +++ b/drivers/media/platform/omap3isp/ispccdc.c
> > @@ -970,10 +970,11 @@ void omap3isp_ccdc_max_rate(struct isp_ccdc_device
> > *ccdc, * @ccdc: Pointer to ISP CCDC device.
> > * @pdata: Parallel interface platform data (may be NULL)
> > * @data_size: Data size
> > + * @interlaced: Use interlaced mode instead of progressive mode
> > */
> > static void ccdc_config_sync_if(struct isp_ccdc_device *ccdc,
> > struct isp_parallel_platform_data *pdata,
> > - unsigned int data_size)
> > + unsigned int data_size, bool interlaced)
> > {
> > struct isp_device *isp = to_isp_device(ccdc);
> > const struct v4l2_mbus_framefmt *format;
> > @@ -1004,9 +1005,15 @@ static void ccdc_config_sync_if(struct
> > isp_ccdc_device *ccdc, break;
> > }
> >
> > + if (interlaced)
> > + syn_mode |= ISPCCDC_SYN_MODE_FLDMODE;
> > +
> > if (pdata && pdata->data_pol)
> > syn_mode |= ISPCCDC_SYN_MODE_DATAPOL;
> >
> > + if (pdata && pdata->fld_pol)
> > + syn_mode |= ISPCCDC_SYN_MODE_FLDPOL;
> > +
> > if (pdata && pdata->hs_pol)
> > syn_mode |= ISPCCDC_SYN_MODE_HDPOL;
> >
> > @@ -1111,6 +1118,7 @@ static void ccdc_configure(struct isp_ccdc_device
> > *ccdc) const struct v4l2_rect *crop;
> > const struct isp_format_info *fmt_info;
> > struct v4l2_subdev_format fmt_src;
> > + bool src_interlaced = false;
> > unsigned int depth_out;
> > unsigned int depth_in = 0;
> > struct media_pad *pad;
> > @@ -1132,6 +1140,10 @@ static void ccdc_configure(struct isp_ccdc_device
> > *ccdc) fmt_src.pad = pad->index;
> > fmt_src.which = V4L2_SUBDEV_FORMAT_ACTIVE;
> > if (!v4l2_subdev_call(sensor, pad, get_fmt, NULL, &fmt_src)) {
> > + if (fmt_src.format.field == V4L2_FIELD_INTERLACED ||
> > + fmt_src.format.field == V4L2_FIELD_INTERLACED_TB ||
> > + fmt_src.format.field == V4L2_FIELD_INTERLACED_BT)
> > + src_interlaced = true;
> > fmt_info = omap3isp_video_format_info(fmt_src.format.code);
> > depth_in = fmt_info->width;
> > }
> > @@ -1150,7 +1162,7 @@ static void ccdc_configure(struct isp_ccdc_device
> > *ccdc)
> >
> > omap3isp_configure_bridge(isp, ccdc->input, pdata, shift, bridge);
> >
> > - ccdc_config_sync_if(ccdc, pdata, depth_out);
> > + ccdc_config_sync_if(ccdc, pdata, depth_out, src_interlaced);
> >
> > syn_mode = isp_reg_readl(isp, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SYN_MODE);
> >
> > diff --git a/include/media/omap3isp.h b/include/media/omap3isp.h
> > index 9584269..32d85c2 100644
> > --- a/include/media/omap3isp.h
> > +++ b/include/media/omap3isp.h
> > @@ -57,6 +57,8 @@ enum {
> > * ISP_LANE_SHIFT_6 - CAMEXT[13:6] -> CAM[7:0]
> > * @clk_pol: Pixel clock polarity
> > * 0 - Sample on rising edge, 1 - Sample on falling edge
> > + * @fld_pol: Field identification signal polarity
> > + * 0 - Active high, 1 - Active low
> > * @hs_pol: Horizontal synchronization polarity
> > * 0 - Active high, 1 - Active low
> > * @vs_pol: Vertical synchronization polarity
> > @@ -67,6 +69,7 @@ enum {
> > struct isp_parallel_platform_data {
> > unsigned int data_lane_shift:2;
> > unsigned int clk_pol:1;
> > + unsigned int fld_pol:1;
> > unsigned int hs_pol:1;
> > unsigned int vs_pol:1;
> > unsigned int data_pol:1;
--
Cheers,
Mauro
next prev parent reply other threads:[~2012-12-27 20:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-18 2:12 [PATCH] omap3isp: Add support for interlaced input data William Swanson
2012-12-25 21:05 ` Laurent Pinchart
2012-12-27 20:27 ` Mauro Carvalho Chehab [this message]
2013-01-04 19:52 ` William Swanson
2013-01-07 12:20 ` Laurent Pinchart
2013-01-08 22:49 ` William Swanson
2013-01-09 22:35 ` Laurent Pinchart
2013-01-14 22:21 ` William Swanson
2013-01-14 22:23 ` William Swanson
2013-01-21 10:06 ` Laurent Pinchart
-- strict thread matches above, loose matches on Subject: below --
2013-01-05 0:09 William Swanson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121227182709.5e89a61a@redhat.com \
--to=mchehab@redhat.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=swansontec@gmail.com \
--cc=william.swanson@fuel7.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.