Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

media: subdev: Improve v4l2_subdev_get_frame_desc_passthrough() kdoc

Improve the v4l2_subdev_get_frame_desc_passthrough() kernel doc:

- Fix 'v4l2_get_frame_desc' operation to 'get_frame_desc' operation
- Rewrite the body text to be more understandable and specific, and
specifically mention the frame desc type handling.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
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>

authored by

Tomi Valkeinen and committed by
Hans Verkuil
754ec1f1 1b065199

+14 -8
+14 -8
include/media/v4l2-subdev.h
··· 1724 1724 1725 1725 /** 1726 1726 * v4l2_subdev_get_frame_desc_passthrough() - Helper to implement the subdev 1727 - * v4l2_get_frame_desc operation in simple passthrough cases 1727 + * get_frame_desc operation in simple passthrough cases 1728 1728 * @sd: The subdevice 1729 1729 * @pad: The source pad index 1730 1730 * @fd: The mbus frame desc 1731 1731 * 1732 - * Subdevice drivers that only pass through the streams can use this helper 1733 - * to implement the &v4l2_subdev_pad_ops.v4l2_get_frame_desc operation. 1732 + * This helper implements get_frame_desc operation for subdevices that pass 1733 + * streams through without modification. It can be assigned directly as the 1734 + * .get_frame_desc callback in &v4l2_subdev_pad_ops. 1734 1735 * 1735 - * The helper will call get_frame_desc on the subdevice's sources, create a new 1736 - * frame desc which contains only the streams on the given source pad. The data 1737 - * for each frame desc entry is copied directly from the data provided from the 1738 - * calls to the subdevice's sources, with the exception of the 'stream' field 1739 - * which is set according to the subdevice's routing table. 1736 + * The helper iterates over the subdevice's sink pads, calls get_frame_desc on 1737 + * the remote subdevice connected to each sink pad, and collects the frame desc 1738 + * entries for streams that are routed to the given source pad according to the 1739 + * subdevice's routing table. Each entry is copied as-is from the upstream 1740 + * source, with the exception of the 'stream' field which is remapped to the 1741 + * source stream ID from the routing table. 1742 + * 1743 + * The frame desc type is taken from the first upstream source. If multiple 1744 + * sink pads are involved and the upstream sources report different frame desc 1745 + * types, -EPIPE is returned. 1740 1746 * 1741 1747 * Return: 0 on success, or a negative error code otherwise. 1742 1748 */