From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Hugues Fruchet <hugues.fruchet@foss.st.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans Verkuil <hverkuil@xs4all.nl>,
Rob Herring <robh+dt@kernel.org>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
Philippe CORNU <philippe.cornu@foss.st.com>,
Dan Scally <dan.scally@ideasonboard.com>
Subject: Re: [PATCH v1 3/5] media: stm32-dcmipp: STM32 DCMIPP camera interface driver
Date: Thu, 24 Aug 2023 16:04:32 +0300 [thread overview]
Message-ID: <20230824130432.GB27092@pendragon.ideasonboard.com> (raw)
In-Reply-To: <ZOdMghQXfNgKZ6cN@kekkonen.localdomain>
On Thu, Aug 24, 2023 at 12:26:42PM +0000, Sakari Ailus wrote:
> On Thu, Aug 24, 2023 at 01:09:34PM +0200, Alain Volmat wrote:
> > Hi Sakari,
> >
> > thanks a lot for the review. I've already taken care of the comments I got
> > from Dan and will also add fixes for your comments as well before
> > pushing the v2. Before going into that I thought I'd better clarify the
> > framerate part which seems the most tricky part.
> >
> > On Mon, Aug 07, 2023 at 09:29:55AM +0000, Sakari Ailus wrote:
>
> ...
>
> > > > +static int dcmipp_byteproc_g_frame_interval(struct v4l2_subdev *sd,
> > > > + struct v4l2_subdev_frame_interval *fi)
> > > > +{
> > > > + struct dcmipp_byteproc_device *byteproc = v4l2_get_subdevdata(sd);
> > > > +
> > > > + if (IS_SINK(fi->pad))
> > > > + fi->interval = byteproc->sink_interval;
> > > > + else
> > > > + fi->interval = byteproc->src_interval;
> > > > +
> > > > + return 0;
> > > > +}
> > > > +
> > > > +static int dcmipp_byteproc_s_frame_interval(struct v4l2_subdev *sd,
> > > > + struct v4l2_subdev_frame_interval *fi)
> > > > +{
> > > > + struct dcmipp_byteproc_device *byteproc = v4l2_get_subdevdata(sd);
> > > > +
> > > > + mutex_lock(&byteproc->lock);
> > > > +
> > > > + if (byteproc->streaming) {
> > > > + mutex_unlock(&byteproc->lock);
> > > > + return -EBUSY;
> > > > + }
> > > > +
> > > > + if (fi->interval.numerator == 0 || fi->interval.denominator == 0)
> > > > + fi->interval = byteproc->sink_interval;
> > > > +
> > > > + if (IS_SINK(fi->pad)) {
> > > > + /*
> > > > + * Setting sink frame interval resets frame skipping.
> > > > + * Sink frame interval is propagated to src.
> > > > + */
> > > > + byteproc->frate = 0;
> > > > + byteproc->sink_interval = fi->interval;
> > > > + byteproc->src_interval = byteproc->sink_interval;
> > >
> > > Is this used for anything else than configure skipping?
> > >
> > > I think I'd just have a control for it in that case.
> > >
> > > I don't think exposing frame interval configuration is necessarily even
> > > meaningful for a device that just processes data but does not produce it.
> >
> > The DCMIPP is able to perform frame drop, 1/2, 1/4, 1/8 basically.
> > As Dan pointed me out, indeed setting frame interval as we did on both
> > sink and source pad isn't a defined behavior. I first thought that
> > using the frame interval was the proper way to do that but that is
> > indeed only used on producers such as sensors ....
> > Which ctrl would you propose in such case ?
>
> We don't have one, AFAIK, and I think it may be unlikely this will be
> needed elsewhere. So I'd use a private control.
>
> I wonder what others think. Cc Laurent as well.
What are the use cases for this feature ?
--
Regards,
Laurent Pinchart
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-08-24 13:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-10 14:40 [PATCH v1 0/5] [PATCH 0/5] Add support for DCMIPP camera interface of STMicroelectronics STM32 SoC series Hugues Fruchet
2022-09-10 14:40 ` [PATCH v1 1/5] dt-bindings: media: add bindings for dcmipp driver Hugues Fruchet
2022-09-12 0:44 ` Rob Herring
2022-09-10 14:40 ` [PATCH v1 2/5] media: MAINTAINERS: add entry for STM32 DCMIPP driver Hugues Fruchet
2022-09-10 14:40 ` [PATCH v1 3/5] media: stm32-dcmipp: STM32 DCMIPP camera interface driver Hugues Fruchet
[not found] ` <ZNC5k3PynnEWL/ou@kekkonen.localdomain>
[not found] ` <20230824110934.GA18226@gnbcxd0016.gnb.st.com>
2023-08-24 12:26 ` Sakari Ailus
2023-08-24 13:04 ` Laurent Pinchart [this message]
2023-08-24 16:05 ` [Linux-stm32] " Alain Volmat
2023-08-29 8:26 ` Laurent Pinchart
2023-08-29 14:17 ` Alain Volmat
[not found] ` <20230825110903.GA30381@gnbcxd0016.gnb.st.com>
2023-08-30 8:20 ` Sakari Ailus
2023-09-01 12:05 ` [Linux-stm32] " Alain Volmat
2022-09-10 14:40 ` [PATCH v1 4/5] ARM: dts: stm32: add dcmipp support to stm32mp135 Hugues Fruchet
2022-09-10 14:40 ` [PATCH v1 5/5] ARM: multi_v7_defconfig: enable STM32 DCMIPP media support Hugues Fruchet
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=20230824130432.GB27092@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=alexandre.torgue@foss.st.com \
--cc=dan.scally@ideasonboard.com \
--cc=devicetree@vger.kernel.org \
--cc=hugues.fruchet@foss.st.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mchehab@kernel.org \
--cc=philippe.cornu@foss.st.com \
--cc=robh+dt@kernel.org \
--cc=sakari.ailus@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox