linux/include/media
Tomi Valkeinen 64d712aa31 media: subdev: Split v4l2_subdev_get_frame_desc_passthrough() into locked and unlocked
The recently added v4l2_subdev_get_frame_desc_passthrough() can be used
directly as an implementation for .get_frame_desc subdev op. However, in
some cases the drivers may want to add some customizations, while the
bulk of the work is still identical to what
v4l2_subdev_get_frame_desc_passthrough() does. Current locking scheme
makes this impossible to do properly.

Split v4l2_subdev_get_frame_desc_passthrough() into two functions:

__v4l2_subdev_get_frame_desc_passthrough(), which takes a locked subdev
state as a parameter, instead of locking and getting the active state
internally. Other than that, it does the same as
v4l2_subdev_get_frame_desc_passthrough() used to do.

v4l2_subdev_get_frame_desc_passthrough(), which locks the active state
and calls __v4l2_subdev_get_frame_desc_passthrough().

In other words, v4l2_subdev_get_frame_desc_passthrough() works as
before, but drivers can now alternatively add custom .get_frame_desc
code and call v4l2_subdev_get_frame_desc_passthrough().

An example use case is with DS90UB953 serializer: in normal use the
serializer passes through everything, but when test-pattern-generator
(TPG) is used, an internal TPG source is used. After this commit, the
UB953 get_frame_desc() can lock the state, look at the routing table to
see if we're in normal or TPG mode, then either call
__v4l2_subdev_get_frame_desc_passthrough() if in normal mode, or
construct a TPG frame desc if in TPG mode.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
[Sakari Ailus: Rebase on an earlier remote source pad error code fix.]
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-03-24 11:58:02 +01:00
..
cadence media: cadence: cdns-csi2rx: Support multiple pixels per clock cycle 2025-08-25 15:40:42 +02:00
davinci
drv-intf media: saa7146: Replace saa7146_ext_vv.vbi_fops with write function 2025-11-03 15:58:42 +01:00
i2c media: i2c: mt9v032: Drop support for platform data 2025-09-09 15:59:17 +02:00
tpg
cec-notifier.h
cec-pin.h
cec.h media: cec: include linux/debugfs.h and linux/seq_file.h where needed 2025-01-07 12:21:38 +01:00
demux.h
dmxdev.h
dvb-usb-ids.h
dvb_ca_en50221.h
dvb_demux.h
dvb_frontend.h
dvb_net.h
dvb_ringbuffer.h
dvb_vb2.h media: dvb-core: dvb_vb2: drop wait_prepare/finish callbacks 2025-12-18 11:14:57 +01:00
dvbdev.h
frame_vector.h
imx.h
ipu-bridge.h media: ipu-bridge: add mod_devicetable.h header inclusion 2024-06-04 08:31:22 +02:00
ipu6-pci-table.h media: ipu6: Add PCI device table header 2024-04-29 14:56:37 +02:00
jpeg.h
media-dev-allocator.h
media-device.h media: mc: add debugfs node to keep track of requests 2026-01-05 15:56:31 +01:00
media-devnode.h media: mc: add debugfs node to keep track of requests 2026-01-05 15:56:31 +01:00
media-entity.h media: mc: Make macros to obtain containers const-aware 2025-11-03 15:58:41 +01:00
media-request.h media: mc: add debugfs node to keep track of requests 2026-01-05 15:56:31 +01:00
mipi-csi2.h
rc-core.h media: lirc: increase IR_MAX_DURATION to send extended code sequences 2026-03-17 14:43:57 +01:00
rc-map.h media: rc: add keymap for Siemens Gigaset RC20 remote 2025-02-13 12:12:31 +01:00
rcar-fcp.h media: rcar-fcp: Add rcar_fcp_soft_reset() 2025-06-18 09:20:45 +02:00
tuner-types.h media: tuners: Constify struct tunertype, tuner_range and tuner_params 2025-02-21 10:33:15 +01:00
tuner.h media: tuner-simple: Add support for Tena TNF931D-DFDR1 2024-06-29 12:20:05 +02:00
tveeprom.h
v4l2-async.h
v4l2-cci.h
v4l2-common.h media: v4l: Add helper to get number of active lanes via a pad 2025-11-13 10:57:52 +01:00
v4l2-ctrls.h media: v4l2-ctrls: Set error v4l2_ctrl_new_fwnode_properties consistently 2026-01-14 23:33:02 +01:00
v4l2-dev.h media: v4l2-dev: Make macros to obtain containers const-aware 2025-11-03 15:58:41 +01:00
v4l2-device.h media: include: update Hans Verkuil's email address 2025-09-09 15:58:56 +02:00
v4l2-dv-timings.h media: v4l2-core: v4l2-dv-timings: support DRM IFs 2025-09-07 10:29:19 +02:00
v4l2-event.h
v4l2-fh.h media: Drop V4L2_FL_USES_V4L2_FH checks 2025-08-13 08:33:46 +02:00
v4l2-flash-led-class.h
v4l2-fwnode.h media: v4l2-fwnode: Return -EPROBE_DEFER on parsing NULL endpoints 2026-03-24 11:58:02 +01:00
v4l2-h264.h
v4l2-image-sizes.h
v4l2-ioctl.h docs: media: v4l2-ioctl.h: document two global variables 2025-12-22 14:43:25 -07:00
v4l2-isp.h media: v4l2-isp: Rename block_info to block_type_info 2025-11-14 15:48:49 +01:00
v4l2-jpeg.h media: v4l2-jpeg: Remove unused v4l2_jpeg_parse_* wrappers 2025-06-17 10:35:17 +02:00
v4l2-mc.h media: v4l2-mc: Mark v4l2_pipeline_link_notify() as deprecated 2024-08-23 17:49:09 +03:00
v4l2-mediabus.h media: v4l: Support obtaining link frequency via get_mbus_config 2025-02-15 15:22:53 +01:00
v4l2-mem2mem.h media: v4l2-mem2mem: Add a kref to the v4l2_m2m_dev structure 2026-01-05 15:56:31 +01:00
v4l2-rect.h
v4l2-subdev.h media: subdev: Split v4l2_subdev_get_frame_desc_passthrough() into locked and unlocked 2026-03-24 11:58:02 +01:00
v4l2-vp9.h
videobuf2-core.h media: vb2: drop wait_prepare/finish callbacks 2025-12-18 11:14:57 +01:00
videobuf2-dma-contig.h
videobuf2-dma-sg.h
videobuf2-dvb.h
videobuf2-memops.h
videobuf2-v4l2.h media: vb2: remove vb2_ops_wait_prepare/finish helpers 2025-12-18 11:14:57 +01:00
videobuf2-vmalloc.h
vsp1.h media: vsp1: Add VSPX support 2025-06-18 09:20:47 +02:00