hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/include/uapi/linux/v4l2-subdev.h
....@@ -65,19 +65,27 @@
6565 __u32 reserved[8];
6666 };
6767
68
+#define V4L2_SUBDEV_MBUS_CODE_CSC_COLORSPACE 0x00000001
69
+#define V4L2_SUBDEV_MBUS_CODE_CSC_XFER_FUNC 0x00000002
70
+#define V4L2_SUBDEV_MBUS_CODE_CSC_YCBCR_ENC 0x00000004
71
+#define V4L2_SUBDEV_MBUS_CODE_CSC_HSV_ENC V4L2_SUBDEV_MBUS_CODE_CSC_YCBCR_ENC
72
+#define V4L2_SUBDEV_MBUS_CODE_CSC_QUANTIZATION 0x00000008
73
+
6874 /**
6975 * struct v4l2_subdev_mbus_code_enum - Media bus format enumeration
7076 * @pad: pad number, as reported by the media API
7177 * @index: format index during enumeration
7278 * @code: format code (MEDIA_BUS_FMT_ definitions)
7379 * @which: format type (from enum v4l2_subdev_format_whence)
80
+ * @flags: flags set by the driver, (V4L2_SUBDEV_MBUS_CODE_*)
7481 */
7582 struct v4l2_subdev_mbus_code_enum {
7683 __u32 pad;
7784 __u32 index;
7885 __u32 code;
7986 __u32 which;
80
- __u32 reserved[8];
87
+ __u32 flags;
88
+ __u32 reserved[7];
8189 };
8290
8391 /**
....@@ -155,9 +163,25 @@
155163 __u32 reserved[8];
156164 };
157165
166
+/**
167
+ * struct v4l2_subdev_capability - subdev capabilities
168
+ * @version: the driver versioning number
169
+ * @capabilities: the subdev capabilities, see V4L2_SUBDEV_CAP_*
170
+ * @reserved: for future use, set to zero for now
171
+ */
172
+struct v4l2_subdev_capability {
173
+ __u32 version;
174
+ __u32 capabilities;
175
+ __u32 reserved[14];
176
+};
177
+
178
+/* The v4l2 sub-device video device node is registered in read-only mode. */
179
+#define V4L2_SUBDEV_CAP_RO_SUBDEV 0x00000001
180
+
158181 /* Backwards compatibility define --- to be removed */
159182 #define v4l2_subdev_edid v4l2_edid
160183
184
+#define VIDIOC_SUBDEV_QUERYCAP _IOR('V', 0, struct v4l2_subdev_capability)
161185 #define VIDIOC_SUBDEV_G_FMT _IOWR('V', 4, struct v4l2_subdev_format)
162186 #define VIDIOC_SUBDEV_S_FMT _IOWR('V', 5, struct v4l2_subdev_format)
163187 #define VIDIOC_SUBDEV_G_FRAME_INTERVAL _IOWR('V', 21, struct v4l2_subdev_frame_interval)