[3/9] include: linux: v4l2-subdev: Add SUBDEV_BIND_CONTEXT
diff mbox series

Message ID 20250725-multicontext-v1-3-ea558291e101@ideasonboard.com
State New
Headers show
Series
  • libcamera: Support for multi-context operations
Related show

Commit Message

Jacopo Mondi July 25, 2025, 10:33 a.m. UTC
Temporary update the media.h header from Linux kernel using the flags
introduced by:
https://patchwork.linuxtv.org/project/linux-media/patch/20250724-multicontext-mainline-2025-v2-13-c9b316773486@ideasonboard.com/

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
---
 include/linux/v4l2-subdev.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Isaac Scott July 25, 2025, 10:54 a.m. UTC | #1
Hi Jacopo,

On Fri, 2025-07-25 at 12:33 +0200, Jacopo Mondi wrote:
> Temporary update the media.h header from Linux kernel using the flags
> introduced by:
> https://patchwork.linuxtv.org/project/linux-media/patch/20250724-multicontext-mainline-2025-v2-13-c9b316773486@ideasonboard.com/
> 
> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> ---
>  include/linux/v4l2-subdev.h | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/include/linux/v4l2-subdev.h b/include/linux/v4l2-
> subdev.h
> index
> 839b1329afb259c96551cf76e9186bcb3229554a..9234a4cfc20a866840348224425
> 948f3aa6d5d63 100644
> --- a/include/linux/v4l2-subdev.h
> +++ b/include/linux/v4l2-subdev.h
> @@ -248,6 +248,16 @@ struct v4l2_subdev_routing {
>  	__u32 reserved[11];
>  };
>  
> +/**
> + * struct v4l2_subdev_bind_context - Subdev context information
> + *
> + * @context_fd: The file descriptor of the media_device instance the
> subdevice
> + *		has to be bound to
> + */
> +struct v4l2_subdev_bind_context {
> +	__u32 context_fd;
> +};
> +
>  /*
>   * 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
> @@ -290,6 +300,7 @@ struct v4l2_subdev_client_capability {
>  #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_BIND_CONTEXT		_IOWR('V', 50,
> struct v4l2_subdev_bind_context)

Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>

>  #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)
>

Patch
diff mbox series

diff --git a/include/linux/v4l2-subdev.h b/include/linux/v4l2-subdev.h
index 839b1329afb259c96551cf76e9186bcb3229554a..9234a4cfc20a866840348224425948f3aa6d5d63 100644
--- a/include/linux/v4l2-subdev.h
+++ b/include/linux/v4l2-subdev.h
@@ -248,6 +248,16 @@  struct v4l2_subdev_routing {
 	__u32 reserved[11];
 };
 
+/**
+ * struct v4l2_subdev_bind_context - Subdev context information
+ *
+ * @context_fd: The file descriptor of the media_device instance the subdevice
+ *		has to be bound to
+ */
+struct v4l2_subdev_bind_context {
+	__u32 context_fd;
+};
+
 /*
  * 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
@@ -290,6 +300,7 @@  struct v4l2_subdev_client_capability {
 #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_BIND_CONTEXT		_IOWR('V', 50, struct v4l2_subdev_bind_context)
 #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)