.. | .. |
---|
16 | 16 | #include <linux/cdev.h> |
---|
17 | 17 | #include <linux/mutex.h> |
---|
18 | 18 | #include <linux/videodev2.h> |
---|
| 19 | +#include <linux/android_kabi.h> |
---|
19 | 20 | |
---|
20 | 21 | #include <media/media-entity.h> |
---|
21 | 22 | |
---|
.. | .. |
---|
24 | 25 | /** |
---|
25 | 26 | * enum vfl_devnode_type - type of V4L2 device node |
---|
26 | 27 | * |
---|
27 | | - * @VFL_TYPE_GRABBER: for video input/output devices |
---|
| 28 | + * @VFL_TYPE_VIDEO: for video input/output devices |
---|
28 | 29 | * @VFL_TYPE_VBI: for vertical blank data (i.e. closed captions, teletext) |
---|
29 | 30 | * @VFL_TYPE_RADIO: for radio tuners |
---|
30 | 31 | * @VFL_TYPE_SUBDEV: for V4L2 subdevices |
---|
.. | .. |
---|
33 | 34 | * @VFL_TYPE_MAX: number of VFL types, must always be last in the enum |
---|
34 | 35 | */ |
---|
35 | 36 | enum vfl_devnode_type { |
---|
36 | | - VFL_TYPE_GRABBER = 0, |
---|
| 37 | + VFL_TYPE_VIDEO, |
---|
37 | 38 | VFL_TYPE_VBI, |
---|
38 | 39 | VFL_TYPE_RADIO, |
---|
39 | 40 | VFL_TYPE_SUBDEV, |
---|
.. | .. |
---|
74 | 75 | * indicates that file->private_data points to &struct v4l2_fh. |
---|
75 | 76 | * This flag is set by the core when v4l2_fh_init() is called. |
---|
76 | 77 | * 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. |
---|
77 | 92 | */ |
---|
78 | 93 | 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, |
---|
81 | 98 | }; |
---|
82 | 99 | |
---|
83 | 100 | /* Priority helper functions */ |
---|
.. | .. |
---|
195 | 212 | int (*mmap) (struct file *, struct vm_area_struct *); |
---|
196 | 213 | int (*open) (struct file *); |
---|
197 | 214 | int (*release) (struct file *); |
---|
| 215 | + |
---|
| 216 | + ANDROID_KABI_RESERVE(1); |
---|
198 | 217 | }; |
---|
199 | 218 | |
---|
200 | 219 | /* |
---|
.. | .. |
---|
291 | 310 | DECLARE_BITMAP(valid_ioctls, BASE_VIDIOC_PRIVATE); |
---|
292 | 311 | |
---|
293 | 312 | struct mutex *lock; |
---|
| 313 | + |
---|
| 314 | + ANDROID_KABI_RESERVE(1); |
---|
| 315 | + ANDROID_KABI_RESERVE(2); |
---|
294 | 316 | }; |
---|
295 | 317 | |
---|
296 | 318 | /** |
---|