[PATCH 0/9] media: vb2: prepare for vb2_ops_wait_prepare/finish removal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch series sits on top of:
https://patchwork.linuxtv.org/project/linux-media/list/?series=13513

This series makes it possible for drivers to drop the wait_prepare/finish
callbacks if the queue lock pointer is set.

Analyzing the code shows that in a few places the lock is set after the
call to vb2_queue_init, so the first 7 patches move that lock assignment
up.

Then two additional WARN_ONs are added to vb2_queue_init to ensure that
either q->lock is set, or wait_prepare/finish are set.

The last patch will just unlock/lock the queue lock if wait_prepare/finish
isn't set.

Once this is in, we can start dropping the wait_prepare/finish ops in
almost all drivers.

Regards,

	Hans

Hans Verkuil (9):
  media: staging: atomisp: set lock before calling vb2_queue_init()
  media: pwc: set lock before calling vb2_queue_init()
  media: msi2500: set lock before calling vb2_queue_init()
  media: hackrf: set lock before calling vb2_queue_init()
  media: airspy: set lock before calling vb2_queue_init()
  media: rcar_drif.c: set lock before calling vb2_queue_init()
  media: video-i2c: set lock before calling vb2_queue_init()
  media: vb2: vb2_core_queue_init(): sanity check lock and
    wait_prepare/finish
  media: vb2: use lock if wait_prepare/finish are NULL

 .../media/common/videobuf2/videobuf2-core.c   | 21 ++++++++++++++++---
 drivers/media/i2c/video-i2c.c                 |  2 +-
 drivers/media/platform/renesas/rcar_drif.c    |  2 +-
 drivers/media/usb/airspy/airspy.c             |  2 +-
 drivers/media/usb/hackrf/hackrf.c             |  4 ++--
 drivers/media/usb/msi2500/msi2500.c           |  2 +-
 drivers/media/usb/pwc/pwc-if.c                |  2 +-
 .../media/atomisp/pci/atomisp_subdev.c        |  2 +-
 8 files changed, 26 insertions(+), 11 deletions(-)

-- 
2.34.1





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux