hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/include/media/v4l2-dev.h
....@@ -16,6 +16,7 @@
1616 #include <linux/cdev.h>
1717 #include <linux/mutex.h>
1818 #include <linux/videodev2.h>
19
+#include <linux/android_kabi.h>
1920
2021 #include <media/media-entity.h>
2122
....@@ -24,7 +25,7 @@
2425 /**
2526 * enum vfl_devnode_type - type of V4L2 device node
2627 *
27
- * @VFL_TYPE_GRABBER: for video input/output devices
28
+ * @VFL_TYPE_VIDEO: for video input/output devices
2829 * @VFL_TYPE_VBI: for vertical blank data (i.e. closed captions, teletext)
2930 * @VFL_TYPE_RADIO: for radio tuners
3031 * @VFL_TYPE_SUBDEV: for V4L2 subdevices
....@@ -33,7 +34,7 @@
3334 * @VFL_TYPE_MAX: number of VFL types, must always be last in the enum
3435 */
3536 enum vfl_devnode_type {
36
- VFL_TYPE_GRABBER = 0,
37
+ VFL_TYPE_VIDEO,
3738 VFL_TYPE_VBI,
3839 VFL_TYPE_RADIO,
3940 VFL_TYPE_SUBDEV,
....@@ -74,10 +75,26 @@
7475 * indicates that file->private_data points to &struct v4l2_fh.
7576 * This flag is set by the core when v4l2_fh_init() is called.
7677 * All new drivers should use it.
78
+ * @V4L2_FL_QUIRK_INVERTED_CROP:
79
+ * some old M2M drivers use g/s_crop/cropcap incorrectly: crop and
80
+ * compose are swapped. If this flag is set, then the selection
81
+ * targets are swapped in the g/s_crop/cropcap functions in v4l2-ioctl.c.
82
+ * This allows those drivers to correctly implement the selection API,
83
+ * but the old crop API will still work as expected in order to preserve
84
+ * backwards compatibility.
85
+ * Never set this flag for new drivers.
86
+ * @V4L2_FL_SUBDEV_RO_DEVNODE:
87
+ * indicates that the video device node is registered in read-only mode.
88
+ * The flag only applies to device nodes registered for sub-devices, it is
89
+ * set by the core when the sub-devices device nodes are registered with
90
+ * v4l2_device_register_ro_subdev_nodes() and used by the sub-device ioctl
91
+ * handler to restrict access to some ioctl calls.
7792 */
7893 enum v4l2_video_device_flags {
79
- V4L2_FL_REGISTERED = 0,
80
- V4L2_FL_USES_V4L2_FH = 1,
94
+ V4L2_FL_REGISTERED = 0,
95
+ V4L2_FL_USES_V4L2_FH = 1,
96
+ V4L2_FL_QUIRK_INVERTED_CROP = 2,
97
+ V4L2_FL_SUBDEV_RO_DEVNODE = 3,
8198 };
8299
83100 /* Priority helper functions */
....@@ -195,6 +212,8 @@
195212 int (*mmap) (struct file *, struct vm_area_struct *);
196213 int (*open) (struct file *);
197214 int (*release) (struct file *);
215
+
216
+ ANDROID_KABI_RESERVE(1);
198217 };
199218
200219 /*
....@@ -291,6 +310,9 @@
291310 DECLARE_BITMAP(valid_ioctls, BASE_VIDIOC_PRIVATE);
292311
293312 struct mutex *lock;
313
+
314
+ ANDROID_KABI_RESERVE(1);
315
+ ANDROID_KABI_RESERVE(2);
294316 };
295317
296318 /**