[libcamera-devel] [PATCH 07/14] include: linux: Update headers for dw100/dynamic array support

Xavier Roumegue xavier.roumegue at oss.nxp.com
Thu Sep 8 20:48:43 CEST 2022


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 at 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
 
 /*  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;
-- 
2.37.3



More information about the libcamera-devel mailing list