[PATCH v8 00/10] v4l: subdev active state

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

 



Hi,

v8 of the active state series. The v7 can be found from:

https://lore.kernel.org/all/20220407081424.295870-1-tomi.valkeinen@xxxxxxxxxxxxxxxx/

This version fixes the issues when compiling without
CONFIG_MEDIA_CONTROLLER or CONFIG_VIDEO_V4L2_SUBDEV_API.

I've added two small patches in front, which I made while trying to
understand how those two config options are used.

The new state wrappers are now only compiled with
CONFIG_MEDIA_CONTROLLER, and v4l2_subdev_get_fmt() is available only
with CONFIG_VIDEO_V4L2_SUBDEV_API.

To be honest, I'm not quite sure how the active state series and the
streams series should be designed wrt. CONFIG_MEDIA_CONTROLLER and
CONFIG_VIDEO_V4L2_SUBDEV_API, but I think it's probably best to only
allow active state and streams with CONFIG_VIDEO_V4L2_SUBDEV_API.

In theory we could allow active state without
CONFIG_VIDEO_V4L2_SUBDEV_API, but as try state is not available without
CONFIG_VIDEO_V4L2_SUBDEV_API, I fear it would lead to complications.

Also, I would personally just merge CONFIG_MEDIA_CONTROLLER and
CONFIG_VIDEO_V4L2_SUBDEV_API, but perhaps there's a need for the two
config options, in which case I'd just always use
CONFIG_VIDEO_V4L2_SUBDEV_API on v4l2 side.

 Tomi

Tomi Valkeinen (10):
  media: v4l2-subdev: fix #endif comments
  media: v4l2-subdev: drop extra #ifdef
  media: subdev: rename subdev-state alloc & free
  media: subdev: add active state to struct v4l2_subdev
  media: subdev: rename v4l2_subdev_get_pad_* helpers
  media: subdev: pass also the active state to subdevs from ioctls
  media: subdev: add subdev state locking
  media: subdev: add locking wrappers to subdev op wrappers
  media: subdev: add v4l2_subdev_get_fmt() helper function
  media: Documentation: add documentation about subdev state

 .../driver-api/media/v4l2-subdev.rst          |  69 +++++
 .../platform/renesas/rcar-vin/rcar-v4l2.c     |   9 +-
 .../media/platform/renesas/vsp1/vsp1_entity.c |  10 +-
 drivers/media/v4l2-core/v4l2-subdev.c         | 214 ++++++++++++---
 drivers/staging/media/tegra-video/vi.c        |  10 +-
 include/media/v4l2-subdev.h                   | 243 +++++++++++++++++-
 6 files changed, 507 insertions(+), 48 deletions(-)

-- 
2.25.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