Message ID | 20230421124428.393261-6-tomi.valkeinen@ideasonboard.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v4,1/8] v4l2-ctl: Add routing and streams support | expand |
Hi Tomi, Thank you for the patch. On Fri, Apr 21, 2023 at 03:44:25PM +0300, Tomi Valkeinen wrote: > Add client capabilities related hanges to include/linux/v4l2-subdev.h. > This should be dropped when the v4l-utils kernel headers are updated to > the version which contains client capabilities. > > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> The subdev client capabilities patch is now in the media tree, maybe you can sync the headers already ? The media tree master branch should get merged in v6.4-rc1 within two weeks. > --- > include/linux/v4l2-subdev.h | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > > diff --git a/include/linux/v4l2-subdev.h b/include/linux/v4l2-subdev.h > index 654d659d..4a195b68 100644 > --- a/include/linux/v4l2-subdev.h > +++ b/include/linux/v4l2-subdev.h > @@ -233,6 +233,24 @@ struct v4l2_subdev_routing { > __u32 reserved[6]; > }; > > +/* > + * The client is aware of streams. Setting this flag enables the use of 'stream' > + * fields (referring to the stream number) with various ioctls. If this is not > + * set (which is the default), the 'stream' fields will be forced to 0 by the > + * kernel. > + */ > + #define V4L2_SUBDEV_CLIENT_CAP_STREAMS (1U << 0) > + > +/** > + * struct v4l2_subdev_client_capability - Capabilities of the client accessing > + * the subdev > + * > + * @capabilities: A bitmask of V4L2_SUBDEV_CLIENT_CAP_* flags. > + */ > +struct v4l2_subdev_client_capability { > + __u64 capabilities; > +}; > + > /* Backwards compatibility define --- to be removed */ > #define v4l2_subdev_edid v4l2_edid > > @@ -250,6 +268,9 @@ struct v4l2_subdev_routing { > #define VIDIOC_SUBDEV_S_SELECTION _IOWR('V', 62, struct v4l2_subdev_selection) > #define VIDIOC_SUBDEV_G_ROUTING _IOWR('V', 38, struct v4l2_subdev_routing) > #define VIDIOC_SUBDEV_S_ROUTING _IOWR('V', 39, struct v4l2_subdev_routing) > +#define VIDIOC_SUBDEV_G_CLIENT_CAP _IOR('V', 101, struct v4l2_subdev_client_capability) > +#define VIDIOC_SUBDEV_S_CLIENT_CAP _IOWR('V', 102, struct v4l2_subdev_client_capability) > + > /* The following ioctls are identical to the ioctls in videodev2.h */ > #define VIDIOC_SUBDEV_G_STD _IOR('V', 23, v4l2_std_id) > #define VIDIOC_SUBDEV_S_STD _IOW('V', 24, v4l2_std_id)
Hi Tomi, On 24/04/2023 09:32, Laurent Pinchart wrote: > Hi Tomi, > > Thank you for the patch. > > On Fri, Apr 21, 2023 at 03:44:25PM +0300, Tomi Valkeinen wrote: >> Add client capabilities related hanges to include/linux/v4l2-subdev.h. >> This should be dropped when the v4l-utils kernel headers are updated to >> the version which contains client capabilities. >> >> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> > > The subdev client capabilities patch is now in the media tree, maybe you > can sync the headers already ? The media tree master branch should get > merged in v6.4-rc1 within two weeks. I've just synced the headers for v4l-utils. I think it is easiest if you post a v5, assuming everything that this series needs is now merged in the kernel. I'll pick it up. Regards, Hans > >> --- >> include/linux/v4l2-subdev.h | 21 +++++++++++++++++++++ >> 1 file changed, 21 insertions(+) >> >> diff --git a/include/linux/v4l2-subdev.h b/include/linux/v4l2-subdev.h >> index 654d659d..4a195b68 100644 >> --- a/include/linux/v4l2-subdev.h >> +++ b/include/linux/v4l2-subdev.h >> @@ -233,6 +233,24 @@ struct v4l2_subdev_routing { >> __u32 reserved[6]; >> }; >> >> +/* >> + * The client is aware of streams. Setting this flag enables the use of 'stream' >> + * fields (referring to the stream number) with various ioctls. If this is not >> + * set (which is the default), the 'stream' fields will be forced to 0 by the >> + * kernel. >> + */ >> + #define V4L2_SUBDEV_CLIENT_CAP_STREAMS (1U << 0) >> + >> +/** >> + * struct v4l2_subdev_client_capability - Capabilities of the client accessing >> + * the subdev >> + * >> + * @capabilities: A bitmask of V4L2_SUBDEV_CLIENT_CAP_* flags. >> + */ >> +struct v4l2_subdev_client_capability { >> + __u64 capabilities; >> +}; >> + >> /* Backwards compatibility define --- to be removed */ >> #define v4l2_subdev_edid v4l2_edid >> >> @@ -250,6 +268,9 @@ struct v4l2_subdev_routing { >> #define VIDIOC_SUBDEV_S_SELECTION _IOWR('V', 62, struct v4l2_subdev_selection) >> #define VIDIOC_SUBDEV_G_ROUTING _IOWR('V', 38, struct v4l2_subdev_routing) >> #define VIDIOC_SUBDEV_S_ROUTING _IOWR('V', 39, struct v4l2_subdev_routing) >> +#define VIDIOC_SUBDEV_G_CLIENT_CAP _IOR('V', 101, struct v4l2_subdev_client_capability) >> +#define VIDIOC_SUBDEV_S_CLIENT_CAP _IOWR('V', 102, struct v4l2_subdev_client_capability) >> + >> /* The following ioctls are identical to the ioctls in videodev2.h */ >> #define VIDIOC_SUBDEV_G_STD _IOR('V', 23, v4l2_std_id) >> #define VIDIOC_SUBDEV_S_STD _IOW('V', 24, v4l2_std_id) >
On 25/05/2023 17:05, Hans Verkuil wrote: > Hi Tomi, > > On 24/04/2023 09:32, Laurent Pinchart wrote: >> Hi Tomi, >> >> Thank you for the patch. >> >> On Fri, Apr 21, 2023 at 03:44:25PM +0300, Tomi Valkeinen wrote: >>> Add client capabilities related hanges to include/linux/v4l2-subdev.h. >>> This should be dropped when the v4l-utils kernel headers are updated to >>> the version which contains client capabilities. >>> >>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> >> >> The subdev client capabilities patch is now in the media tree, maybe you >> can sync the headers already ? The media tree master branch should get >> merged in v6.4-rc1 within two weeks. > > I've just synced the headers for v4l-utils. > > I think it is easiest if you post a v5, assuming everything that this series > needs is now merged in the kernel. I'll pick it up. Ok. There are comments in this thread which I haven't addressed yet. So I'll rebase on top of latest v4l-utils, address the comments and post v5. Tomi
diff --git a/include/linux/v4l2-subdev.h b/include/linux/v4l2-subdev.h index 654d659d..4a195b68 100644 --- a/include/linux/v4l2-subdev.h +++ b/include/linux/v4l2-subdev.h @@ -233,6 +233,24 @@ struct v4l2_subdev_routing { __u32 reserved[6]; }; +/* + * The client is aware of streams. Setting this flag enables the use of 'stream' + * fields (referring to the stream number) with various ioctls. If this is not + * set (which is the default), the 'stream' fields will be forced to 0 by the + * kernel. + */ + #define V4L2_SUBDEV_CLIENT_CAP_STREAMS (1U << 0) + +/** + * struct v4l2_subdev_client_capability - Capabilities of the client accessing + * the subdev + * + * @capabilities: A bitmask of V4L2_SUBDEV_CLIENT_CAP_* flags. + */ +struct v4l2_subdev_client_capability { + __u64 capabilities; +}; + /* Backwards compatibility define --- to be removed */ #define v4l2_subdev_edid v4l2_edid @@ -250,6 +268,9 @@ struct v4l2_subdev_routing { #define VIDIOC_SUBDEV_S_SELECTION _IOWR('V', 62, struct v4l2_subdev_selection) #define VIDIOC_SUBDEV_G_ROUTING _IOWR('V', 38, struct v4l2_subdev_routing) #define VIDIOC_SUBDEV_S_ROUTING _IOWR('V', 39, struct v4l2_subdev_routing) +#define VIDIOC_SUBDEV_G_CLIENT_CAP _IOR('V', 101, struct v4l2_subdev_client_capability) +#define VIDIOC_SUBDEV_S_CLIENT_CAP _IOWR('V', 102, struct v4l2_subdev_client_capability) + /* The following ioctls are identical to the ioctls in videodev2.h */ #define VIDIOC_SUBDEV_G_STD _IOR('V', 23, v4l2_std_id) #define VIDIOC_SUBDEV_S_STD _IOW('V', 24, v4l2_std_id)
Add client capabilities related hanges to include/linux/v4l2-subdev.h. This should be dropped when the v4l-utils kernel headers are updated to the version which contains client capabilities. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> --- include/linux/v4l2-subdev.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)