From: Sakari Ailus <sakari.ailus@iki.fi>
To: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Sowjanya Komatineni <skomatineni@nvidia.com>,
thierry.reding@gmail.com, jonathanh@nvidia.com,
hverkuil@xs4all.nl, jacopo+renesas@jmondi.org,
leonl@leopardimaging.com, robh+dt@kernel.org,
lgirdwood@gmail.com, broonie@kernel.org,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 2/3] media: i2c: imx274: Remove stop stream i2c writes during remove
Date: Thu, 24 Sep 2020 20:24:45 +0300 [thread overview]
Message-ID: <20200924172445.GJ8644@valkosipuli.retiisi.org.uk> (raw)
In-Reply-To: <b243afda-b00f-4c0e-2eea-cc5d03cbebe7@lucaceresoli.net>
On Thu, Sep 24, 2020 at 12:09:22PM +0200, Luca Ceresoli wrote:
> On 22/09/20 10:47, Sakari Ailus wrote:
> > Hi Luca,
> >
> > On Tue, Sep 22, 2020 at 10:09:33AM +0200, Luca Ceresoli wrote:
> >> Hi,
> >>
> >> On 21/09/20 23:39, Sowjanya Komatineni wrote:
> >>> Sensor should already be in standby during remove and there is no
> >>> need to configure sensor registers for stream stop.
> >>
> >> I beg your pardon for the newbie question: does the V4L2 framework
> >> guarantee that the stream is stopped (.s_stream(..., 0)) before removing
> >> the driver?
> >
> > It doesn't. That's however one of the lesser concerns, and I don't think
> > it'd help if drivers tried to prepare for that.
>
> Thanks for the clarification.
>
> I've been working with hardware where the sensor is always powered. In
> this case, and with this patch applied, the sensor would keep producing
> frames after driver removal. This looks wrong, unless I'm overlooking
> something.
>
> BTW at first sight it looks like the framework should take care of
> stopping the stream before removal, not the individual drivers, but
> maybe there are good reasons this is not done?
Yes, it should.
This is a complex problem area to address. The framework (V4L2) wasn't
originally built with object refcounting when support was added for complex
cameras that comprise multiple devices because it wasn't thought it would
be really needed. And it's hard to add that later on.
Either way, there's little individual drivers can do to address that; the
framework support needs to be there first.
The same goes with Media controller; it's not just V4L2.
--
Sakari Ailus
next prev parent reply other threads:[~2020-09-24 17:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-21 21:39 [PATCH v6 0/3] IMX274 fixes and power on and off implementation Sowjanya Komatineni
2020-09-21 21:39 ` [PATCH v6 1/3] media: i2c: imx274: Fix Y_OUT_SIZE register setting Sowjanya Komatineni
2020-09-22 7:55 ` Thierry Reding
2020-09-21 21:39 ` [PATCH v6 2/3] media: i2c: imx274: Remove stop stream i2c writes during remove Sowjanya Komatineni
2020-09-22 7:55 ` Thierry Reding
2020-09-22 8:09 ` Luca Ceresoli
2020-09-22 8:47 ` Sakari Ailus
2020-09-24 10:09 ` Luca Ceresoli
2020-09-24 17:24 ` Sakari Ailus [this message]
2020-09-21 21:39 ` [PATCH v6 3/3] media: i2c: imx274: Add IMX274 power on and off sequence Sowjanya Komatineni
2020-09-22 7:55 ` Thierry Reding
2020-09-22 10:57 ` Jacopo Mondi
2020-09-22 16:13 ` Sowjanya Komatineni
2020-09-22 16:20 ` Sakari Ailus
2020-09-23 8:07 ` Thierry Reding
2020-09-23 8:30 ` Sakari Ailus
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=20200924172445.GJ8644@valkosipuli.retiisi.org.uk \
--to=sakari.ailus@iki.fi \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=hverkuil@xs4all.nl \
--cc=jacopo+renesas@jmondi.org \
--cc=jonathanh@nvidia.com \
--cc=leonl@leopardimaging.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=luca@lucaceresoli.net \
--cc=robh+dt@kernel.org \
--cc=skomatineni@nvidia.com \
--cc=thierry.reding@gmail.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
all inboxes | Powered by JetHome®