diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/platform_data/mipi-csis.h | 28 | ||||
| -rw-r--r-- | include/media/adv7604.h | 2 | ||||
| -rw-r--r-- | include/media/davinci/vpbe_display.h | 6 | ||||
| -rw-r--r-- | include/media/davinci/vpfe_capture.h | 6 | ||||
| -rw-r--r-- | include/media/exynos-fimc.h (renamed from include/media/s5p_fimc.h) | 21 | ||||
| -rw-r--r-- | include/media/media-device.h | 4 | ||||
| -rw-r--r-- | include/media/media-devnode.h | 3 | ||||
| -rw-r--r-- | include/media/v4l2-device.h | 8 | ||||
| -rw-r--r-- | include/media/v4l2-event.h | 4 | ||||
| -rw-r--r-- | include/media/v4l2-subdev.h | 33 | ||||
| -rw-r--r-- | include/media/videobuf2-core.h | 51 | ||||
| -rw-r--r-- | include/media/videobuf2-dvb.h | 58 | ||||
| -rw-r--r-- | include/uapi/linux/v4l2-common.h | 2 | ||||
| -rw-r--r-- | include/uapi/linux/v4l2-dv-timings.h | 70 | ||||
| -rw-r--r-- | include/uapi/linux/v4l2-mediabus.h | 14 | ||||
| -rw-r--r-- | include/uapi/linux/v4l2-subdev.h | 40 | ||||
| -rw-r--r-- | include/uapi/linux/videodev2.h | 19 |
17 files changed, 270 insertions, 99 deletions
diff --git a/include/linux/platform_data/mipi-csis.h b/include/linux/platform_data/mipi-csis.h deleted file mode 100644 index c2fd9024717c..000000000000 --- a/include/linux/platform_data/mipi-csis.h +++ /dev/null | |||
| @@ -1,28 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010 - 2012 Samsung Electronics Co., Ltd. | ||
| 3 | * | ||
| 4 | * Samsung S5P/Exynos SoC series MIPI CSIS device support | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef __PLAT_SAMSUNG_MIPI_CSIS_H_ | ||
| 12 | #define __PLAT_SAMSUNG_MIPI_CSIS_H_ __FILE__ | ||
| 13 | |||
| 14 | /** | ||
| 15 | * struct s5p_platform_mipi_csis - platform data for S5P MIPI-CSIS driver | ||
| 16 | * @clk_rate: bus clock frequency | ||
| 17 | * @wclk_source: CSI wrapper clock selection: 0 - bus clock, 1 - ext. SCLK_CAM | ||
| 18 | * @lanes: number of data lanes used | ||
| 19 | * @hs_settle: HS-RX settle time | ||
| 20 | */ | ||
| 21 | struct s5p_platform_mipi_csis { | ||
| 22 | unsigned long clk_rate; | ||
| 23 | u8 wclk_source; | ||
| 24 | u8 lanes; | ||
| 25 | u8 hs_settle; | ||
| 26 | }; | ||
| 27 | |||
| 28 | #endif /* __PLAT_SAMSUNG_MIPI_CSIS_H_ */ | ||
diff --git a/include/media/adv7604.h b/include/media/adv7604.h index d262a3a922bd..c6b39372eed7 100644 --- a/include/media/adv7604.h +++ b/include/media/adv7604.h | |||
| @@ -21,6 +21,8 @@ | |||
| 21 | #ifndef _ADV7604_ | 21 | #ifndef _ADV7604_ |
| 22 | #define _ADV7604_ | 22 | #define _ADV7604_ |
| 23 | 23 | ||
| 24 | #include <linux/types.h> | ||
| 25 | |||
| 24 | /* Analog input muxing modes (AFE register 0x02, [2:0]) */ | 26 | /* Analog input muxing modes (AFE register 0x02, [2:0]) */ |
| 25 | enum adv7604_ain_sel { | 27 | enum adv7604_ain_sel { |
| 26 | ADV7604_AIN1_2_3_NC_SYNC_1_2 = 0, | 28 | ADV7604_AIN1_2_3_NC_SYNC_1_2 = 0, |
diff --git a/include/media/davinci/vpbe_display.h b/include/media/davinci/vpbe_display.h index 8dffffedbb59..637749a91432 100644 --- a/include/media/davinci/vpbe_display.h +++ b/include/media/davinci/vpbe_display.h | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | /* Header files */ | 16 | /* Header files */ |
| 17 | #include <linux/videodev2.h> | 17 | #include <linux/videodev2.h> |
| 18 | #include <media/v4l2-common.h> | 18 | #include <media/v4l2-common.h> |
| 19 | #include <media/v4l2-fh.h> | ||
| 19 | #include <media/videobuf2-dma-contig.h> | 20 | #include <media/videobuf2-dma-contig.h> |
| 20 | #include <media/davinci/vpbe_types.h> | 21 | #include <media/davinci/vpbe_types.h> |
| 21 | #include <media/davinci/vpbe_osd.h> | 22 | #include <media/davinci/vpbe_osd.h> |
| @@ -94,8 +95,6 @@ struct vpbe_layer { | |||
| 94 | * has selected | 95 | * has selected |
| 95 | */ | 96 | */ |
| 96 | enum v4l2_memory memory; | 97 | enum v4l2_memory memory; |
| 97 | /* Used to keep track of state of the priority */ | ||
| 98 | struct v4l2_prio_state prio; | ||
| 99 | /* Used to store pixel format */ | 98 | /* Used to store pixel format */ |
| 100 | struct v4l2_pix_format pix_fmt; | 99 | struct v4l2_pix_format pix_fmt; |
| 101 | enum v4l2_field buf_field; | 100 | enum v4l2_field buf_field; |
| @@ -134,14 +133,13 @@ struct vpbe_display { | |||
| 134 | 133 | ||
| 135 | /* File handle structure */ | 134 | /* File handle structure */ |
| 136 | struct vpbe_fh { | 135 | struct vpbe_fh { |
| 136 | struct v4l2_fh fh; | ||
| 137 | /* vpbe device structure */ | 137 | /* vpbe device structure */ |
| 138 | struct vpbe_display *disp_dev; | 138 | struct vpbe_display *disp_dev; |
| 139 | /* pointer to layer object for opened device */ | 139 | /* pointer to layer object for opened device */ |
| 140 | struct vpbe_layer *layer; | 140 | struct vpbe_layer *layer; |
| 141 | /* Indicates whether this file handle is doing IO */ | 141 | /* Indicates whether this file handle is doing IO */ |
| 142 | unsigned char io_allowed; | 142 | unsigned char io_allowed; |
| 143 | /* Used to keep track priority of this instance */ | ||
| 144 | enum v4l2_priority prio; | ||
| 145 | }; | 143 | }; |
| 146 | 144 | ||
| 147 | struct buf_config_params { | 145 | struct buf_config_params { |
diff --git a/include/media/davinci/vpfe_capture.h b/include/media/davinci/vpfe_capture.h index cc973ed845a7..288772e6900a 100644 --- a/include/media/davinci/vpfe_capture.h +++ b/include/media/davinci/vpfe_capture.h | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | #include <linux/videodev2.h> | 26 | #include <linux/videodev2.h> |
| 27 | #include <linux/clk.h> | 27 | #include <linux/clk.h> |
| 28 | #include <linux/i2c.h> | 28 | #include <linux/i2c.h> |
| 29 | #include <media/v4l2-fh.h> | ||
| 29 | #include <media/v4l2-ioctl.h> | 30 | #include <media/v4l2-ioctl.h> |
| 30 | #include <media/v4l2-device.h> | 31 | #include <media/v4l2-device.h> |
| 31 | #include <media/videobuf-dma-contig.h> | 32 | #include <media/videobuf-dma-contig.h> |
| @@ -110,8 +111,6 @@ struct vpfe_device { | |||
| 110 | struct v4l2_device v4l2_dev; | 111 | struct v4l2_device v4l2_dev; |
| 111 | /* parent device */ | 112 | /* parent device */ |
| 112 | struct device *pdev; | 113 | struct device *pdev; |
| 113 | /* Used to keep track of state of the priority */ | ||
| 114 | struct v4l2_prio_state prio; | ||
| 115 | /* number of open instances of the channel */ | 114 | /* number of open instances of the channel */ |
| 116 | u32 usrs; | 115 | u32 usrs; |
| 117 | /* Indicates id of the field which is being displayed */ | 116 | /* Indicates id of the field which is being displayed */ |
| @@ -174,11 +173,10 @@ struct vpfe_device { | |||
| 174 | 173 | ||
| 175 | /* File handle structure */ | 174 | /* File handle structure */ |
| 176 | struct vpfe_fh { | 175 | struct vpfe_fh { |
| 176 | struct v4l2_fh fh; | ||
| 177 | struct vpfe_device *vpfe_dev; | 177 | struct vpfe_device *vpfe_dev; |
| 178 | /* Indicates whether this file handle is doing IO */ | 178 | /* Indicates whether this file handle is doing IO */ |
| 179 | u8 io_allowed; | 179 | u8 io_allowed; |
| 180 | /* Used to keep track priority of this instance */ | ||
| 181 | enum v4l2_priority prio; | ||
| 182 | }; | 180 | }; |
| 183 | 181 | ||
| 184 | struct vpfe_config_params { | 182 | struct vpfe_config_params { |
diff --git a/include/media/s5p_fimc.h b/include/media/exynos-fimc.h index b975c285c8a9..aa44660e2041 100644 --- a/include/media/s5p_fimc.h +++ b/include/media/exynos-fimc.h | |||
| @@ -61,41 +61,20 @@ enum fimc_bus_type { | |||
| 61 | #define GRP_ID_FLITE (1 << 13) | 61 | #define GRP_ID_FLITE (1 << 13) |
| 62 | #define GRP_ID_FIMC_IS (1 << 14) | 62 | #define GRP_ID_FIMC_IS (1 << 14) |
| 63 | 63 | ||
| 64 | struct i2c_board_info; | ||
| 65 | |||
| 66 | /** | 64 | /** |
| 67 | * struct fimc_source_info - video source description required for the host | 65 | * struct fimc_source_info - video source description required for the host |
| 68 | * interface configuration | 66 | * interface configuration |
| 69 | * | 67 | * |
| 70 | * @board_info: pointer to I2C subdevice's board info | ||
| 71 | * @clk_frequency: frequency of the clock the host interface provides to sensor | ||
| 72 | * @fimc_bus_type: FIMC camera input type | 68 | * @fimc_bus_type: FIMC camera input type |
| 73 | * @sensor_bus_type: image sensor bus type, MIPI, ITU-R BT.601 etc. | 69 | * @sensor_bus_type: image sensor bus type, MIPI, ITU-R BT.601 etc. |
| 74 | * @flags: the parallel sensor bus flags defining signals polarity (V4L2_MBUS_*) | 70 | * @flags: the parallel sensor bus flags defining signals polarity (V4L2_MBUS_*) |
| 75 | * @i2c_bus_num: i2c control bus id the sensor is attached to | ||
| 76 | * @mux_id: FIMC camera interface multiplexer index (separate for MIPI and ITU) | 71 | * @mux_id: FIMC camera interface multiplexer index (separate for MIPI and ITU) |
| 77 | * @clk_id: index of the SoC peripheral clock for sensors | ||
| 78 | */ | 72 | */ |
| 79 | struct fimc_source_info { | 73 | struct fimc_source_info { |
| 80 | struct i2c_board_info *board_info; | ||
| 81 | unsigned long clk_frequency; | ||
| 82 | enum fimc_bus_type fimc_bus_type; | 74 | enum fimc_bus_type fimc_bus_type; |
| 83 | enum fimc_bus_type sensor_bus_type; | 75 | enum fimc_bus_type sensor_bus_type; |
| 84 | u16 flags; | 76 | u16 flags; |
| 85 | u16 i2c_bus_num; | ||
| 86 | u16 mux_id; | 77 | u16 mux_id; |
| 87 | u8 clk_id; | ||
| 88 | }; | ||
| 89 | |||
| 90 | /** | ||
| 91 | * struct s5p_platform_fimc - camera host interface platform data | ||
| 92 | * | ||
| 93 | * @source_info: properties of an image source for the host interface setup | ||
| 94 | * @num_clients: the number of attached image sources | ||
| 95 | */ | ||
| 96 | struct s5p_platform_fimc { | ||
| 97 | struct fimc_source_info *source_info; | ||
| 98 | int num_clients; | ||
| 99 | }; | 78 | }; |
| 100 | 79 | ||
| 101 | /* | 80 | /* |
diff --git a/include/media/media-device.h b/include/media/media-device.h index 12155a9596c4..6e6db78f1ee2 100644 --- a/include/media/media-device.h +++ b/include/media/media-device.h | |||
| @@ -87,7 +87,9 @@ struct media_device { | |||
| 87 | /* media_devnode to media_device */ | 87 | /* media_devnode to media_device */ |
| 88 | #define to_media_device(node) container_of(node, struct media_device, devnode) | 88 | #define to_media_device(node) container_of(node, struct media_device, devnode) |
| 89 | 89 | ||
| 90 | int __must_check media_device_register(struct media_device *mdev); | 90 | int __must_check __media_device_register(struct media_device *mdev, |
| 91 | struct module *owner); | ||
| 92 | #define media_device_register(mdev) __media_device_register(mdev, THIS_MODULE) | ||
| 91 | void media_device_unregister(struct media_device *mdev); | 93 | void media_device_unregister(struct media_device *mdev); |
| 92 | 94 | ||
| 93 | int __must_check media_device_register_entity(struct media_device *mdev, | 95 | int __must_check media_device_register_entity(struct media_device *mdev, |
diff --git a/include/media/media-devnode.h b/include/media/media-devnode.h index 3446af279fca..0dc7060f9625 100644 --- a/include/media/media-devnode.h +++ b/include/media/media-devnode.h | |||
| @@ -82,7 +82,8 @@ struct media_devnode { | |||
| 82 | /* dev to media_devnode */ | 82 | /* dev to media_devnode */ |
| 83 | #define to_media_devnode(cd) container_of(cd, struct media_devnode, dev) | 83 | #define to_media_devnode(cd) container_of(cd, struct media_devnode, dev) |
| 84 | 84 | ||
| 85 | int __must_check media_devnode_register(struct media_devnode *mdev); | 85 | int __must_check media_devnode_register(struct media_devnode *mdev, |
| 86 | struct module *owner); | ||
| 86 | void media_devnode_unregister(struct media_devnode *mdev); | 87 | void media_devnode_unregister(struct media_devnode *mdev); |
| 87 | 88 | ||
| 88 | static inline struct media_devnode *media_devnode_data(struct file *filp) | 89 | static inline struct media_devnode *media_devnode_data(struct file *filp) |
diff --git a/include/media/v4l2-device.h b/include/media/v4l2-device.h index c9b1593923f6..ffb69da3ce9e 100644 --- a/include/media/v4l2-device.h +++ b/include/media/v4l2-device.h | |||
| @@ -120,6 +120,14 @@ void v4l2_device_unregister_subdev(struct v4l2_subdev *sd); | |||
| 120 | int __must_check | 120 | int __must_check |
| 121 | v4l2_device_register_subdev_nodes(struct v4l2_device *v4l2_dev); | 121 | v4l2_device_register_subdev_nodes(struct v4l2_device *v4l2_dev); |
| 122 | 122 | ||
| 123 | /* Send a notification to v4l2_device. */ | ||
| 124 | static inline void v4l2_subdev_notify(struct v4l2_subdev *sd, | ||
| 125 | unsigned int notification, void *arg) | ||
| 126 | { | ||
| 127 | if (sd && sd->v4l2_dev && sd->v4l2_dev->notify) | ||
| 128 | sd->v4l2_dev->notify(sd, notification, arg); | ||
| 129 | } | ||
| 130 | |||
| 123 | /* Iterate over all subdevs. */ | 131 | /* Iterate over all subdevs. */ |
| 124 | #define v4l2_device_for_each_subdev(sd, v4l2_dev) \ | 132 | #define v4l2_device_for_each_subdev(sd, v4l2_dev) \ |
| 125 | list_for_each_entry(sd, &(v4l2_dev)->subdevs, list) | 133 | list_for_each_entry(sd, &(v4l2_dev)->subdevs, list) |
diff --git a/include/media/v4l2-event.h b/include/media/v4l2-event.h index be05d019de25..1ab9045e52e3 100644 --- a/include/media/v4l2-event.h +++ b/include/media/v4l2-event.h | |||
| @@ -132,4 +132,8 @@ int v4l2_event_unsubscribe(struct v4l2_fh *fh, | |||
| 132 | void v4l2_event_unsubscribe_all(struct v4l2_fh *fh); | 132 | void v4l2_event_unsubscribe_all(struct v4l2_fh *fh); |
| 133 | int v4l2_event_subdev_unsubscribe(struct v4l2_subdev *sd, struct v4l2_fh *fh, | 133 | int v4l2_event_subdev_unsubscribe(struct v4l2_subdev *sd, struct v4l2_fh *fh, |
| 134 | struct v4l2_event_subscription *sub); | 134 | struct v4l2_event_subscription *sub); |
| 135 | int v4l2_src_change_event_subscribe(struct v4l2_fh *fh, | ||
| 136 | const struct v4l2_event_subscription *sub); | ||
| 137 | int v4l2_src_change_event_subdev_subscribe(struct v4l2_subdev *sd, | ||
| 138 | struct v4l2_fh *fh, struct v4l2_event_subscription *sub); | ||
| 135 | #endif /* V4L2_EVENT_H */ | 139 | #endif /* V4L2_EVENT_H */ |
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index 28f4d8c3cf7d..9fab013eea86 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h | |||
| @@ -159,8 +159,6 @@ struct v4l2_subdev_core_ops { | |||
| 159 | int (*s_ext_ctrls)(struct v4l2_subdev *sd, struct v4l2_ext_controls *ctrls); | 159 | int (*s_ext_ctrls)(struct v4l2_subdev *sd, struct v4l2_ext_controls *ctrls); |
| 160 | int (*try_ext_ctrls)(struct v4l2_subdev *sd, struct v4l2_ext_controls *ctrls); | 160 | int (*try_ext_ctrls)(struct v4l2_subdev *sd, struct v4l2_ext_controls *ctrls); |
| 161 | int (*querymenu)(struct v4l2_subdev *sd, struct v4l2_querymenu *qm); | 161 | int (*querymenu)(struct v4l2_subdev *sd, struct v4l2_querymenu *qm); |
| 162 | int (*g_std)(struct v4l2_subdev *sd, v4l2_std_id *norm); | ||
| 163 | int (*s_std)(struct v4l2_subdev *sd, v4l2_std_id norm); | ||
| 164 | long (*ioctl)(struct v4l2_subdev *sd, unsigned int cmd, void *arg); | 162 | long (*ioctl)(struct v4l2_subdev *sd, unsigned int cmd, void *arg); |
| 165 | #ifdef CONFIG_COMPAT | 163 | #ifdef CONFIG_COMPAT |
| 166 | long (*compat_ioctl32)(struct v4l2_subdev *sd, unsigned int cmd, | 164 | long (*compat_ioctl32)(struct v4l2_subdev *sd, unsigned int cmd, |
| @@ -234,15 +232,18 @@ struct v4l2_subdev_audio_ops { | |||
| 234 | 232 | ||
| 235 | /* Indicates the @length field specifies maximum data length. */ | 233 | /* Indicates the @length field specifies maximum data length. */ |
| 236 | #define V4L2_MBUS_FRAME_DESC_FL_LEN_MAX (1U << 0) | 234 | #define V4L2_MBUS_FRAME_DESC_FL_LEN_MAX (1U << 0) |
| 237 | /* Indicates user defined data format, i.e. non standard frame format. */ | 235 | /* |
| 236 | * Indicates that the format does not have line offsets, i.e. the | ||
| 237 | * receiver should use 1D DMA. | ||
| 238 | */ | ||
| 238 | #define V4L2_MBUS_FRAME_DESC_FL_BLOB (1U << 1) | 239 | #define V4L2_MBUS_FRAME_DESC_FL_BLOB (1U << 1) |
| 239 | 240 | ||
| 240 | /** | 241 | /** |
| 241 | * struct v4l2_mbus_frame_desc_entry - media bus frame description structure | 242 | * struct v4l2_mbus_frame_desc_entry - media bus frame description structure |
| 242 | * @flags: V4L2_MBUS_FRAME_DESC_FL_* flags | 243 | * @flags: V4L2_MBUS_FRAME_DESC_FL_* flags |
| 243 | * @pixelcode: media bus pixel code, valid if FRAME_DESC_FL_BLOB is not set | 244 | * @pixelcode: media bus pixel code, valid if FRAME_DESC_FL_BLOB is not set |
| 244 | * @length: number of octets per frame, valid for compressed or unspecified | 245 | * @length: number of octets per frame, valid if V4L2_MBUS_FRAME_DESC_FL_BLOB |
| 245 | * formats | 246 | * is set |
| 246 | */ | 247 | */ |
| 247 | struct v4l2_mbus_frame_desc_entry { | 248 | struct v4l2_mbus_frame_desc_entry { |
| 248 | u16 flags; | 249 | u16 flags; |
| @@ -269,8 +270,11 @@ struct v4l2_mbus_frame_desc { | |||
| 269 | g_std_output: get current standard for video OUTPUT devices. This is ignored | 270 | g_std_output: get current standard for video OUTPUT devices. This is ignored |
| 270 | by video input devices. | 271 | by video input devices. |
| 271 | 272 | ||
| 272 | g_tvnorms_output: get v4l2_std_id with all standards supported by video | 273 | g_tvnorms: get v4l2_std_id with all standards supported by the video |
| 273 | OUTPUT device. This is ignored by video input devices. | 274 | CAPTURE device. This is ignored by video output devices. |
| 275 | |||
| 276 | g_tvnorms_output: get v4l2_std_id with all standards supported by the video | ||
| 277 | OUTPUT device. This is ignored by video capture devices. | ||
| 274 | 278 | ||
| 275 | s_crystal_freq: sets the frequency of the crystal used to generate the | 279 | s_crystal_freq: sets the frequency of the crystal used to generate the |
| 276 | clocks in Hz. An extra flags field allows device specific configuration | 280 | clocks in Hz. An extra flags field allows device specific configuration |
| @@ -310,9 +314,12 @@ struct v4l2_mbus_frame_desc { | |||
| 310 | struct v4l2_subdev_video_ops { | 314 | struct v4l2_subdev_video_ops { |
| 311 | int (*s_routing)(struct v4l2_subdev *sd, u32 input, u32 output, u32 config); | 315 | int (*s_routing)(struct v4l2_subdev *sd, u32 input, u32 output, u32 config); |
| 312 | int (*s_crystal_freq)(struct v4l2_subdev *sd, u32 freq, u32 flags); | 316 | int (*s_crystal_freq)(struct v4l2_subdev *sd, u32 freq, u32 flags); |
| 317 | int (*g_std)(struct v4l2_subdev *sd, v4l2_std_id *norm); | ||
| 318 | int (*s_std)(struct v4l2_subdev *sd, v4l2_std_id norm); | ||
| 313 | int (*s_std_output)(struct v4l2_subdev *sd, v4l2_std_id std); | 319 | int (*s_std_output)(struct v4l2_subdev *sd, v4l2_std_id std); |
| 314 | int (*g_std_output)(struct v4l2_subdev *sd, v4l2_std_id *std); | 320 | int (*g_std_output)(struct v4l2_subdev *sd, v4l2_std_id *std); |
| 315 | int (*querystd)(struct v4l2_subdev *sd, v4l2_std_id *std); | 321 | int (*querystd)(struct v4l2_subdev *sd, v4l2_std_id *std); |
| 322 | int (*g_tvnorms)(struct v4l2_subdev *sd, v4l2_std_id *std); | ||
| 316 | int (*g_tvnorms_output)(struct v4l2_subdev *sd, v4l2_std_id *std); | 323 | int (*g_tvnorms_output)(struct v4l2_subdev *sd, v4l2_std_id *std); |
| 317 | int (*g_input_status)(struct v4l2_subdev *sd, u32 *status); | 324 | int (*g_input_status)(struct v4l2_subdev *sd, u32 *status); |
| 318 | int (*s_stream)(struct v4l2_subdev *sd, int enable); | 325 | int (*s_stream)(struct v4l2_subdev *sd, int enable); |
| @@ -510,6 +517,10 @@ struct v4l2_subdev_pad_ops { | |||
| 510 | struct v4l2_subdev_selection *sel); | 517 | struct v4l2_subdev_selection *sel); |
| 511 | int (*get_edid)(struct v4l2_subdev *sd, struct v4l2_edid *edid); | 518 | int (*get_edid)(struct v4l2_subdev *sd, struct v4l2_edid *edid); |
| 512 | int (*set_edid)(struct v4l2_subdev *sd, struct v4l2_edid *edid); | 519 | int (*set_edid)(struct v4l2_subdev *sd, struct v4l2_edid *edid); |
| 520 | int (*dv_timings_cap)(struct v4l2_subdev *sd, | ||
| 521 | struct v4l2_dv_timings_cap *cap); | ||
| 522 | int (*enum_dv_timings)(struct v4l2_subdev *sd, | ||
| 523 | struct v4l2_enum_dv_timings *timings); | ||
| 513 | #ifdef CONFIG_MEDIA_CONTROLLER | 524 | #ifdef CONFIG_MEDIA_CONTROLLER |
| 514 | int (*link_validate)(struct v4l2_subdev *sd, struct media_link *link, | 525 | int (*link_validate)(struct v4l2_subdev *sd, struct media_link *link, |
| 515 | struct v4l2_subdev_format *source_fmt, | 526 | struct v4l2_subdev_format *source_fmt, |
| @@ -584,6 +595,7 @@ struct v4l2_subdev { | |||
| 584 | #endif | 595 | #endif |
| 585 | struct list_head list; | 596 | struct list_head list; |
| 586 | struct module *owner; | 597 | struct module *owner; |
| 598 | bool owner_v4l2_dev; | ||
| 587 | u32 flags; | 599 | u32 flags; |
| 588 | struct v4l2_device *v4l2_dev; | 600 | struct v4l2_device *v4l2_dev; |
| 589 | const struct v4l2_subdev_ops *ops; | 601 | const struct v4l2_subdev_ops *ops; |
| @@ -685,17 +697,12 @@ void v4l2_subdev_init(struct v4l2_subdev *sd, | |||
| 685 | /* Call an ops of a v4l2_subdev, doing the right checks against | 697 | /* Call an ops of a v4l2_subdev, doing the right checks against |
| 686 | NULL pointers. | 698 | NULL pointers. |
| 687 | 699 | ||
| 688 | Example: err = v4l2_subdev_call(sd, core, s_std, norm); | 700 | Example: err = v4l2_subdev_call(sd, video, s_std, norm); |
| 689 | */ | 701 | */ |
| 690 | #define v4l2_subdev_call(sd, o, f, args...) \ | 702 | #define v4l2_subdev_call(sd, o, f, args...) \ |
| 691 | (!(sd) ? -ENODEV : (((sd)->ops->o && (sd)->ops->o->f) ? \ | 703 | (!(sd) ? -ENODEV : (((sd)->ops->o && (sd)->ops->o->f) ? \ |
| 692 | (sd)->ops->o->f((sd) , ##args) : -ENOIOCTLCMD)) | 704 | (sd)->ops->o->f((sd) , ##args) : -ENOIOCTLCMD)) |
| 693 | 705 | ||
| 694 | /* Send a notification to v4l2_device. */ | ||
| 695 | #define v4l2_subdev_notify(sd, notification, arg) \ | ||
| 696 | ((!(sd) || !(sd)->v4l2_dev || !(sd)->v4l2_dev->notify) ? -ENODEV : \ | ||
| 697 | (sd)->v4l2_dev->notify((sd), (notification), (arg))) | ||
| 698 | |||
| 699 | #define v4l2_subdev_has_op(sd, o, f) \ | 706 | #define v4l2_subdev_has_op(sd, o, f) \ |
| 700 | ((sd)->ops->o && (sd)->ops->o->f) | 707 | ((sd)->ops->o && (sd)->ops->o->f) |
| 701 | 708 | ||
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index af4621109726..bca25dc53f9d 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | 20 | ||
| 21 | struct vb2_alloc_ctx; | 21 | struct vb2_alloc_ctx; |
| 22 | struct vb2_fileio_data; | 22 | struct vb2_fileio_data; |
| 23 | struct vb2_threadio_data; | ||
| 23 | 24 | ||
| 24 | /** | 25 | /** |
| 25 | * struct vb2_mem_ops - memory handling/memory allocator operations | 26 | * struct vb2_mem_ops - memory handling/memory allocator operations |
| @@ -323,7 +324,7 @@ struct vb2_ops { | |||
| 323 | void (*buf_cleanup)(struct vb2_buffer *vb); | 324 | void (*buf_cleanup)(struct vb2_buffer *vb); |
| 324 | 325 | ||
| 325 | int (*start_streaming)(struct vb2_queue *q, unsigned int count); | 326 | int (*start_streaming)(struct vb2_queue *q, unsigned int count); |
| 326 | int (*stop_streaming)(struct vb2_queue *q); | 327 | void (*stop_streaming)(struct vb2_queue *q); |
| 327 | 328 | ||
| 328 | void (*buf_queue)(struct vb2_buffer *vb); | 329 | void (*buf_queue)(struct vb2_buffer *vb); |
| 329 | }; | 330 | }; |
| @@ -375,6 +376,7 @@ struct v4l2_fh; | |||
| 375 | * @start_streaming_called: start_streaming() was called successfully and we | 376 | * @start_streaming_called: start_streaming() was called successfully and we |
| 376 | * started streaming. | 377 | * started streaming. |
| 377 | * @fileio: file io emulator internal data, used only if emulator is active | 378 | * @fileio: file io emulator internal data, used only if emulator is active |
| 379 | * @threadio: thread io internal data, used only if thread is active | ||
| 378 | */ | 380 | */ |
| 379 | struct vb2_queue { | 381 | struct vb2_queue { |
| 380 | enum v4l2_buf_type type; | 382 | enum v4l2_buf_type type; |
| @@ -411,6 +413,7 @@ struct vb2_queue { | |||
| 411 | unsigned int start_streaming_called:1; | 413 | unsigned int start_streaming_called:1; |
| 412 | 414 | ||
| 413 | struct vb2_fileio_data *fileio; | 415 | struct vb2_fileio_data *fileio; |
| 416 | struct vb2_threadio_data *threadio; | ||
| 414 | 417 | ||
| 415 | #ifdef CONFIG_VIDEO_ADV_DEBUG | 418 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
| 416 | /* | 419 | /* |
| @@ -461,6 +464,35 @@ size_t vb2_read(struct vb2_queue *q, char __user *data, size_t count, | |||
| 461 | loff_t *ppos, int nonblock); | 464 | loff_t *ppos, int nonblock); |
| 462 | size_t vb2_write(struct vb2_queue *q, const char __user *data, size_t count, | 465 | size_t vb2_write(struct vb2_queue *q, const char __user *data, size_t count, |
| 463 | loff_t *ppos, int nonblock); | 466 | loff_t *ppos, int nonblock); |
| 467 | /** | ||
| 468 | * vb2_thread_fnc - callback function for use with vb2_thread | ||
| 469 | * | ||
| 470 | * This is called whenever a buffer is dequeued in the thread. | ||
| 471 | */ | ||
| 472 | typedef int (*vb2_thread_fnc)(struct vb2_buffer *vb, void *priv); | ||
| 473 | |||
| 474 | /** | ||
| 475 | * vb2_thread_start() - start a thread for the given queue. | ||
| 476 | * @q: videobuf queue | ||
| 477 | * @fnc: callback function | ||
| 478 | * @priv: priv pointer passed to the callback function | ||
| 479 | * @thread_name:the name of the thread. This will be prefixed with "vb2-". | ||
| 480 | * | ||
| 481 | * This starts a thread that will queue and dequeue until an error occurs | ||
| 482 | * or @vb2_thread_stop is called. | ||
| 483 | * | ||
| 484 | * This function should not be used for anything else but the videobuf2-dvb | ||
| 485 | * support. If you think you have another good use-case for this, then please | ||
| 486 | * contact the linux-media mailinglist first. | ||
| 487 | */ | ||
| 488 | int vb2_thread_start(struct vb2_queue *q, vb2_thread_fnc fnc, void *priv, | ||
| 489 | const char *thread_name); | ||
| 490 | |||
| 491 | /** | ||
| 492 | * vb2_thread_stop() - stop the thread for the given queue. | ||
| 493 | * @q: videobuf queue | ||
| 494 | */ | ||
| 495 | int vb2_thread_stop(struct vb2_queue *q); | ||
| 464 | 496 | ||
| 465 | /** | 497 | /** |
| 466 | * vb2_is_streaming() - return streaming status of the queue | 498 | * vb2_is_streaming() - return streaming status of the queue |
| @@ -472,6 +504,23 @@ static inline bool vb2_is_streaming(struct vb2_queue *q) | |||
| 472 | } | 504 | } |
| 473 | 505 | ||
| 474 | /** | 506 | /** |
| 507 | * vb2_fileio_is_active() - return true if fileio is active. | ||
| 508 | * @q: videobuf queue | ||
| 509 | * | ||
| 510 | * This returns true if read() or write() is used to stream the data | ||
| 511 | * as opposed to stream I/O. This is almost never an important distinction, | ||
| 512 | * except in rare cases. One such case is that using read() or write() to | ||
| 513 | * stream a format using V4L2_FIELD_ALTERNATE is not allowed since there | ||
| 514 | * is no way you can pass the field information of each buffer to/from | ||
| 515 | * userspace. A driver that supports this field format should check for | ||
| 516 | * this in the queue_setup op and reject it if this function returns true. | ||
| 517 | */ | ||
| 518 | static inline bool vb2_fileio_is_active(struct vb2_queue *q) | ||
| 519 | { | ||
| 520 | return q->fileio; | ||
| 521 | } | ||
| 522 | |||
| 523 | /** | ||
| 475 | * vb2_is_busy() - return busy status of the queue | 524 | * vb2_is_busy() - return busy status of the queue |
| 476 | * @q: videobuf queue | 525 | * @q: videobuf queue |
| 477 | * | 526 | * |
diff --git a/include/media/videobuf2-dvb.h b/include/media/videobuf2-dvb.h new file mode 100644 index 000000000000..8f61456f1394 --- /dev/null +++ b/include/media/videobuf2-dvb.h | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | #ifndef _VIDEOBUF2_DVB_H_ | ||
| 2 | #define _VIDEOBUF2_DVB_H_ | ||
| 3 | |||
| 4 | #include <dvbdev.h> | ||
| 5 | #include <dmxdev.h> | ||
| 6 | #include <dvb_demux.h> | ||
| 7 | #include <dvb_net.h> | ||
| 8 | #include <dvb_frontend.h> | ||
| 9 | #include <media/videobuf2-core.h> | ||
| 10 | |||
| 11 | struct vb2_dvb { | ||
| 12 | /* filling that the job of the driver */ | ||
| 13 | char *name; | ||
| 14 | struct dvb_frontend *frontend; | ||
| 15 | struct vb2_queue dvbq; | ||
| 16 | |||
| 17 | /* video-buf-dvb state info */ | ||
| 18 | struct mutex lock; | ||
| 19 | int nfeeds; | ||
| 20 | |||
| 21 | /* vb2_dvb_(un)register manages this */ | ||
| 22 | struct dvb_demux demux; | ||
| 23 | struct dmxdev dmxdev; | ||
| 24 | struct dmx_frontend fe_hw; | ||
| 25 | struct dmx_frontend fe_mem; | ||
| 26 | struct dvb_net net; | ||
| 27 | }; | ||
| 28 | |||
| 29 | struct vb2_dvb_frontend { | ||
| 30 | struct list_head felist; | ||
| 31 | int id; | ||
| 32 | struct vb2_dvb dvb; | ||
| 33 | }; | ||
| 34 | |||
| 35 | struct vb2_dvb_frontends { | ||
| 36 | struct list_head felist; | ||
| 37 | struct mutex lock; | ||
| 38 | struct dvb_adapter adapter; | ||
| 39 | int active_fe_id; /* Indicates which frontend in the felist is in use */ | ||
| 40 | int gate; /* Frontend with gate control 0=!MFE,1=fe0,2=fe1 etc */ | ||
| 41 | }; | ||
| 42 | |||
| 43 | int vb2_dvb_register_bus(struct vb2_dvb_frontends *f, | ||
| 44 | struct module *module, | ||
| 45 | void *adapter_priv, | ||
| 46 | struct device *device, | ||
| 47 | short *adapter_nr, | ||
| 48 | int mfe_shared); | ||
| 49 | |||
| 50 | void vb2_dvb_unregister_bus(struct vb2_dvb_frontends *f); | ||
| 51 | |||
| 52 | struct vb2_dvb_frontend *vb2_dvb_alloc_frontend(struct vb2_dvb_frontends *f, int id); | ||
| 53 | void vb2_dvb_dealloc_frontends(struct vb2_dvb_frontends *f); | ||
| 54 | |||
| 55 | struct vb2_dvb_frontend *vb2_dvb_get_frontend(struct vb2_dvb_frontends *f, int id); | ||
| 56 | int vb2_dvb_find_frontend(struct vb2_dvb_frontends *f, struct dvb_frontend *p); | ||
| 57 | |||
| 58 | #endif /* _VIDEOBUF2_DVB_H_ */ | ||
diff --git a/include/uapi/linux/v4l2-common.h b/include/uapi/linux/v4l2-common.h index 9bf508ad0957..2f6f8cafe773 100644 --- a/include/uapi/linux/v4l2-common.h +++ b/include/uapi/linux/v4l2-common.h | |||
| @@ -75,7 +75,7 @@ struct v4l2_edid { | |||
| 75 | __u32 start_block; | 75 | __u32 start_block; |
| 76 | __u32 blocks; | 76 | __u32 blocks; |
| 77 | __u32 reserved[5]; | 77 | __u32 reserved[5]; |
| 78 | __u8 __user *edid; | 78 | __u8 *edid; |
| 79 | }; | 79 | }; |
| 80 | 80 | ||
| 81 | #endif /* __V4L2_COMMON__ */ | 81 | #endif /* __V4L2_COMMON__ */ |
diff --git a/include/uapi/linux/v4l2-dv-timings.h b/include/uapi/linux/v4l2-dv-timings.h index b6a5fe00a470..6c8f159e416e 100644 --- a/include/uapi/linux/v4l2-dv-timings.h +++ b/include/uapi/linux/v4l2-dv-timings.h | |||
| @@ -173,6 +173,76 @@ | |||
| 173 | V4L2_DV_FL_CAN_REDUCE_FPS) \ | 173 | V4L2_DV_FL_CAN_REDUCE_FPS) \ |
| 174 | } | 174 | } |
| 175 | 175 | ||
| 176 | #define V4L2_DV_BT_CEA_3840X2160P24 { \ | ||
| 177 | .type = V4L2_DV_BT_656_1120, \ | ||
| 178 | V4L2_INIT_BT_TIMINGS(3840, 2160, 0, V4L2_DV_HSYNC_POS_POL, \ | ||
| 179 | 297000000, 1276, 88, 296, 8, 10, 72, 0, 0, 0, \ | ||
| 180 | V4L2_DV_BT_STD_CEA861, V4L2_DV_FL_CAN_REDUCE_FPS) \ | ||
| 181 | } | ||
| 182 | |||
| 183 | #define V4L2_DV_BT_CEA_3840X2160P25 { \ | ||
| 184 | .type = V4L2_DV_BT_656_1120, \ | ||
| 185 | V4L2_INIT_BT_TIMINGS(3840, 2160, 0, V4L2_DV_HSYNC_POS_POL, \ | ||
| 186 | 297000000, 1056, 88, 296, 8, 10, 72, 0, 0, 0, \ | ||
| 187 | V4L2_DV_BT_STD_CEA861, 0) \ | ||
| 188 | } | ||
| 189 | |||
| 190 | #define V4L2_DV_BT_CEA_3840X2160P30 { \ | ||
| 191 | .type = V4L2_DV_BT_656_1120, \ | ||
| 192 | V4L2_INIT_BT_TIMINGS(3840, 2160, 0, V4L2_DV_HSYNC_POS_POL, \ | ||
| 193 | 297000000, 176, 88, 296, 8, 10, 72, 0, 0, 0, \ | ||
| 194 | V4L2_DV_BT_STD_CEA861, V4L2_DV_FL_CAN_REDUCE_FPS) \ | ||
| 195 | } | ||
| 196 | |||
| 197 | #define V4L2_DV_BT_CEA_3840X2160P50 { \ | ||
| 198 | .type = V4L2_DV_BT_656_1120, \ | ||
| 199 | V4L2_INIT_BT_TIMINGS(3840, 2160, 0, V4L2_DV_HSYNC_POS_POL, \ | ||
| 200 | 594000000, 1056, 88, 296, 8, 10, 72, 0, 0, 0, \ | ||
| 201 | V4L2_DV_BT_STD_CEA861, 0) \ | ||
| 202 | } | ||
| 203 | |||
| 204 | #define V4L2_DV_BT_CEA_3840X2160P60 { \ | ||
| 205 | .type = V4L2_DV_BT_656_1120, \ | ||
| 206 | V4L2_INIT_BT_TIMINGS(3840, 2160, 0, V4L2_DV_HSYNC_POS_POL, \ | ||
| 207 | 594000000, 176, 88, 296, 8, 10, 72, 0, 0, 0, \ | ||
| 208 | V4L2_DV_BT_STD_CEA861, V4L2_DV_FL_CAN_REDUCE_FPS) \ | ||
| 209 | } | ||
| 210 | |||
| 211 | #define V4L2_DV_BT_CEA_4096X2160P24 { \ | ||
| 212 | .type = V4L2_DV_BT_656_1120, \ | ||
| 213 | V4L2_INIT_BT_TIMINGS(4096, 2160, 0, V4L2_DV_HSYNC_POS_POL, \ | ||
| 214 | 297000000, 1020, 88, 296, 8, 10, 72, 0, 0, 0, \ | ||
| 215 | V4L2_DV_BT_STD_CEA861, V4L2_DV_FL_CAN_REDUCE_FPS) \ | ||
| 216 | } | ||
| 217 | |||
| 218 | #define V4L2_DV_BT_CEA_4096X2160P25 { \ | ||
| 219 | .type = V4L2_DV_BT_656_1120, \ | ||
| 220 | V4L2_INIT_BT_TIMINGS(4096, 2160, 0, V4L2_DV_HSYNC_POS_POL, \ | ||
| 221 | 297000000, 968, 88, 128, 8, 10, 72, 0, 0, 0, \ | ||
| 222 | V4L2_DV_BT_STD_CEA861, 0) \ | ||
| 223 | } | ||
| 224 | |||
| 225 | #define V4L2_DV_BT_CEA_4096X2160P30 { \ | ||
| 226 | .type = V4L2_DV_BT_656_1120, \ | ||
| 227 | V4L2_INIT_BT_TIMINGS(4096, 2160, 0, V4L2_DV_HSYNC_POS_POL, \ | ||
| 228 | 297000000, 88, 88, 128, 8, 10, 72, 0, 0, 0, \ | ||
| 229 | V4L2_DV_BT_STD_CEA861, V4L2_DV_FL_CAN_REDUCE_FPS) \ | ||
| 230 | } | ||
| 231 | |||
| 232 | #define V4L2_DV_BT_CEA_4096X2160P50 { \ | ||
| 233 | .type = V4L2_DV_BT_656_1120, \ | ||
| 234 | V4L2_INIT_BT_TIMINGS(4096, 2160, 0, V4L2_DV_HSYNC_POS_POL, \ | ||
| 235 | 594000000, 968, 88, 128, 8, 10, 72, 0, 0, 0, \ | ||
| 236 | V4L2_DV_BT_STD_CEA861, 0) \ | ||
| 237 | } | ||
| 238 | |||
| 239 | #define V4L2_DV_BT_CEA_4096X2160P60 { \ | ||
| 240 | .type = V4L2_DV_BT_656_1120, \ | ||
| 241 | V4L2_INIT_BT_TIMINGS(4096, 2160, 0, V4L2_DV_HSYNC_POS_POL, \ | ||
| 242 | 594000000, 88, 88, 128, 8, 10, 72, 0, 0, 0, \ | ||
| 243 | V4L2_DV_BT_STD_CEA861, V4L2_DV_FL_CAN_REDUCE_FPS) \ | ||
| 244 | } | ||
| 245 | |||
| 176 | 246 | ||
| 177 | /* VESA Discrete Monitor Timings as per version 1.0, revision 12 */ | 247 | /* VESA Discrete Monitor Timings as per version 1.0, revision 12 */ |
| 178 | 248 | ||
diff --git a/include/uapi/linux/v4l2-mediabus.h b/include/uapi/linux/v4l2-mediabus.h index b5c3aab6e82c..1445e858854f 100644 --- a/include/uapi/linux/v4l2-mediabus.h +++ b/include/uapi/linux/v4l2-mediabus.h | |||
| @@ -52,7 +52,7 @@ enum v4l2_mbus_pixelcode { | |||
| 52 | V4L2_MBUS_FMT_RGB888_2X12_LE = 0x100c, | 52 | V4L2_MBUS_FMT_RGB888_2X12_LE = 0x100c, |
| 53 | V4L2_MBUS_FMT_ARGB8888_1X32 = 0x100d, | 53 | V4L2_MBUS_FMT_ARGB8888_1X32 = 0x100d, |
| 54 | 54 | ||
| 55 | /* YUV (including grey) - next is 0x2018 */ | 55 | /* YUV (including grey) - next is 0x2024 */ |
| 56 | V4L2_MBUS_FMT_Y8_1X8 = 0x2001, | 56 | V4L2_MBUS_FMT_Y8_1X8 = 0x2001, |
| 57 | V4L2_MBUS_FMT_UV8_1X8 = 0x2015, | 57 | V4L2_MBUS_FMT_UV8_1X8 = 0x2015, |
| 58 | V4L2_MBUS_FMT_UYVY8_1_5X8 = 0x2002, | 58 | V4L2_MBUS_FMT_UYVY8_1_5X8 = 0x2002, |
| @@ -64,6 +64,8 @@ enum v4l2_mbus_pixelcode { | |||
| 64 | V4L2_MBUS_FMT_YUYV8_2X8 = 0x2008, | 64 | V4L2_MBUS_FMT_YUYV8_2X8 = 0x2008, |
| 65 | V4L2_MBUS_FMT_YVYU8_2X8 = 0x2009, | 65 | V4L2_MBUS_FMT_YVYU8_2X8 = 0x2009, |
| 66 | V4L2_MBUS_FMT_Y10_1X10 = 0x200a, | 66 | V4L2_MBUS_FMT_Y10_1X10 = 0x200a, |
| 67 | V4L2_MBUS_FMT_UYVY10_2X10 = 0x2018, | ||
| 68 | V4L2_MBUS_FMT_VYUY10_2X10 = 0x2019, | ||
| 67 | V4L2_MBUS_FMT_YUYV10_2X10 = 0x200b, | 69 | V4L2_MBUS_FMT_YUYV10_2X10 = 0x200b, |
| 68 | V4L2_MBUS_FMT_YVYU10_2X10 = 0x200c, | 70 | V4L2_MBUS_FMT_YVYU10_2X10 = 0x200c, |
| 69 | V4L2_MBUS_FMT_Y12_1X12 = 0x2013, | 71 | V4L2_MBUS_FMT_Y12_1X12 = 0x2013, |
| @@ -72,10 +74,20 @@ enum v4l2_mbus_pixelcode { | |||
| 72 | V4L2_MBUS_FMT_YUYV8_1X16 = 0x2011, | 74 | V4L2_MBUS_FMT_YUYV8_1X16 = 0x2011, |
| 73 | V4L2_MBUS_FMT_YVYU8_1X16 = 0x2012, | 75 | V4L2_MBUS_FMT_YVYU8_1X16 = 0x2012, |
| 74 | V4L2_MBUS_FMT_YDYUYDYV8_1X16 = 0x2014, | 76 | V4L2_MBUS_FMT_YDYUYDYV8_1X16 = 0x2014, |
| 77 | V4L2_MBUS_FMT_UYVY10_1X20 = 0x201a, | ||
| 78 | V4L2_MBUS_FMT_VYUY10_1X20 = 0x201b, | ||
| 75 | V4L2_MBUS_FMT_YUYV10_1X20 = 0x200d, | 79 | V4L2_MBUS_FMT_YUYV10_1X20 = 0x200d, |
| 76 | V4L2_MBUS_FMT_YVYU10_1X20 = 0x200e, | 80 | V4L2_MBUS_FMT_YVYU10_1X20 = 0x200e, |
| 77 | V4L2_MBUS_FMT_YUV10_1X30 = 0x2016, | 81 | V4L2_MBUS_FMT_YUV10_1X30 = 0x2016, |
| 78 | V4L2_MBUS_FMT_AYUV8_1X32 = 0x2017, | 82 | V4L2_MBUS_FMT_AYUV8_1X32 = 0x2017, |
| 83 | V4L2_MBUS_FMT_UYVY12_2X12 = 0x201c, | ||
| 84 | V4L2_MBUS_FMT_VYUY12_2X12 = 0x201d, | ||
| 85 | V4L2_MBUS_FMT_YUYV12_2X12 = 0x201e, | ||
| 86 | V4L2_MBUS_FMT_YVYU12_2X12 = 0x201f, | ||
| 87 | V4L2_MBUS_FMT_UYVY12_1X24 = 0x2020, | ||
| 88 | V4L2_MBUS_FMT_VYUY12_1X24 = 0x2021, | ||
| 89 | V4L2_MBUS_FMT_YUYV12_1X24 = 0x2022, | ||
| 90 | V4L2_MBUS_FMT_YVYU12_1X24 = 0x2023, | ||
| 79 | 91 | ||
| 80 | /* Bayer - next is 0x3019 */ | 92 | /* Bayer - next is 0x3019 */ |
| 81 | V4L2_MBUS_FMT_SBGGR8_1X8 = 0x3001, | 93 | V4L2_MBUS_FMT_SBGGR8_1X8 = 0x3001, |
diff --git a/include/uapi/linux/v4l2-subdev.h b/include/uapi/linux/v4l2-subdev.h index 87e05159f637..a619cdd300ac 100644 --- a/include/uapi/linux/v4l2-subdev.h +++ b/include/uapi/linux/v4l2-subdev.h | |||
| @@ -151,26 +151,24 @@ struct v4l2_subdev_selection { | |||
| 151 | /* Backwards compatibility define --- to be removed */ | 151 | /* Backwards compatibility define --- to be removed */ |
| 152 | #define v4l2_subdev_edid v4l2_edid | 152 | #define v4l2_subdev_edid v4l2_edid |
| 153 | 153 | ||
| 154 | #define VIDIOC_SUBDEV_G_FMT _IOWR('V', 4, struct v4l2_subdev_format) | 154 | #define VIDIOC_SUBDEV_G_FMT _IOWR('V', 4, struct v4l2_subdev_format) |
| 155 | #define VIDIOC_SUBDEV_S_FMT _IOWR('V', 5, struct v4l2_subdev_format) | 155 | #define VIDIOC_SUBDEV_S_FMT _IOWR('V', 5, struct v4l2_subdev_format) |
| 156 | #define VIDIOC_SUBDEV_G_FRAME_INTERVAL \ | 156 | #define VIDIOC_SUBDEV_G_FRAME_INTERVAL _IOWR('V', 21, struct v4l2_subdev_frame_interval) |
| 157 | _IOWR('V', 21, struct v4l2_subdev_frame_interval) | 157 | #define VIDIOC_SUBDEV_S_FRAME_INTERVAL _IOWR('V', 22, struct v4l2_subdev_frame_interval) |
| 158 | #define VIDIOC_SUBDEV_S_FRAME_INTERVAL \ | 158 | #define VIDIOC_SUBDEV_ENUM_MBUS_CODE _IOWR('V', 2, struct v4l2_subdev_mbus_code_enum) |
| 159 | _IOWR('V', 22, struct v4l2_subdev_frame_interval) | 159 | #define VIDIOC_SUBDEV_ENUM_FRAME_SIZE _IOWR('V', 74, struct v4l2_subdev_frame_size_enum) |
| 160 | #define VIDIOC_SUBDEV_ENUM_MBUS_CODE \ | 160 | #define VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL _IOWR('V', 75, struct v4l2_subdev_frame_interval_enum) |
| 161 | _IOWR('V', 2, struct v4l2_subdev_mbus_code_enum) | 161 | #define VIDIOC_SUBDEV_G_CROP _IOWR('V', 59, struct v4l2_subdev_crop) |
| 162 | #define VIDIOC_SUBDEV_ENUM_FRAME_SIZE \ | 162 | #define VIDIOC_SUBDEV_S_CROP _IOWR('V', 60, struct v4l2_subdev_crop) |
| 163 | _IOWR('V', 74, struct v4l2_subdev_frame_size_enum) | 163 | #define VIDIOC_SUBDEV_G_SELECTION _IOWR('V', 61, struct v4l2_subdev_selection) |
| 164 | #define VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL \ | 164 | #define VIDIOC_SUBDEV_S_SELECTION _IOWR('V', 62, struct v4l2_subdev_selection) |
| 165 | _IOWR('V', 75, struct v4l2_subdev_frame_interval_enum) | 165 | /* The following ioctls are identical to the ioctls in videodev2.h */ |
| 166 | #define VIDIOC_SUBDEV_G_CROP _IOWR('V', 59, struct v4l2_subdev_crop) | 166 | #define VIDIOC_SUBDEV_G_EDID _IOWR('V', 40, struct v4l2_edid) |
| 167 | #define VIDIOC_SUBDEV_S_CROP _IOWR('V', 60, struct v4l2_subdev_crop) | 167 | #define VIDIOC_SUBDEV_S_EDID _IOWR('V', 41, struct v4l2_edid) |
| 168 | #define VIDIOC_SUBDEV_G_SELECTION \ | 168 | #define VIDIOC_SUBDEV_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings) |
| 169 | _IOWR('V', 61, struct v4l2_subdev_selection) | 169 | #define VIDIOC_SUBDEV_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings) |
| 170 | #define VIDIOC_SUBDEV_S_SELECTION \ | 170 | #define VIDIOC_SUBDEV_ENUM_DV_TIMINGS _IOWR('V', 98, struct v4l2_enum_dv_timings) |
| 171 | _IOWR('V', 62, struct v4l2_subdev_selection) | 171 | #define VIDIOC_SUBDEV_QUERY_DV_TIMINGS _IOR('V', 99, struct v4l2_dv_timings) |
| 172 | /* These two G/S_EDID ioctls are identical to the ioctls in videodev2.h */ | 172 | #define VIDIOC_SUBDEV_DV_TIMINGS_CAP _IOWR('V', 100, struct v4l2_dv_timings_cap) |
| 173 | #define VIDIOC_SUBDEV_G_EDID _IOWR('V', 40, struct v4l2_edid) | ||
| 174 | #define VIDIOC_SUBDEV_S_EDID _IOWR('V', 41, struct v4l2_edid) | ||
| 175 | 173 | ||
| 176 | #endif | 174 | #endif |
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index ea468ee8fe21..168ff507bf75 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h | |||
| @@ -649,7 +649,6 @@ struct v4l2_plane { | |||
| 649 | * @length: size in bytes of the buffer (NOT its payload) for single-plane | 649 | * @length: size in bytes of the buffer (NOT its payload) for single-plane |
| 650 | * buffers (when type != *_MPLANE); number of elements in the | 650 | * buffers (when type != *_MPLANE); number of elements in the |
| 651 | * planes array for multi-plane buffers | 651 | * planes array for multi-plane buffers |
| 652 | * @input: input number from which the video data has has been captured | ||
| 653 | * | 652 | * |
| 654 | * Contains data exchanged by application and driver using one of the Streaming | 653 | * Contains data exchanged by application and driver using one of the Streaming |
| 655 | * I/O methods. | 654 | * I/O methods. |
| @@ -1107,12 +1106,15 @@ struct v4l2_dv_timings { | |||
| 1107 | 1106 | ||
| 1108 | /** struct v4l2_enum_dv_timings - DV timings enumeration | 1107 | /** struct v4l2_enum_dv_timings - DV timings enumeration |
| 1109 | * @index: enumeration index | 1108 | * @index: enumeration index |
| 1109 | * @pad: the pad number for which to enumerate timings (used with | ||
| 1110 | * v4l-subdev nodes only) | ||
| 1110 | * @reserved: must be zeroed | 1111 | * @reserved: must be zeroed |
| 1111 | * @timings: the timings for the given index | 1112 | * @timings: the timings for the given index |
| 1112 | */ | 1113 | */ |
| 1113 | struct v4l2_enum_dv_timings { | 1114 | struct v4l2_enum_dv_timings { |
| 1114 | __u32 index; | 1115 | __u32 index; |
| 1115 | __u32 reserved[3]; | 1116 | __u32 pad; |
| 1117 | __u32 reserved[2]; | ||
| 1116 | struct v4l2_dv_timings timings; | 1118 | struct v4l2_dv_timings timings; |
| 1117 | }; | 1119 | }; |
| 1118 | 1120 | ||
| @@ -1150,11 +1152,14 @@ struct v4l2_bt_timings_cap { | |||
| 1150 | 1152 | ||
| 1151 | /** struct v4l2_dv_timings_cap - DV timings capabilities | 1153 | /** struct v4l2_dv_timings_cap - DV timings capabilities |
| 1152 | * @type: the type of the timings (same as in struct v4l2_dv_timings) | 1154 | * @type: the type of the timings (same as in struct v4l2_dv_timings) |
| 1155 | * @pad: the pad number for which to query capabilities (used with | ||
| 1156 | * v4l-subdev nodes only) | ||
| 1153 | * @bt: the BT656/1120 timings capabilities | 1157 | * @bt: the BT656/1120 timings capabilities |
| 1154 | */ | 1158 | */ |
| 1155 | struct v4l2_dv_timings_cap { | 1159 | struct v4l2_dv_timings_cap { |
| 1156 | __u32 type; | 1160 | __u32 type; |
| 1157 | __u32 reserved[3]; | 1161 | __u32 pad; |
| 1162 | __u32 reserved[2]; | ||
| 1158 | union { | 1163 | union { |
| 1159 | struct v4l2_bt_timings_cap bt; | 1164 | struct v4l2_bt_timings_cap bt; |
| 1160 | __u32 raw_data[32]; | 1165 | __u32 raw_data[32]; |
| @@ -1765,6 +1770,7 @@ struct v4l2_streamparm { | |||
| 1765 | #define V4L2_EVENT_EOS 2 | 1770 | #define V4L2_EVENT_EOS 2 |
| 1766 | #define V4L2_EVENT_CTRL 3 | 1771 | #define V4L2_EVENT_CTRL 3 |
| 1767 | #define V4L2_EVENT_FRAME_SYNC 4 | 1772 | #define V4L2_EVENT_FRAME_SYNC 4 |
| 1773 | #define V4L2_EVENT_SOURCE_CHANGE 5 | ||
| 1768 | #define V4L2_EVENT_PRIVATE_START 0x08000000 | 1774 | #define V4L2_EVENT_PRIVATE_START 0x08000000 |
| 1769 | 1775 | ||
| 1770 | /* Payload for V4L2_EVENT_VSYNC */ | 1776 | /* Payload for V4L2_EVENT_VSYNC */ |
| @@ -1796,12 +1802,19 @@ struct v4l2_event_frame_sync { | |||
| 1796 | __u32 frame_sequence; | 1802 | __u32 frame_sequence; |
| 1797 | }; | 1803 | }; |
| 1798 | 1804 | ||
| 1805 | #define V4L2_EVENT_SRC_CH_RESOLUTION (1 << 0) | ||
| 1806 | |||
| 1807 | struct v4l2_event_src_change { | ||
| 1808 | __u32 changes; | ||
| 1809 | }; | ||
| 1810 | |||
| 1799 | struct v4l2_event { | 1811 | struct v4l2_event { |
| 1800 | __u32 type; | 1812 | __u32 type; |
| 1801 | union { | 1813 | union { |
| 1802 | struct v4l2_event_vsync vsync; | 1814 | struct v4l2_event_vsync vsync; |
| 1803 | struct v4l2_event_ctrl ctrl; | 1815 | struct v4l2_event_ctrl ctrl; |
| 1804 | struct v4l2_event_frame_sync frame_sync; | 1816 | struct v4l2_event_frame_sync frame_sync; |
| 1817 | struct v4l2_event_src_change src_change; | ||
| 1805 | __u8 data[64]; | 1818 | __u8 data[64]; |
| 1806 | } u; | 1819 | } u; |
| 1807 | __u32 pending; | 1820 | __u32 pending; |
