[PATCH 00/16] Allow a running stream to survive suspend and resume in rkisp1

Daniel Scally dan.scally at ideasonboard.com
Mon Nov 2 23:40:36 PST 2026


Hello all

At the moment a stream that's running from the rkisp1 when the device
is suspended to RAM or disk is dead when the device is resumed. This
series is an attempt to make the stream survive that event so that if
it was running before the device is suspended, it will continue
running once it is resumed. 

To acheieve that this series:

1. Creates device links between the notifer and subdevices in v4l2
   async. This is to ensure that the Power Management .suspend() and
   .resume() operations happen in the right order. I think this is a
   universally applicable change so it's in core rather than the
   driver specific .bound() callbacks.
2. Updates the rkisp1 driver to cleanly stop stream across the pipe
   line on .suspend() and resume it (assuming it was running before
   the device was suspended) on .resume()
3. Updates the rkisp1 driver to store and re-apply the last of the
   params buffers on resume.

There's also a change to videobuf2 core without which I found it more
complicated to do the "was a stream running" check. There are also a
number of commits that do some tidying and preparatory work to make
the later commits cleaner.

Thanks
Dan

Signed-off-by: Daniel Scally <dan.scally at ideasonboard.com>
---
Daniel Scally (16):
      media: videobuf2: Set start_streaming_called after it's called
      media: v4l2-device: Add struct v4l2_device.flags
      media: v4l2-async: Add devlinks between notifier and async subdevices
      media: rkisp1: Drop an unnecessary variable
      media: rkisp1: Store the current params buffer
      media: rkisp1: Modernise the locking
      media: rkisp1: Power down after subdev initialisation
      media: rkisp1: Switch to calling .enable/disable_streams() in CSI subdev
      media: rkisp1: Switch to calling .enable/disable_streams() in ISP subdev
      media: rkisp1: Call .enable_streams() / .disable_streams()
      media: rkisp1: Switch resizer subdevice to .enable/disable_streams()
      media: rkisp1: Switch ISP subdevice to .enable/disable_streams()
      media: rkisp1: Control ISP streams from resizer ops
      media: rkisp1: Disable resizer stream before capture device
      media: rkisp1: Expose startup and shutdown functions
      media: rkisp1: Allow a live stream to suspend and resume

 drivers/media/common/videobuf2/videobuf2-core.c    |   5 +-
 .../platform/rockchip/rkisp1/rkisp1-capture.c      | 134 +++++++++------------
 .../media/platform/rockchip/rkisp1/rkisp1-common.h |  26 +++-
 .../media/platform/rockchip/rkisp1/rkisp1-csi.c    |  24 ++--
 .../media/platform/rockchip/rkisp1/rkisp1-dev.c    |  51 ++++++--
 .../media/platform/rockchip/rkisp1/rkisp1-isp.c    |  88 +++++++-------
 .../media/platform/rockchip/rkisp1/rkisp1-params.c | 111 +++++++++--------
 .../platform/rockchip/rkisp1/rkisp1-resizer.c      |  78 +++++++-----
 .../media/platform/rockchip/rkisp1/rkisp1-stats.c  |  33 +++--
 drivers/media/v4l2-core/v4l2-async.c               | 107 ++++++++++++++++
 include/media/v4l2-device.h                        |   7 ++
 11 files changed, 421 insertions(+), 243 deletions(-)
---
base-commit: 00178eda305a332f302882849ff7374d4169be8b
change-id: 20261028-rkisp1-suspend-and-resume-7d4f388a9a61

Best regards,
-- 
Daniel Scally <dan.scally at ideasonboard.com>




More information about the linux-arm-kernel mailing list