mirror of https://github.com/torvalds/linux.git
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> |
||
|---|---|---|
| .. | ||
| cadence | ||
| davinci | ||
| drv-intf | ||
| i2c | ||
| tpg | ||
| cec-notifier.h | ||
| cec-pin.h | ||
| cec.h | ||
| 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 | ||
| dvbdev.h | ||
| frame_vector.h | ||
| imx.h | ||
| ipu-bridge.h | ||
| ipu6-pci-table.h | ||
| jpeg.h | ||
| media-dev-allocator.h | ||
| media-device.h | ||
| media-devnode.h | ||
| media-entity.h | ||
| media-request.h | ||
| mipi-csi2.h | ||
| rc-core.h | ||
| rc-map.h | ||
| rcar-fcp.h | ||
| tuner-types.h | ||
| tuner.h | ||
| tveeprom.h | ||
| v4l2-async.h | ||
| v4l2-cci.h | ||
| v4l2-common.h | ||
| v4l2-ctrls.h | ||
| v4l2-dev.h | ||
| v4l2-device.h | ||
| v4l2-dv-timings.h | ||
| v4l2-event.h | ||
| v4l2-fh.h | ||
| v4l2-flash-led-class.h | ||
| v4l2-fwnode.h | ||
| v4l2-h264.h | ||
| v4l2-image-sizes.h | ||
| v4l2-ioctl.h | ||
| v4l2-isp.h | ||
| v4l2-jpeg.h | ||
| v4l2-mc.h | ||
| v4l2-mediabus.h | ||
| v4l2-mem2mem.h | ||
| v4l2-rect.h | ||
| v4l2-subdev.h | ||
| v4l2-vp9.h | ||
| videobuf2-core.h | ||
| videobuf2-dma-contig.h | ||
| videobuf2-dma-sg.h | ||
| videobuf2-dvb.h | ||
| videobuf2-memops.h | ||
| videobuf2-v4l2.h | ||
| videobuf2-vmalloc.h | ||
| vsp1.h | ||