mbox series

[0/8] cx18: convert to vb2

Message ID 20230201161153.883376-1-hverkuil-cisco@xs4all.nl (mailing list archive)
Headers show
Series cx18: convert to vb2 | expand

Message

Hans Verkuil Feb. 1, 2023, 4:11 p.m. UTC
This series converts cx18 to use the vb2 instead of the videobuf
framework. It also fixes a number of issues reported by v4l2-compliance.

This driver is unusual because it creates two video nodes: one is for
MPEG only, the other is for raw video. The first only supports read(),
the second supports both streaming and read.

Converting cx18 to vb2 uncovered two corner cases in the v4l2 core that
were not handled quite right: one in vb2_read where the owner of the
queue was set too late (that caused problems in cx18 that expects it
to be set when start_streaming is called), and the other was in v4l2-dev.c
where the streaming ioctls were enable when they shouldn't. Rather than
trying a heuristic based on the device node type, just check CAP_STREAMING.

As vb2 conversions go, this one wasn't too bad.

Regards,

	Hans

Hans Verkuil (8):
  vb2: set owner before calling vb2_read
  v4l2-dev.c: check for V4L2_CAP_STREAMING to enable streaming ioctls
  cx18: convert to vb2
  cx18: fix incorrect input counting
  cx18: properly report pixelformats
  cx18: missing CAP_AUDIO for vbi stream
  cx18: reorder fmt_vid_cap functions in cx18-ioctl.c
  cx18: fix format compliance issues

 .../media/common/videobuf2/videobuf2-v4l2.c   |   5 +-
 drivers/media/pci/cx18/Kconfig                |   2 +-
 drivers/media/pci/cx18/cx18-driver.c          |   4 +-
 drivers/media/pci/cx18/cx18-driver.h          |  25 +-
 drivers/media/pci/cx18/cx18-fileops.c         |  85 +---
 drivers/media/pci/cx18/cx18-fileops.h         |   3 +-
 drivers/media/pci/cx18/cx18-ioctl.c           | 387 +++++++-----------
 drivers/media/pci/cx18/cx18-mailbox.c         |  27 +-
 drivers/media/pci/cx18/cx18-streams.c         | 275 +++++++------
 drivers/media/v4l2-core/v4l2-dev.c            |   5 +-
 10 files changed, 351 insertions(+), 467 deletions(-)