diff mbox series

[v2,1/3] v4l-utils: Define V4L2_CTRL_TYPE_RECT

Message ID 20241030024307.1114787-2-ming.qian@oss.nxp.com
State New
Headers show
Series Support V4L2_CTRL_TYPE_RECT and V4L2_CTRL_WHICH_MIN/MAX_VAL | expand

Commit Message

Ming Qian(OSS) Oct. 30, 2024, 2:43 a.m. UTC
From: Ming Qian <ming.qian@oss.nxp.com>

Define V4L2_CTRL_TYPE_RECT and V4L2_CTRL_WHICH_MIN/MAX_VAL
in videodev2.h
This is a temporary patch

Signed-off-by: Ming Qian <ming.qian@oss.nxp.com>
---
 include/linux/videodev2.h | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 23db72afdf60..6aae7e10e90c 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -1816,6 +1816,7 @@  struct v4l2_ext_control {
 		struct v4l2_ctrl_av1_film_grain *p_av1_film_grain;
 		struct v4l2_ctrl_hdr10_cll_info *p_hdr10_cll_info;
 		struct v4l2_ctrl_hdr10_mastering_display *p_hdr10_mastering_display;
+		struct v4l2_rect *p_rect;
 		void *ptr;
 	} __attribute__ ((packed));
 } __attribute__ ((packed));
@@ -1840,6 +1841,8 @@  struct v4l2_ext_controls {
 #define V4L2_CTRL_WHICH_CUR_VAL   0
 #define V4L2_CTRL_WHICH_DEF_VAL   0x0f000000
 #define V4L2_CTRL_WHICH_REQUEST_VAL 0x0f010000
+#define V4L2_CTRL_WHICH_MIN_VAL   0x0f020000
+#define V4L2_CTRL_WHICH_MAX_VAL   0x0f030000
 
 enum v4l2_ctrl_type {
 	V4L2_CTRL_TYPE_INTEGER	     = 1,
@@ -1858,6 +1861,7 @@  enum v4l2_ctrl_type {
 	V4L2_CTRL_TYPE_U16	     = 0x0101,
 	V4L2_CTRL_TYPE_U32	     = 0x0102,
 	V4L2_CTRL_TYPE_AREA          = 0x0106,
+	V4L2_CTRL_TYPE_RECT	     = 0x0107,
 
 	V4L2_CTRL_TYPE_HDR10_CLL_INFO		= 0x0110,
 	V4L2_CTRL_TYPE_HDR10_MASTERING_DISPLAY	= 0x0111,
@@ -1946,6 +1950,7 @@  struct v4l2_querymenu {
 #define V4L2_CTRL_FLAG_EXECUTE_ON_WRITE	0x0200
 #define V4L2_CTRL_FLAG_MODIFY_LAYOUT	0x0400
 #define V4L2_CTRL_FLAG_DYNAMIC_ARRAY	0x0800
+#define V4L2_CTRL_FLAG_HAS_WHICH_MIN_MAX 0x1000
 
 /*  Query flags, to be ORed with the control ID */
 #define V4L2_CTRL_FLAG_NEXT_CTRL	0x80000000