[libcamera-devel,07/14] include: linux: Update headers for dw100/dynamic array support
diff mbox series

Message ID 20220908184850.1874303-8-xavier.roumegue@oss.nxp.com
State Changes Requested
Headers show
Series
  • Add dw100 dewarper support to simple/rkisp1 pipeline
Related show

Commit Message

Xavier Roumegue Sept. 8, 2022, 6:48 p.m. UTC
This is merged in media_tree/master linux kernel:
- 9d5c3c069805 - media: uapi: Add a control for DW100 driver
- a41c4088cf43 - media: v4l: uapi: Add user control base for DW100 controls
- 43cc0ec38131 - media: v4l2-ctrls: add change flag for when dimensions change

Signed-off-by: Xavier Roumegue <xavier.roumegue@oss.nxp.com>
---
 include/linux/dw100.h         | 14 ++++++++++++++
 include/linux/v4l2-controls.h |  6 ++++++
 include/linux/videodev2.h     |  2 ++
 3 files changed, 22 insertions(+)
 create mode 100644 include/linux/dw100.h

Comments

Laurent Pinchart Oct. 3, 2022, 10:15 p.m. UTC | #1
Hi Xavier,

Thank you for the patch.

On Thu, Sep 08, 2022 at 08:48:43PM +0200, Xavier Roumegue via libcamera-devel wrote:
> This is merged in media_tree/master linux kernel:
> - 9d5c3c069805 - media: uapi: Add a control for DW100 driver
> - a41c4088cf43 - media: v4l: uapi: Add user control base for DW100 controls
> - 43cc0ec38131 - media: v4l2-ctrls: add change flag for when dimensions change
> 
> Signed-off-by: Xavier Roumegue <xavier.roumegue@oss.nxp.com>
> ---
>  include/linux/dw100.h         | 14 ++++++++++++++
>  include/linux/v4l2-controls.h |  6 ++++++
>  include/linux/videodev2.h     |  2 ++
>  3 files changed, 22 insertions(+)
>  create mode 100644 include/linux/dw100.h
> 
> diff --git a/include/linux/dw100.h b/include/linux/dw100.h
> new file mode 100644
> index 00000000..3356496e
> --- /dev/null
> +++ b/include/linux/dw100.h
> @@ -0,0 +1,14 @@
> +/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
> +/* Copyright 2022 NXP */
> +
> +#ifndef __UAPI_DW100_H__
> +#define __UAPI_DW100_H__
> +
> +#include <linux/v4l2-controls.h>
> +
> +/*
> + * Check Documentation/userspace-api/media/drivers/dw100.rst for control details.
> + */
> +#define V4L2_CID_DW100_DEWARPING_16x16_VERTEX_MAP (V4L2_CID_USER_DW100_BASE + 1)
> +
> +#endif
> diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h
> index 9d2a8237..047f8965 100644
> --- a/include/linux/v4l2-controls.h
> +++ b/include/linux/v4l2-controls.h
> @@ -229,6 +229,12 @@ enum v4l2_colorfx {
>   */
>  #define V4L2_CID_USER_ISL7998X_BASE		(V4L2_CID_USER_BASE + 0x1180)
>  
> +/*
> + * The base for DW100 driver controls.
> + * We reserve 16 controls for this driver.
> + */
> +#define V4L2_CID_USER_DW100_BASE		(V4L2_CID_USER_BASE + 0x1190)
> +
>  /* MPEG-class control IDs */
>  /* The MPEG controls are applicable to all codec controls
>   * and the 'MPEG' part of the define is historical */
> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> index bfb315d6..f502114f 100644
> --- a/include/linux/videodev2.h
> +++ b/include/linux/videodev2.h
> @@ -1860,6 +1860,7 @@ struct v4l2_querymenu {
>  #define V4L2_CTRL_FLAG_HAS_PAYLOAD	0x0100
>  #define V4L2_CTRL_FLAG_EXECUTE_ON_WRITE	0x0200
>  #define V4L2_CTRL_FLAG_MODIFY_LAYOUT	0x0400
> +#define V4L2_CTRL_FLAG_DYNAMIC_ARRAY	0x0800

This isn't part of any of the commits listed in the commit message, but
has been introduced in commit 64fe675e999c ("media: videodev2.h: add
V4L2_CTRL_FLAG_DYNAMIC_ARRAY"). As it isn't used in this series, I would
drop it.

>  
>  /*  Query flags, to be ORed with the control ID */
>  #define V4L2_CTRL_FLAG_NEXT_CTRL	0x80000000
> @@ -2367,6 +2368,7 @@ struct v4l2_event_vsync {
>  #define V4L2_EVENT_CTRL_CH_VALUE		(1 << 0)
>  #define V4L2_EVENT_CTRL_CH_FLAGS		(1 << 1)
>  #define V4L2_EVENT_CTRL_CH_RANGE		(1 << 2)
> +#define V4L2_EVENT_CTRL_CH_DIMENSIONS		(1 << 3)

This isn't used in this series either, you can drop it.

With these two changes dropped, and the commit message updates
(including the subject line),

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>  
>  struct v4l2_event_ctrl {
>  	__u32 changes;

Patch
diff mbox series

diff --git a/include/linux/dw100.h b/include/linux/dw100.h
new file mode 100644
index 00000000..3356496e
--- /dev/null
+++ b/include/linux/dw100.h
@@ -0,0 +1,14 @@ 
+/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
+/* Copyright 2022 NXP */
+
+#ifndef __UAPI_DW100_H__
+#define __UAPI_DW100_H__
+
+#include <linux/v4l2-controls.h>
+
+/*
+ * Check Documentation/userspace-api/media/drivers/dw100.rst for control details.
+ */
+#define V4L2_CID_DW100_DEWARPING_16x16_VERTEX_MAP (V4L2_CID_USER_DW100_BASE + 1)
+
+#endif
diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h
index 9d2a8237..047f8965 100644
--- a/include/linux/v4l2-controls.h
+++ b/include/linux/v4l2-controls.h
@@ -229,6 +229,12 @@  enum v4l2_colorfx {
  */
 #define V4L2_CID_USER_ISL7998X_BASE		(V4L2_CID_USER_BASE + 0x1180)
 
+/*
+ * The base for DW100 driver controls.
+ * We reserve 16 controls for this driver.
+ */
+#define V4L2_CID_USER_DW100_BASE		(V4L2_CID_USER_BASE + 0x1190)
+
 /* MPEG-class control IDs */
 /* The MPEG controls are applicable to all codec controls
  * and the 'MPEG' part of the define is historical */
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index bfb315d6..f502114f 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -1860,6 +1860,7 @@  struct v4l2_querymenu {
 #define V4L2_CTRL_FLAG_HAS_PAYLOAD	0x0100
 #define V4L2_CTRL_FLAG_EXECUTE_ON_WRITE	0x0200
 #define V4L2_CTRL_FLAG_MODIFY_LAYOUT	0x0400
+#define V4L2_CTRL_FLAG_DYNAMIC_ARRAY	0x0800
 
 /*  Query flags, to be ORed with the control ID */
 #define V4L2_CTRL_FLAG_NEXT_CTRL	0x80000000
@@ -2367,6 +2368,7 @@  struct v4l2_event_vsync {
 #define V4L2_EVENT_CTRL_CH_VALUE		(1 << 0)
 #define V4L2_EVENT_CTRL_CH_FLAGS		(1 << 1)
 #define V4L2_EVENT_CTRL_CH_RANGE		(1 << 2)
+#define V4L2_EVENT_CTRL_CH_DIMENSIONS		(1 << 3)
 
 struct v4l2_event_ctrl {
 	__u32 changes;