From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Dave Stevenson <dave.stevenson@raspberrypi.com>
Cc: linux-media@vger.kernel.org, Sakari Ailus <sakari.ailus@iki.fi>
Subject: Re: [PATCH 42/57] media: i2c: imx219: Drop system suspend and resume handlers
Date: Fri, 15 Sep 2023 14:35:09 +0300 [thread overview]
Message-ID: <20230915113509.GL14641@pendragon.ideasonboard.com> (raw)
In-Reply-To: <CAPY8ntBVEn7DtFu7Z0-nT4ObrH9Wz=uRKOhhkz=0di+1v3zZVA@mail.gmail.com>
Hi Dave,
On Fri, Sep 15, 2023 at 11:53:53AM +0100, Dave Stevenson wrote:
> On Thu, 14 Sept 2023 at 19:17, Laurent Pinchart wrote:
> >
> > Stopping streaming on a camera pipeline at system suspend time, and
> > restarting it at system resume time, requires coordinated action between
> > the bridge driver and the camera sensor driver. This is handled by the
> > bridge driver calling the sensor's .s_stream() handler at system suspend
> > and resume time. There is thus no need for the sensor to independently
> > implement system sleep PM operations. Drop them.
> >
> > The streaming field of the driver's private structure is now unused,
> > drop it as well.
> >
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
> Presumably this is superseding effectively the same patch in your
> other imx219 series [1]
> That's fine by me, just an observation.
Good catch :-) The two series indeed fix the same issue. I have included
the imx219 changes in this series for completeness, I'll drop it from
one of the two series depending on which of them gets merged first.
Sorry for forgetting to mention this in the cover letter.
> Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
>
> [1] https://patchwork.linuxtv.org/project/linux-media/patch/20230913135638.26277-16-laurent.pinchart@ideasonboard.com/
>
> > ---
> > drivers/media/i2c/imx219.c | 41 --------------------------------------
> > 1 file changed, 41 deletions(-)
> >
> > diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c
> > index 5715bbbc0820..a431dace0f33 100644
> > --- a/drivers/media/i2c/imx219.c
> > +++ b/drivers/media/i2c/imx219.c
> > @@ -479,9 +479,6 @@ struct imx219 {
> > /* Current mode */
> > const struct imx219_mode *mode;
> >
> > - /* Streaming on/off */
> > - bool streaming;
> > -
> > /* Two or Four lanes */
> > u8 lanes;
> > };
> > @@ -991,8 +988,6 @@ static int imx219_set_stream(struct v4l2_subdev *sd, int enable)
> > imx219_stop_streaming(imx219);
> > }
> >
> > - imx219->streaming = enable;
> > -
> > unlock:
> > v4l2_subdev_unlock_state(state);
> > return ret;
> > @@ -1044,41 +1039,6 @@ static int imx219_power_off(struct device *dev)
> > return 0;
> > }
> >
> > -static int __maybe_unused imx219_suspend(struct device *dev)
> > -{
> > - struct v4l2_subdev *sd = dev_get_drvdata(dev);
> > - struct imx219 *imx219 = to_imx219(sd);
> > -
> > - if (imx219->streaming)
> > - imx219_stop_streaming(imx219);
> > -
> > - return 0;
> > -}
> > -
> > -static int __maybe_unused imx219_resume(struct device *dev)
> > -{
> > - struct v4l2_subdev *sd = dev_get_drvdata(dev);
> > - struct imx219 *imx219 = to_imx219(sd);
> > - struct v4l2_subdev_state *state;
> > - int ret;
> > -
> > - if (imx219->streaming) {
> > - state = v4l2_subdev_lock_and_get_active_state(sd);
> > - ret = imx219_start_streaming(imx219, state);
> > - v4l2_subdev_unlock_state(state);
> > - if (ret)
> > - goto error;
> > - }
> > -
> > - return 0;
> > -
> > -error:
> > - imx219_stop_streaming(imx219);
> > - imx219->streaming = false;
> > -
> > - return ret;
> > -}
> > -
> > static int imx219_get_regulators(struct imx219 *imx219)
> > {
> > struct i2c_client *client = v4l2_get_subdevdata(&imx219->sd);
> > @@ -1464,7 +1424,6 @@ static const struct of_device_id imx219_dt_ids[] = {
> > MODULE_DEVICE_TABLE(of, imx219_dt_ids);
> >
> > static const struct dev_pm_ops imx219_pm_ops = {
> > - SET_SYSTEM_SLEEP_PM_OPS(imx219_suspend, imx219_resume)
> > SET_RUNTIME_PM_OPS(imx219_power_off, imx219_power_on, NULL)
> > };
> >
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2023-09-15 11:35 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-14 18:16 [PATCH 00/57] media: i2c: Reduce cargo cult Laurent Pinchart
2023-09-14 18:16 ` [PATCH 01/57] media: v4l2-subdev: Document .s_stream() operation requirements Laurent Pinchart
2023-09-18 7:49 ` Ricardo Ribalda Delgado
2023-09-18 8:08 ` Laurent Pinchart
2023-09-14 18:16 ` [PATCH 02/57] media: i2c: hi556: Drop check for reentrant .s_stream() Laurent Pinchart
2023-09-14 18:16 ` [PATCH 03/57] media: i2c: hi846: " Laurent Pinchart
2023-09-26 7:18 ` Martin Kepplinger
2023-09-14 18:16 ` [PATCH 04/57] media: i2c: imx208: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 05/57] media: i2c: imx214: " Laurent Pinchart
2023-09-18 7:52 ` Ricardo Ribalda Delgado
2023-09-18 8:07 ` Laurent Pinchart
2023-09-14 18:16 ` [PATCH 06/57] media: i2c: imx219: " Laurent Pinchart
2023-09-15 10:49 ` Dave Stevenson
2023-09-14 18:16 ` [PATCH 07/57] media: i2c: imx258: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 08/57] media: i2c: imx319: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 09/57] media: i2c: imx334: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 10/57] media: i2c: imx335: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 11/57] media: i2c: imx355: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 12/57] media: i2c: imx412: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 13/57] media: i2c: mt9m001: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 14/57] media: i2c: og01a1b: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 15/57] media: i2c: ov01a10: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 16/57] media: i2c: ov08d10: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 17/57] media: i2c: ov08x40: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 18/57] media: i2c: ov13858: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 19/57] media: i2c: ov13b10: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 20/57] media: i2c: ov2685: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 21/57] media: i2c: ov2740: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 22/57] media: i2c: ov4689: " Laurent Pinchart
2023-09-15 19:26 ` Mikhail Rudenko
2023-09-18 6:55 ` Sakari Ailus
2023-09-14 18:16 ` [PATCH 23/57] media: i2c: ov5647: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 24/57] media: i2c: ov5670: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 25/57] media: i2c: ov5675: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 26/57] media: i2c: ov5695: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 27/57] media: i2c: ov7740: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 28/57] media: i2c: ov8856: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 29/57] media: i2c: ov9282: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 30/57] media: i2c: ov9734: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 31/57] Documentation: media: camera-sensor: Fix typo and vocabulary selection Laurent Pinchart
2023-09-14 18:16 ` [PATCH 32/57] Documentation: media: camera-sensor: Use link to upstream DT bindings Laurent Pinchart
2023-09-14 18:16 ` [PATCH 33/57] Documentation: media: camera-sensor: Move power management section Laurent Pinchart
2023-09-14 18:16 ` [PATCH 34/57] Documentation: media: camera-sensor: Improve power management documentation Laurent Pinchart
2023-09-14 18:16 ` [PATCH 35/57] media: i2c: ar0521: Drop system suspend and resume handlers Laurent Pinchart
2023-09-15 4:23 ` Krzysztof Hałasa
2023-09-14 18:16 ` [PATCH 36/57] media: i2c: ccs: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 37/57] media: i2c: hi556: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 38/57] media: i2c: hi846: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 39/57] media: i2c: hi847: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 40/57] media: i2c: imx208: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 41/57] media: i2c: imx214: " Laurent Pinchart
2023-09-18 7:53 ` Ricardo Ribalda Delgado
2023-09-14 18:16 ` [PATCH 42/57] media: i2c: imx219: " Laurent Pinchart
2023-09-15 10:53 ` Dave Stevenson
2023-09-15 11:35 ` Laurent Pinchart [this message]
2023-09-14 18:16 ` [PATCH 43/57] media: i2c: imx258: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 44/57] media: i2c: imx319: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 45/57] media: i2c: imx355: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 46/57] media: i2c: og01a1b: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 47/57] media: i2c: ov01a10: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 48/57] media: i2c: ov02a10: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 49/57] media: i2c: ov08d10: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 50/57] media: i2c: ov08x40: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 51/57] media: i2c: ov13858: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 52/57] media: i2c: ov2740: " Laurent Pinchart
2023-09-14 18:17 ` [PATCH 53/57] media: i2c: ov13b10: Drop stream handling in runtime PM handlers Laurent Pinchart
2023-09-14 18:17 ` [PATCH 54/57] media: i2c: ov5670: Drop system suspend and resume handlers Laurent Pinchart
2023-09-14 18:17 ` [PATCH 55/57] media: i2c: ov5675: " Laurent Pinchart
2023-09-14 18:17 ` [PATCH 56/57] media: i2c: ov8856: " Laurent Pinchart
2023-09-14 18:17 ` [PATCH 57/57] media: i2c: ov9734: " Laurent Pinchart
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=20230915113509.GL14641@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=dave.stevenson@raspberrypi.com \
--cc=linux-media@vger.kernel.org \
--cc=sakari.ailus@iki.fi \
/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.