aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2020-05-14 10:01:18 +0200
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2020-05-14 10:01:18 +0200
commit06909fba01687439acd7b6b6d1f07462a9193227 (patch)
tree716bd2c3c2f6fa8f885ab88820fc75f0ad0c6107
parentbbdc0269bf49aa8dd8259d0c31efff2366f6647f (diff)
v4l-utils: sync with latest media kernel
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--contrib/test/ioctl-test.h2
-rw-r--r--contrib/test/ioctl_32.h1
-rw-r--r--contrib/test/ioctl_64.h1
-rw-r--r--include/linux/v4l2-subdev.h16
4 files changed, 20 insertions, 0 deletions
diff --git a/contrib/test/ioctl-test.h b/contrib/test/ioctl-test.h
index f2d1069d..32084c52 100644
--- a/contrib/test/ioctl-test.h
+++ b/contrib/test/ioctl-test.h
@@ -68,6 +68,7 @@ union v4l_parms {
struct v4l2_sliced_vbi_cap p_v4l2_sliced_vbi_cap;
struct v4l2_standard p_v4l2_standard;
struct v4l2_streamparm p_v4l2_streamparm;
+ struct v4l2_subdev_capability p_v4l2_subdev_capability;
struct v4l2_subdev_crop p_v4l2_subdev_crop;
struct v4l2_subdev_format p_v4l2_subdev_format;
struct v4l2_subdev_frame_interval p_v4l2_subdev_frame_interval;
@@ -191,6 +192,7 @@ static const struct {
ioc(subdev, VIDIOC_SUBDEV_G_FRAME_INTERVAL), /* struct v4l2_subdev_frame_interval */
ioc(subdev, VIDIOC_SUBDEV_G_SELECTION), /* struct v4l2_subdev_selection */
ioc(subdev, VIDIOC_SUBDEV_G_STD), /* v4l2_std_id */
+ ioc(subdev, VIDIOC_SUBDEV_QUERYCAP), /* struct v4l2_subdev_capability */
ioc(subdev, VIDIOC_SUBDEV_QUERYSTD), /* v4l2_std_id */
ioc(subdev, VIDIOC_SUBDEV_QUERY_DV_TIMINGS), /* struct v4l2_dv_timings */
ioc(subdev, VIDIOC_SUBDEV_S_CROP), /* struct v4l2_subdev_crop */
diff --git a/contrib/test/ioctl_32.h b/contrib/test/ioctl_32.h
index e690b0e4..6c008241 100644
--- a/contrib/test/ioctl_32.h
+++ b/contrib/test/ioctl_32.h
@@ -103,6 +103,7 @@
#define CMD32_VIDIOC_SUBDEV_G_FRAME_INTERVAL 0xc0305615
#define CMD32_VIDIOC_SUBDEV_G_SELECTION 0xc040563d
#define CMD32_VIDIOC_SUBDEV_G_STD 0x80085617
+#define CMD32_VIDIOC_SUBDEV_QUERYCAP 0x80405600
#define CMD32_VIDIOC_SUBDEV_QUERYSTD 0x8008563f
#define CMD32_VIDIOC_SUBDEV_QUERY_DV_TIMINGS 0x80845663
#define CMD32_VIDIOC_SUBDEV_S_CROP 0xc038563c
diff --git a/contrib/test/ioctl_64.h b/contrib/test/ioctl_64.h
index f0d26826..5001d7c7 100644
--- a/contrib/test/ioctl_64.h
+++ b/contrib/test/ioctl_64.h
@@ -103,6 +103,7 @@
#define CMD64_VIDIOC_SUBDEV_G_FRAME_INTERVAL 0xc0305615
#define CMD64_VIDIOC_SUBDEV_G_SELECTION 0xc040563d
#define CMD64_VIDIOC_SUBDEV_G_STD 0x80085617
+#define CMD64_VIDIOC_SUBDEV_QUERYCAP 0x80405600
#define CMD64_VIDIOC_SUBDEV_QUERYSTD 0x8008563f
#define CMD64_VIDIOC_SUBDEV_QUERY_DV_TIMINGS 0x80845663
#define CMD64_VIDIOC_SUBDEV_S_CROP 0xc038563c
diff --git a/include/linux/v4l2-subdev.h b/include/linux/v4l2-subdev.h
index 03970ce3..5d2a1dab 100644
--- a/include/linux/v4l2-subdev.h
+++ b/include/linux/v4l2-subdev.h
@@ -155,9 +155,25 @@ struct v4l2_subdev_selection {
__u32 reserved[8];
};
+/**
+ * struct v4l2_subdev_capability - subdev capabilities
+ * @version: the driver versioning number
+ * @capabilities: the subdev capabilities, see V4L2_SUBDEV_CAP_*
+ * @reserved: for future use, set to zero for now
+ */
+struct v4l2_subdev_capability {
+ __u32 version;
+ __u32 capabilities;
+ __u32 reserved[14];
+};
+
+/* The v4l2 sub-device video device node is registered in read-only mode. */
+#define V4L2_SUBDEV_CAP_RO_SUBDEV BIT(0)
+
/* Backwards compatibility define --- to be removed */
#define v4l2_subdev_edid v4l2_edid
+#define VIDIOC_SUBDEV_QUERYCAP _IOR('V', 0, struct v4l2_subdev_capability)
#define VIDIOC_SUBDEV_G_FMT _IOWR('V', 4, struct v4l2_subdev_format)
#define VIDIOC_SUBDEV_S_FMT _IOWR('V', 5, struct v4l2_subdev_format)
#define VIDIOC_SUBDEV_G_FRAME_INTERVAL _IOWR('V', 21, struct v4l2_subdev_frame_interval)

Privacy Policy