summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/hdmi.h37
-rw-r--r--include/linux/platform_data/vsp1.h27
-rw-r--r--include/media/smiapp.h10
-rw-r--r--include/media/tea575x.h5
-rw-r--r--include/media/v4l2-dev.h3
-rw-r--r--include/media/v4l2-ioctl.h15
-rw-r--r--include/media/v4l2-subdev.h6
-rw-r--r--include/media/videobuf-dma-sg.h8
-rw-r--r--include/media/videobuf-dvb.h6
-rw-r--r--include/uapi/linux/Kbuild1
-rw-r--r--include/uapi/linux/am437x-vpfe.h122
-rw-r--r--include/uapi/linux/v4l2-controls.h4
-rw-r--r--include/uapi/linux/videodev2.h17
13 files changed, 195 insertions, 66 deletions
diff --git a/include/linux/hdmi.h b/include/linux/hdmi.h
index cbb5790a35cd..e9744202fa29 100644
--- a/include/linux/hdmi.h
+++ b/include/linux/hdmi.h
@@ -25,6 +25,7 @@
25#define __LINUX_HDMI_H_ 25#define __LINUX_HDMI_H_
26 26
27#include <linux/types.h> 27#include <linux/types.h>
28#include <linux/device.h>
28 29
29enum hdmi_infoframe_type { 30enum hdmi_infoframe_type {
30 HDMI_INFOFRAME_TYPE_VENDOR = 0x81, 31 HDMI_INFOFRAME_TYPE_VENDOR = 0x81,
@@ -52,12 +53,18 @@ enum hdmi_colorspace {
52 HDMI_COLORSPACE_RGB, 53 HDMI_COLORSPACE_RGB,
53 HDMI_COLORSPACE_YUV422, 54 HDMI_COLORSPACE_YUV422,
54 HDMI_COLORSPACE_YUV444, 55 HDMI_COLORSPACE_YUV444,
56 HDMI_COLORSPACE_YUV420,
57 HDMI_COLORSPACE_RESERVED4,
58 HDMI_COLORSPACE_RESERVED5,
59 HDMI_COLORSPACE_RESERVED6,
60 HDMI_COLORSPACE_IDO_DEFINED,
55}; 61};
56 62
57enum hdmi_scan_mode { 63enum hdmi_scan_mode {
58 HDMI_SCAN_MODE_NONE, 64 HDMI_SCAN_MODE_NONE,
59 HDMI_SCAN_MODE_OVERSCAN, 65 HDMI_SCAN_MODE_OVERSCAN,
60 HDMI_SCAN_MODE_UNDERSCAN, 66 HDMI_SCAN_MODE_UNDERSCAN,
67 HDMI_SCAN_MODE_RESERVED,
61}; 68};
62 69
63enum hdmi_colorimetry { 70enum hdmi_colorimetry {
@@ -71,6 +78,7 @@ enum hdmi_picture_aspect {
71 HDMI_PICTURE_ASPECT_NONE, 78 HDMI_PICTURE_ASPECT_NONE,
72 HDMI_PICTURE_ASPECT_4_3, 79 HDMI_PICTURE_ASPECT_4_3,
73 HDMI_PICTURE_ASPECT_16_9, 80 HDMI_PICTURE_ASPECT_16_9,
81 HDMI_PICTURE_ASPECT_RESERVED,
74}; 82};
75 83
76enum hdmi_active_aspect { 84enum hdmi_active_aspect {
@@ -92,12 +100,18 @@ enum hdmi_extended_colorimetry {
92 HDMI_EXTENDED_COLORIMETRY_S_YCC_601, 100 HDMI_EXTENDED_COLORIMETRY_S_YCC_601,
93 HDMI_EXTENDED_COLORIMETRY_ADOBE_YCC_601, 101 HDMI_EXTENDED_COLORIMETRY_ADOBE_YCC_601,
94 HDMI_EXTENDED_COLORIMETRY_ADOBE_RGB, 102 HDMI_EXTENDED_COLORIMETRY_ADOBE_RGB,
103
104 /* The following EC values are only defined in CEA-861-F. */
105 HDMI_EXTENDED_COLORIMETRY_BT2020_CONST_LUM,
106 HDMI_EXTENDED_COLORIMETRY_BT2020,
107 HDMI_EXTENDED_COLORIMETRY_RESERVED,
95}; 108};
96 109
97enum hdmi_quantization_range { 110enum hdmi_quantization_range {
98 HDMI_QUANTIZATION_RANGE_DEFAULT, 111 HDMI_QUANTIZATION_RANGE_DEFAULT,
99 HDMI_QUANTIZATION_RANGE_LIMITED, 112 HDMI_QUANTIZATION_RANGE_LIMITED,
100 HDMI_QUANTIZATION_RANGE_FULL, 113 HDMI_QUANTIZATION_RANGE_FULL,
114 HDMI_QUANTIZATION_RANGE_RESERVED,
101}; 115};
102 116
103/* non-uniform picture scaling */ 117/* non-uniform picture scaling */
@@ -114,7 +128,7 @@ enum hdmi_ycc_quantization_range {
114}; 128};
115 129
116enum hdmi_content_type { 130enum hdmi_content_type {
117 HDMI_CONTENT_TYPE_NONE, 131 HDMI_CONTENT_TYPE_GRAPHICS,
118 HDMI_CONTENT_TYPE_PHOTO, 132 HDMI_CONTENT_TYPE_PHOTO,
119 HDMI_CONTENT_TYPE_CINEMA, 133 HDMI_CONTENT_TYPE_CINEMA,
120 HDMI_CONTENT_TYPE_GAME, 134 HDMI_CONTENT_TYPE_GAME,
@@ -194,6 +208,7 @@ enum hdmi_audio_coding_type {
194 HDMI_AUDIO_CODING_TYPE_MLP, 208 HDMI_AUDIO_CODING_TYPE_MLP,
195 HDMI_AUDIO_CODING_TYPE_DST, 209 HDMI_AUDIO_CODING_TYPE_DST,
196 HDMI_AUDIO_CODING_TYPE_WMA_PRO, 210 HDMI_AUDIO_CODING_TYPE_WMA_PRO,
211 HDMI_AUDIO_CODING_TYPE_CXT,
197}; 212};
198 213
199enum hdmi_audio_sample_size { 214enum hdmi_audio_sample_size {
@@ -215,10 +230,25 @@ enum hdmi_audio_sample_frequency {
215}; 230};
216 231
217enum hdmi_audio_coding_type_ext { 232enum hdmi_audio_coding_type_ext {
218 HDMI_AUDIO_CODING_TYPE_EXT_STREAM, 233 /* Refer to Audio Coding Type (CT) field in Data Byte 1 */
234 HDMI_AUDIO_CODING_TYPE_EXT_CT,
235
236 /*
237 * The next three CXT values are defined in CEA-861-E only.
238 * They do not exist in older versions, and in CEA-861-F they are
239 * defined as 'Not in use'.
240 */
219 HDMI_AUDIO_CODING_TYPE_EXT_HE_AAC, 241 HDMI_AUDIO_CODING_TYPE_EXT_HE_AAC,
220 HDMI_AUDIO_CODING_TYPE_EXT_HE_AAC_V2, 242 HDMI_AUDIO_CODING_TYPE_EXT_HE_AAC_V2,
221 HDMI_AUDIO_CODING_TYPE_EXT_MPEG_SURROUND, 243 HDMI_AUDIO_CODING_TYPE_EXT_MPEG_SURROUND,
244
245 /* The following CXT values are only defined in CEA-861-F. */
246 HDMI_AUDIO_CODING_TYPE_EXT_MPEG4_HE_AAC,
247 HDMI_AUDIO_CODING_TYPE_EXT_MPEG4_HE_AAC_V2,
248 HDMI_AUDIO_CODING_TYPE_EXT_MPEG4_AAC_LC,
249 HDMI_AUDIO_CODING_TYPE_EXT_DRA,
250 HDMI_AUDIO_CODING_TYPE_EXT_MPEG4_HE_AAC_SURROUND,
251 HDMI_AUDIO_CODING_TYPE_EXT_MPEG4_AAC_LC_SURROUND = 10,
222}; 252};
223 253
224struct hdmi_audio_infoframe { 254struct hdmi_audio_infoframe {
@@ -299,5 +329,8 @@ union hdmi_infoframe {
299 329
300ssize_t 330ssize_t
301hdmi_infoframe_pack(union hdmi_infoframe *frame, void *buffer, size_t size); 331hdmi_infoframe_pack(union hdmi_infoframe *frame, void *buffer, size_t size);
332int hdmi_infoframe_unpack(union hdmi_infoframe *frame, void *buffer);
333void hdmi_infoframe_log(const char *level, struct device *dev,
334 union hdmi_infoframe *frame);
302 335
303#endif /* _DRM_HDMI_H */ 336#endif /* _DRM_HDMI_H */
diff --git a/include/linux/platform_data/vsp1.h b/include/linux/platform_data/vsp1.h
deleted file mode 100644
index 63170e2614b3..000000000000
--- a/include/linux/platform_data/vsp1.h
+++ /dev/null
@@ -1,27 +0,0 @@
1/*
2 * vsp1.h -- R-Car VSP1 Platform Data
3 *
4 * Copyright (C) 2013 Renesas Corporation
5 *
6 * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 */
13#ifndef __PLATFORM_VSP1_H__
14#define __PLATFORM_VSP1_H__
15
16#define VSP1_HAS_LIF (1 << 0)
17#define VSP1_HAS_LUT (1 << 1)
18#define VSP1_HAS_SRU (1 << 2)
19
20struct vsp1_platform_data {
21 unsigned int features;
22 unsigned int rpf_count;
23 unsigned int uds_count;
24 unsigned int wpf_count;
25};
26
27#endif /* __PLATFORM_VSP1_H__ */
diff --git a/include/media/smiapp.h b/include/media/smiapp.h
index 0b8f124a630c..268a3cdbf6cb 100644
--- a/include/media/smiapp.h
+++ b/include/media/smiapp.h
@@ -65,19 +65,19 @@ struct smiapp_platform_data {
65 unsigned short i2c_addr_dfl; /* Default i2c addr */ 65 unsigned short i2c_addr_dfl; /* Default i2c addr */
66 unsigned short i2c_addr_alt; /* Alternate i2c addr */ 66 unsigned short i2c_addr_alt; /* Alternate i2c addr */
67 67
68 unsigned int nvm_size; /* bytes */ 68 uint32_t nvm_size; /* bytes */
69 unsigned int ext_clk; /* sensor external clk */ 69 uint32_t ext_clk; /* sensor external clk */
70 70
71 unsigned int lanes; /* Number of CSI-2 lanes */ 71 unsigned int lanes; /* Number of CSI-2 lanes */
72 u8 csi_signalling_mode; /* SMIAPP_CSI_SIGNALLING_MODE_* */ 72 uint32_t csi_signalling_mode; /* SMIAPP_CSI_SIGNALLING_MODE_* */
73 const s64 *op_sys_clock; 73 uint64_t *op_sys_clock;
74 74
75 enum smiapp_module_board_orient module_board_orient; 75 enum smiapp_module_board_orient module_board_orient;
76 76
77 struct smiapp_flash_strobe_parms *strobe_setup; 77 struct smiapp_flash_strobe_parms *strobe_setup;
78 78
79 int (*set_xclk)(struct v4l2_subdev *sd, int hz); 79 int (*set_xclk)(struct v4l2_subdev *sd, int hz);
80 int xshutdown; /* gpio or SMIAPP_NO_XSHUTDOWN */ 80 int32_t xshutdown; /* gpio or SMIAPP_NO_XSHUTDOWN */
81}; 81};
82 82
83#endif /* __SMIAPP_H_ */ 83#endif /* __SMIAPP_H_ */
diff --git a/include/media/tea575x.h b/include/media/tea575x.h
index 2d4fa59db902..5d096578b736 100644
--- a/include/media/tea575x.h
+++ b/include/media/tea575x.h
@@ -71,6 +71,11 @@ struct snd_tea575x {
71 int (*ext_init)(struct snd_tea575x *tea); 71 int (*ext_init)(struct snd_tea575x *tea);
72}; 72};
73 73
74int snd_tea575x_enum_freq_bands(struct snd_tea575x *tea,
75 struct v4l2_frequency_band *band);
76int snd_tea575x_g_tuner(struct snd_tea575x *tea, struct v4l2_tuner *v);
77int snd_tea575x_s_hw_freq_seek(struct file *file, struct snd_tea575x *tea,
78 const struct v4l2_hw_freq_seek *a);
74int snd_tea575x_hw_init(struct snd_tea575x *tea); 79int snd_tea575x_hw_init(struct snd_tea575x *tea);
75int snd_tea575x_init(struct snd_tea575x *tea, struct module *owner); 80int snd_tea575x_init(struct snd_tea575x *tea, struct module *owner);
76void snd_tea575x_exit(struct snd_tea575x *tea); 81void snd_tea575x_exit(struct snd_tea575x *tea);
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index eb76cfd47189..3e4fddfc840c 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -124,7 +124,8 @@ struct video_device
124 spinlock_t fh_lock; /* Lock for all v4l2_fhs */ 124 spinlock_t fh_lock; /* Lock for all v4l2_fhs */
125 struct list_head fh_list; /* List of struct v4l2_fh */ 125 struct list_head fh_list; /* List of struct v4l2_fh */
126 126
127 int debug; /* Activates debug level*/ 127 /* Internal device debug flags, not for use by drivers */
128 int dev_debug;
128 129
129 /* Video standard vars */ 130 /* Video standard vars */
130 v4l2_std_id tvnorms; /* Supported tv norms */ 131 v4l2_std_id tvnorms; /* Supported tv norms */
diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h
index 53605f0f9903..8537983b9b22 100644
--- a/include/media/v4l2-ioctl.h
+++ b/include/media/v4l2-ioctl.h
@@ -291,9 +291,18 @@ struct v4l2_ioctl_ops {
291 291
292/* v4l debugging and diagnostics */ 292/* v4l debugging and diagnostics */
293 293
294/* Debug bitmask flags to be used on V4L2 */ 294/* Device debug flags to be used with the video device debug attribute */
295#define V4L2_DEBUG_IOCTL 0x01 295
296#define V4L2_DEBUG_IOCTL_ARG 0x02 296/* Just log the ioctl name + error code */
297#define V4L2_DEV_DEBUG_IOCTL 0x01
298/* Log the ioctl name arguments + error code */
299#define V4L2_DEV_DEBUG_IOCTL_ARG 0x02
300/* Log the file operations open, release, mmap and get_unmapped_area */
301#define V4L2_DEV_DEBUG_FOP 0x04
302/* Log the read and write file operations and the VIDIOC_(D)QBUF ioctls */
303#define V4L2_DEV_DEBUG_STREAMING 0x08
304/* Log poll() */
305#define V4L2_DEV_DEBUG_POLL 0x10
297 306
298/* Video standard functions */ 307/* Video standard functions */
299extern const char *v4l2_norm_to_name(v4l2_std_id id); 308extern const char *v4l2_norm_to_name(v4l2_std_id id);
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 5860292d42eb..5beeb8744fd1 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -342,8 +342,6 @@ struct v4l2_subdev_video_ops {
342 struct v4l2_dv_timings *timings); 342 struct v4l2_dv_timings *timings);
343 int (*enum_mbus_fmt)(struct v4l2_subdev *sd, unsigned int index, 343 int (*enum_mbus_fmt)(struct v4l2_subdev *sd, unsigned int index,
344 u32 *code); 344 u32 *code);
345 int (*enum_mbus_fsizes)(struct v4l2_subdev *sd,
346 struct v4l2_frmsizeenum *fsize);
347 int (*g_mbus_fmt)(struct v4l2_subdev *sd, 345 int (*g_mbus_fmt)(struct v4l2_subdev *sd,
348 struct v4l2_mbus_framefmt *fmt); 346 struct v4l2_mbus_framefmt *fmt);
349 int (*try_mbus_fmt)(struct v4l2_subdev *sd, 347 int (*try_mbus_fmt)(struct v4l2_subdev *sd,
@@ -503,10 +501,6 @@ struct v4l2_subdev_pad_ops {
503 struct v4l2_subdev_format *format); 501 struct v4l2_subdev_format *format);
504 int (*set_fmt)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, 502 int (*set_fmt)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
505 struct v4l2_subdev_format *format); 503 struct v4l2_subdev_format *format);
506 int (*set_crop)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
507 struct v4l2_subdev_crop *crop);
508 int (*get_crop)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
509 struct v4l2_subdev_crop *crop);
510 int (*get_selection)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, 504 int (*get_selection)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
511 struct v4l2_subdev_selection *sel); 505 struct v4l2_subdev_selection *sel);
512 int (*set_selection)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, 506 int (*set_selection)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
diff --git a/include/media/videobuf-dma-sg.h b/include/media/videobuf-dma-sg.h
index fb6fd4d8f4ed..d8b27854e3bf 100644
--- a/include/media/videobuf-dma-sg.h
+++ b/include/media/videobuf-dma-sg.h
@@ -84,16 +84,8 @@ struct videobuf_dma_sg_memory {
84 * Despite the name, this is totally unrelated to videobuf, except that 84 * Despite the name, this is totally unrelated to videobuf, except that
85 * videobuf-dma-sg uses the same API internally. 85 * videobuf-dma-sg uses the same API internally.
86 */ 86 */
87void videobuf_dma_init(struct videobuf_dmabuf *dma);
88int videobuf_dma_init_user(struct videobuf_dmabuf *dma, int direction,
89 unsigned long data, unsigned long size);
90int videobuf_dma_init_kernel(struct videobuf_dmabuf *dma, int direction,
91 int nr_pages);
92int videobuf_dma_init_overlay(struct videobuf_dmabuf *dma, int direction,
93 dma_addr_t addr, int nr_pages);
94int videobuf_dma_free(struct videobuf_dmabuf *dma); 87int videobuf_dma_free(struct videobuf_dmabuf *dma);
95 88
96int videobuf_dma_map(struct device *dev, struct videobuf_dmabuf *dma);
97int videobuf_dma_unmap(struct device *dev, struct videobuf_dmabuf *dma); 89int videobuf_dma_unmap(struct device *dev, struct videobuf_dmabuf *dma);
98struct videobuf_dmabuf *videobuf_to_dma(struct videobuf_buffer *buf); 90struct videobuf_dmabuf *videobuf_to_dma(struct videobuf_buffer *buf);
99 91
diff --git a/include/media/videobuf-dvb.h b/include/media/videobuf-dvb.h
index d63965a1faaf..c3bfa473c3aa 100644
--- a/include/media/videobuf-dvb.h
+++ b/include/media/videobuf-dvb.h
@@ -56,9 +56,3 @@ struct videobuf_dvb_frontend * videobuf_dvb_get_frontend(struct videobuf_dvb_fro
56int videobuf_dvb_find_frontend(struct videobuf_dvb_frontends *f, struct dvb_frontend *p); 56int videobuf_dvb_find_frontend(struct videobuf_dvb_frontends *f, struct dvb_frontend *p);
57 57
58#endif /* _VIDEOBUF_DVB_H_ */ 58#endif /* _VIDEOBUF_DVB_H_ */
59
60/*
61 * Local variables:
62 * c-basic-offset: 8
63 * End:
64 */
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
index 14b7b6e44c77..7b8141bf59a7 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -35,6 +35,7 @@ header-y += adfs_fs.h
35header-y += affs_hardblocks.h 35header-y += affs_hardblocks.h
36header-y += agpgart.h 36header-y += agpgart.h
37header-y += aio_abi.h 37header-y += aio_abi.h
38header-y += am437x-vpfe.h
38header-y += apm_bios.h 39header-y += apm_bios.h
39header-y += arcfb.h 40header-y += arcfb.h
40header-y += atalk.h 41header-y += atalk.h
diff --git a/include/uapi/linux/am437x-vpfe.h b/include/uapi/linux/am437x-vpfe.h
new file mode 100644
index 000000000000..9b03033f9cd6
--- /dev/null
+++ b/include/uapi/linux/am437x-vpfe.h
@@ -0,0 +1,122 @@
1/*
2 * Copyright (C) 2013 - 2014 Texas Instruments, Inc.
3 *
4 * Benoit Parrot <bparrot@ti.com>
5 * Lad, Prabhakar <prabhakar.csengg@gmail.com>
6 *
7 * This program is free software; you may redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
10 *
11 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
12 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
13 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
14 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
15 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
16 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
17 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18 * SOFTWARE.
19 */
20
21#ifndef AM437X_VPFE_USER_H
22#define AM437X_VPFE_USER_H
23
24enum vpfe_ccdc_data_size {
25 VPFE_CCDC_DATA_16BITS = 0,
26 VPFE_CCDC_DATA_15BITS,
27 VPFE_CCDC_DATA_14BITS,
28 VPFE_CCDC_DATA_13BITS,
29 VPFE_CCDC_DATA_12BITS,
30 VPFE_CCDC_DATA_11BITS,
31 VPFE_CCDC_DATA_10BITS,
32 VPFE_CCDC_DATA_8BITS,
33};
34
35/* enum for No of pixel per line to be avg. in Black Clamping*/
36enum vpfe_ccdc_sample_length {
37 VPFE_CCDC_SAMPLE_1PIXELS = 0,
38 VPFE_CCDC_SAMPLE_2PIXELS,
39 VPFE_CCDC_SAMPLE_4PIXELS,
40 VPFE_CCDC_SAMPLE_8PIXELS,
41 VPFE_CCDC_SAMPLE_16PIXELS,
42};
43
44/* enum for No of lines in Black Clamping */
45enum vpfe_ccdc_sample_line {
46 VPFE_CCDC_SAMPLE_1LINES = 0,
47 VPFE_CCDC_SAMPLE_2LINES,
48 VPFE_CCDC_SAMPLE_4LINES,
49 VPFE_CCDC_SAMPLE_8LINES,
50 VPFE_CCDC_SAMPLE_16LINES,
51};
52
53/* enum for Alaw gamma width */
54enum vpfe_ccdc_gamma_width {
55 VPFE_CCDC_GAMMA_BITS_15_6 = 0, /* use bits 15-6 for gamma */
56 VPFE_CCDC_GAMMA_BITS_14_5,
57 VPFE_CCDC_GAMMA_BITS_13_4,
58 VPFE_CCDC_GAMMA_BITS_12_3,
59 VPFE_CCDC_GAMMA_BITS_11_2,
60 VPFE_CCDC_GAMMA_BITS_10_1,
61 VPFE_CCDC_GAMMA_BITS_09_0, /* use bits 9-0 for gamma */
62};
63
64/* structure for ALaw */
65struct vpfe_ccdc_a_law {
66 /* Enable/disable A-Law */
67 unsigned char enable;
68 /* Gamma Width Input */
69 enum vpfe_ccdc_gamma_width gamma_wd;
70};
71
72/* structure for Black Clamping */
73struct vpfe_ccdc_black_clamp {
74 unsigned char enable;
75 /* only if bClampEnable is TRUE */
76 enum vpfe_ccdc_sample_length sample_pixel;
77 /* only if bClampEnable is TRUE */
78 enum vpfe_ccdc_sample_line sample_ln;
79 /* only if bClampEnable is TRUE */
80 unsigned short start_pixel;
81 /* only if bClampEnable is TRUE */
82 unsigned short sgain;
83 /* only if bClampEnable is FALSE */
84 unsigned short dc_sub;
85};
86
87/* structure for Black Level Compensation */
88struct vpfe_ccdc_black_compensation {
89 /* Constant value to subtract from Red component */
90 char r;
91 /* Constant value to subtract from Gr component */
92 char gr;
93 /* Constant value to subtract from Blue component */
94 char b;
95 /* Constant value to subtract from Gb component */
96 char gb;
97};
98
99/* Structure for CCDC configuration parameters for raw capture mode passed
100 * by application
101 */
102struct vpfe_ccdc_config_params_raw {
103 /* data size value from 8 to 16 bits */
104 enum vpfe_ccdc_data_size data_sz;
105 /* Structure for Optional A-Law */
106 struct vpfe_ccdc_a_law alaw;
107 /* Structure for Optical Black Clamp */
108 struct vpfe_ccdc_black_clamp blk_clamp;
109 /* Structure for Black Compensation */
110 struct vpfe_ccdc_black_compensation blk_comp;
111};
112
113/*
114 * Private IOCTL
115 * VIDIOC_AM437X_CCDC_CFG - Set CCDC configuration for raw capture
116 * This is an experimental ioctl that will change in future kernels. So use
117 * this ioctl with care !
118 **/
119#define VIDIOC_AM437X_CCDC_CFG \
120 _IOW('V', BASE_VIDIOC_PRIVATE + 1, void *)
121
122#endif /* AM437X_VPFE_USER_H */
diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h
index 661f119a51b8..9f6e108ff4a0 100644
--- a/include/uapi/linux/v4l2-controls.h
+++ b/include/uapi/linux/v4l2-controls.h
@@ -170,6 +170,10 @@ enum v4l2_colorfx {
170 * We reserve 16 controls for this driver. */ 170 * We reserve 16 controls for this driver. */
171#define V4L2_CID_USER_SAA7134_BASE (V4L2_CID_USER_BASE + 0x1060) 171#define V4L2_CID_USER_SAA7134_BASE (V4L2_CID_USER_BASE + 0x1060)
172 172
173/* The base for the adv7180 driver controls.
174 * We reserve 16 controls for this driver. */
175#define V4L2_CID_USER_ADV7180_BASE (V4L2_CID_USER_BASE + 0x1070)
176
173/* MPEG-class control IDs */ 177/* MPEG-class control IDs */
174/* The MPEG controls are applicable to all codec controls 178/* The MPEG controls are applicable to all codec controls
175 * and the 'MPEG' part of the define is historical */ 179 * and the 'MPEG' part of the define is historical */
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index d279c1b75cf7..fbdc3602ee27 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -463,10 +463,11 @@ struct v4l2_pix_format {
463#define V4L2_PIX_FMT_SGBRG10 v4l2_fourcc('G', 'B', '1', '0') /* 10 GBGB.. RGRG.. */ 463#define V4L2_PIX_FMT_SGBRG10 v4l2_fourcc('G', 'B', '1', '0') /* 10 GBGB.. RGRG.. */
464#define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0') /* 10 GRGR.. BGBG.. */ 464#define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0') /* 10 GRGR.. BGBG.. */
465#define V4L2_PIX_FMT_SRGGB10 v4l2_fourcc('R', 'G', '1', '0') /* 10 RGRG.. GBGB.. */ 465#define V4L2_PIX_FMT_SRGGB10 v4l2_fourcc('R', 'G', '1', '0') /* 10 RGRG.. GBGB.. */
466#define V4L2_PIX_FMT_SBGGR12 v4l2_fourcc('B', 'G', '1', '2') /* 12 BGBG.. GRGR.. */ 466 /* 10bit raw bayer packed, 5 bytes for every 4 pixels */
467#define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2') /* 12 GBGB.. RGRG.. */ 467#define V4L2_PIX_FMT_SBGGR10P v4l2_fourcc('p', 'B', 'A', 'A')
468#define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2') /* 12 GRGR.. BGBG.. */ 468#define V4L2_PIX_FMT_SGBRG10P v4l2_fourcc('p', 'G', 'A', 'A')
469#define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2') /* 12 RGRG.. GBGB.. */ 469#define V4L2_PIX_FMT_SGRBG10P v4l2_fourcc('p', 'g', 'A', 'A')
470#define V4L2_PIX_FMT_SRGGB10P v4l2_fourcc('p', 'R', 'A', 'A')
470 /* 10bit raw bayer a-law compressed to 8 bits */ 471 /* 10bit raw bayer a-law compressed to 8 bits */
471#define V4L2_PIX_FMT_SBGGR10ALAW8 v4l2_fourcc('a', 'B', 'A', '8') 472#define V4L2_PIX_FMT_SBGGR10ALAW8 v4l2_fourcc('a', 'B', 'A', '8')
472#define V4L2_PIX_FMT_SGBRG10ALAW8 v4l2_fourcc('a', 'G', 'A', '8') 473#define V4L2_PIX_FMT_SGBRG10ALAW8 v4l2_fourcc('a', 'G', 'A', '8')
@@ -477,10 +478,10 @@ struct v4l2_pix_format {
477#define V4L2_PIX_FMT_SGBRG10DPCM8 v4l2_fourcc('b', 'G', 'A', '8') 478#define V4L2_PIX_FMT_SGBRG10DPCM8 v4l2_fourcc('b', 'G', 'A', '8')
478#define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0') 479#define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0')
479#define V4L2_PIX_FMT_SRGGB10DPCM8 v4l2_fourcc('b', 'R', 'A', '8') 480#define V4L2_PIX_FMT_SRGGB10DPCM8 v4l2_fourcc('b', 'R', 'A', '8')
480 /* 481#define V4L2_PIX_FMT_SBGGR12 v4l2_fourcc('B', 'G', '1', '2') /* 12 BGBG.. GRGR.. */
481 * 10bit raw bayer, expanded to 16 bits 482#define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2') /* 12 GBGB.. RGRG.. */
482 * xxxxrrrrrrrrrrxxxxgggggggggg xxxxggggggggggxxxxbbbbbbbbbb... 483#define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2') /* 12 GRGR.. BGBG.. */
483 */ 484#define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2') /* 12 RGRG.. GBGB.. */
484#define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2') /* 16 BGBG.. GRGR.. */ 485#define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2') /* 16 BGBG.. GRGR.. */
485 486
486/* compressed formats */ 487/* compressed formats */