[libcamera-devel,v5,1/6] include: linux: Extend VIDIOC_ENUM_FMT to support MC-centric devices

Message ID 20200510115810.21938-2-laurent.pinchart@ideasonboard.com
State Accepted
Headers show
Series
  • Simple pipeline handler
Related show

Commit Message

Laurent Pinchart May 10, 2020, 11:58 a.m. UTC
This integrates the Linux kernel upstream commits e5b6b07a1b45 ("media:
v4l2: Extend VIDIOC_ENUM_FMT to support MC-centric devices") and
f645e6256bd1 ("media: v4l2-dev/ioctl: Add V4L2_CAP_IO_MC") that are
scheduled for v5.8.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 include/linux/videodev2.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Niklas Söderlund May 10, 2020, 7:57 p.m. UTC | #1
Hi Laurent,

Thanks for your work.

On 2020-05-10 14:58:05 +0300, Laurent Pinchart wrote:
> This integrates the Linux kernel upstream commits e5b6b07a1b45 ("media:
> v4l2: Extend VIDIOC_ENUM_FMT to support MC-centric devices") and
> f645e6256bd1 ("media: v4l2-dev/ioctl: Add V4L2_CAP_IO_MC") that are
> scheduled for v5.8.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>

> ---
>  include/linux/videodev2.h | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> index ab40b3272ed2..66f34fc05e3e 100644
> --- a/include/linux/videodev2.h
> +++ b/include/linux/videodev2.h
> @@ -476,6 +476,8 @@ struct v4l2_capability {
>  
>  #define V4L2_CAP_TOUCH                  0x10000000  /* Is a touch device */
>  
> +#define V4L2_CAP_IO_MC			0x20000000  /* Is input/output controlled by the media controller */
> +
>  #define V4L2_CAP_DEVICE_CAPS            0x80000000  /* sets device capabilities field */
>  
>  /*
> @@ -769,7 +771,8 @@ struct v4l2_fmtdesc {
>  	__u32               flags;
>  	__u8		    description[32];   /* Description string */
>  	__u32		    pixelformat;       /* Format fourcc      */
> -	__u32		    reserved[4];
> +	__u32		    mbus_code;		/* Media bus code    */
> +	__u32		    reserved[3];
>  };
>  
>  #define V4L2_FMT_FLAG_COMPRESSED		0x0001
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch

diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index ab40b3272ed2..66f34fc05e3e 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -476,6 +476,8 @@  struct v4l2_capability {
 
 #define V4L2_CAP_TOUCH                  0x10000000  /* Is a touch device */
 
+#define V4L2_CAP_IO_MC			0x20000000  /* Is input/output controlled by the media controller */
+
 #define V4L2_CAP_DEVICE_CAPS            0x80000000  /* sets device capabilities field */
 
 /*
@@ -769,7 +771,8 @@  struct v4l2_fmtdesc {
 	__u32               flags;
 	__u8		    description[32];   /* Description string */
 	__u32		    pixelformat;       /* Format fourcc      */
-	__u32		    reserved[4];
+	__u32		    mbus_code;		/* Media bus code    */
+	__u32		    reserved[3];
 };
 
 #define V4L2_FMT_FLAG_COMPRESSED		0x0001