Re: [PATCH v7 20/27] v4l: subdev: add V4L2_SUBDEV_ROUTE_FL_SOURCE
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Date: 2021-06-05 22:47:03
Hi Tomi, On Sun, Jun 06, 2021 at 01:44:54AM +0300, Laurent Pinchart wrote:
On Mon, May 24, 2021 at 01:44:01PM +0300, Tomi Valkeinen wrote:quoted
Add route flag to indicate that the route is a source route. This means that the route does not lead anywhere, and the sink_pad and sink_stream should not be used.I don't like this much. It's not a route if it doesn't lead anywhere, so this flag seems like a hack. If we need a way to discover streams on a source, I'd rather have an explicit operation to do so. Can't the get frame descriptor operation be used for this ? If the need is to find out that we're reaching the end of a pipeline while going through links and routes, I'd rather have a pad flag to indicate that the pad is an endpoint.
Also, I can't see where this is being used, so maybe we can just drop it :-)
quoted
A sensor which provides multiple streams should implement get_routing and use the flag to mark the routes as sources. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> --- include/uapi/linux/v4l2-subdev.h | 7 +++++++ 1 file changed, 7 insertions(+)diff --git a/include/uapi/linux/v4l2-subdev.h b/include/uapi/linux/v4l2-subdev.h index 45c01799e2cd..f20491e1f53f 100644 --- a/include/uapi/linux/v4l2-subdev.h +++ b/include/uapi/linux/v4l2-subdev.h@@ -200,6 +200,13 @@ struct v4l2_subdev_capability { */ #define V4L2_SUBDEV_ROUTE_FL_IMMUTABLE BIT(1) +/** + * Is the route a source endpoint? A source endpoint route doesn't come + * from "anywhere", and the sink_pad and sink_stream fields are unused. + * Set by the driver. + */ +#define V4L2_SUBDEV_ROUTE_FL_SOURCE BIT(2) + /** * struct v4l2_subdev_route - A route inside a subdev *
-- Regards, Laurent Pinchart