Hi Sakari, Thank you for the patch. On Tue, Apr 16, 2024 at 10:33:17PM +0300, Sakari Ailus wrote: > Add a flag to denote immutable routes, V4L2_SUBDEV_ROUTE_FL_IMMUTABLE. > Such routes cannot be changed and they're always active. > > Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> > --- > Documentation/userspace-api/media/v4l/dev-subdev.rst | 4 +++- > .../userspace-api/media/v4l/vidioc-subdev-g-routing.rst | 5 +++++ > include/uapi/linux/v4l2-subdev.h | 5 +++++ > 3 files changed, 13 insertions(+), 1 deletion(-) > > diff --git a/Documentation/userspace-api/media/v4l/dev-subdev.rst b/Documentation/userspace-api/media/v4l/dev-subdev.rst > index de8dfd4f11a5..5c63c8c24108 100644 > --- a/Documentation/userspace-api/media/v4l/dev-subdev.rst > +++ b/Documentation/userspace-api/media/v4l/dev-subdev.rst > @@ -572,7 +572,9 @@ internal pad always has a single stream only (0). > Routes from an internal sink pad to an external source pad are typically not > modifiable but they can be activated and deactivated using the > :ref:`V4L2_SUBDEV_ROUTE_FL_ACTIVE <v4l2-subdev-routing-flags>` flag, depending > -on driver capabilities. > +on driver capabilities. The :ref:`V4L2_SUBDEV_ROUTE_FL_IMMUTABLE > +<v4l2-subdev-routing-flags>` flag indicates that the > +``V4L2_SUBDEV_ROUTE_FLAG_ACTIVE`` of the route may not be unset. > > Interaction between routes, streams, formats and selections > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > diff --git a/Documentation/userspace-api/media/v4l/vidioc-subdev-g-routing.rst b/Documentation/userspace-api/media/v4l/vidioc-subdev-g-routing.rst > index 88df7bf80b00..c0f6d49cac6d 100644 > --- a/Documentation/userspace-api/media/v4l/vidioc-subdev-g-routing.rst > +++ b/Documentation/userspace-api/media/v4l/vidioc-subdev-g-routing.rst > @@ -150,6 +150,11 @@ Also ``VIDIOC_SUBDEV_S_ROUTING`` may return more route than the user provided in > * - V4L2_SUBDEV_ROUTE_FL_ACTIVE > - 0x0001 > - The route is enabled. Set by applications. > + * - V4L2_SUBDEV_ROUTE_FL_IMMUTABLE > + - 0x0002 > + - The route is immutable. Set by the driver. Indicates that the > + ``V4L2_SUBDEV_ROUTE_FL_ACTIVE`` flag of an immutable route may not be > + unset. > > Return Value > ============ > diff --git a/include/uapi/linux/v4l2-subdev.h b/include/uapi/linux/v4l2-subdev.h > index 6a39128d0606..c6f1228d43b1 100644 > --- a/include/uapi/linux/v4l2-subdev.h > +++ b/include/uapi/linux/v4l2-subdev.h > @@ -204,6 +204,11 @@ struct v4l2_subdev_capability { > * on a video node. > */ > #define V4L2_SUBDEV_ROUTE_FL_ACTIVE (1U << 0) > +/* > + * Is the route immutable. The ACTIVE flag of an immutable route may not be > + * changed. s/changed/unset/ Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx> > + */ > +#define V4L2_SUBDEV_ROUTE_FL_IMMUTABLE (1U << 1) > > /** > * struct v4l2_subdev_route - A route inside a subdev -- Regards, Laurent Pinchart