aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2012-10-11 14:07:19 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-10-11 14:07:19 -0400
commitbf3b202b41999f88f091632f13842b7234bd58b7 (patch)
treee2861fcca522cc299e6106fa6c78d85a4a6eedeb /include
parent782cd9ee985b1523f1ddad57657a24d7855d9e4d (diff)
parent1fdead8ad31d3aa833bc37739273fcde89ace93c (diff)
Merge branch 'staging/for_v3.7' into v4l_for_linus
Applied on the top of changeset 782cd9e, as some of those patches depend on some fixes that went via -arm tree. * staging/for_v3.7: (109 commits) [media] m5mols: Add missing #include <linux/sizes.h> [media] stk1160: Add support for S-Video input Revert "[media] omap3isp: Replace cpu_is_omap3630() with ISP revision check" [media] dvb: LNA implementation changes [media] v4l2-ioctl: fix W=1 warnings [media] v4l2-ioctl: add blocks check for VIDIOC_SUBDEV_G/S_EDID [media] omap3isp: Fix compilation error in ispreg.h [media] rc-msi-digivox-ii: Add full scan keycodes [media] cx25821: testing the wrong variable [media] tda18271-common: hold the I2C adapter during write transfers [media] ds3000: add module parameter to force firmware upload [media] drivers/media: Remove unnecessary semicolon [media] winbond: remove space from driver name [media] iguanair: cannot send data from the stack [media] omap3isp: Replace cpu_is_omap3630() with ISP revision check [media] dvb-usb: print small buffers via %*ph [media] uvc: Add return code check at vb2_queue_init() [media] em28xx: Replace memcpy with struct assignment [media] bt8xx: Add video4linux control V4L2_CID_COLOR_KILLER [media] mem2mem_testdev: Use devm_kzalloc() in probe ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/dvb/version.h2
-rw-r--r--include/linux/platform_data/mipi-csis.h30
-rw-r--r--include/linux/v4l2-controls.h42
-rw-r--r--include/linux/v4l2-mediabus.h5
-rw-r--r--include/linux/videodev2.h5
-rw-r--r--include/media/davinci/vpbe.h14
-rw-r--r--include/media/davinci/vpbe_types.h8
-rw-r--r--include/media/davinci/vpbe_venc.h2
-rw-r--r--include/media/davinci/vpif_types.h26
-rw-r--r--include/media/s5p_fimc.h2
-rw-r--r--include/media/s5p_hdmi.h2
-rw-r--r--include/media/v4l2-ctrls.h23
-rw-r--r--include/media/v4l2-subdev.h48
13 files changed, 166 insertions, 43 deletions
diff --git a/include/linux/dvb/version.h b/include/linux/dvb/version.h
index 20e5eac2ffd3..827cce7e33e3 100644
--- a/include/linux/dvb/version.h
+++ b/include/linux/dvb/version.h
@@ -24,6 +24,6 @@
24#define _DVBVERSION_H_ 24#define _DVBVERSION_H_
25 25
26#define DVB_API_VERSION 5 26#define DVB_API_VERSION 5
27#define DVB_API_VERSION_MINOR 8 27#define DVB_API_VERSION_MINOR 9
28 28
29#endif /*_DVBVERSION_H_*/ 29#endif /*_DVBVERSION_H_*/
diff --git a/include/linux/platform_data/mipi-csis.h b/include/linux/platform_data/mipi-csis.h
index c45b1e8d4c2e..bf34e17cee7f 100644
--- a/include/linux/platform_data/mipi-csis.h
+++ b/include/linux/platform_data/mipi-csis.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Copyright (C) 2010-2011 Samsung Electronics Co., Ltd. 2 * Copyright (C) 2010 - 2012 Samsung Electronics Co., Ltd.
3 * 3 *
4 * S5P series MIPI CSI slave device support 4 * Samsung S5P/Exynos SoC series MIPI CSIS device support
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 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 7 * it under the terms of the GNU General Public License version 2 as
@@ -11,33 +11,27 @@
11#ifndef __PLAT_SAMSUNG_MIPI_CSIS_H_ 11#ifndef __PLAT_SAMSUNG_MIPI_CSIS_H_
12#define __PLAT_SAMSUNG_MIPI_CSIS_H_ __FILE__ 12#define __PLAT_SAMSUNG_MIPI_CSIS_H_ __FILE__
13 13
14struct platform_device;
15
16/** 14/**
17 * struct s5p_platform_mipi_csis - platform data for S5P MIPI-CSIS driver 15 * struct s5p_platform_mipi_csis - platform data for S5P MIPI-CSIS driver
18 * @clk_rate: bus clock frequency 16 * @clk_rate: bus clock frequency
19 * @lanes: number of data lanes used 17 * @wclk_source: CSI wrapper clock selection: 0 - bus clock, 1 - ext. SCLK_CAM
20 * @alignment: data alignment in bits 18 * @lanes: number of data lanes used
21 * @hs_settle: HS-RX settle time 19 * @hs_settle: HS-RX settle time
22 * @fixed_phy_vdd: false to enable external D-PHY regulator management in the
23 * driver or true in case this regulator has no enable function
24 * @phy_enable: pointer to a callback controlling D-PHY enable/reset
25 */ 20 */
26struct s5p_platform_mipi_csis { 21struct s5p_platform_mipi_csis {
27 unsigned long clk_rate; 22 unsigned long clk_rate;
23 u8 wclk_source;
28 u8 lanes; 24 u8 lanes;
29 u8 alignment;
30 u8 hs_settle; 25 u8 hs_settle;
31 bool fixed_phy_vdd;
32 int (*phy_enable)(struct platform_device *pdev, bool on);
33}; 26};
34 27
35/** 28/**
36 * s5p_csis_phy_enable - global MIPI-CSI receiver D-PHY control 29 * s5p_csis_phy_enable - global MIPI-CSI receiver D-PHY control
37 * @pdev: MIPI-CSIS platform device 30 * @id: MIPI-CSIS harware instance index (0...1)
38 * @on: true to enable D-PHY and deassert its reset 31 * @on: true to enable D-PHY and deassert its reset
39 * false to disable D-PHY 32 * false to disable D-PHY
33 * @return: 0 on success, or negative error code on failure
40 */ 34 */
41int s5p_csis_phy_enable(struct platform_device *pdev, bool on); 35int s5p_csis_phy_enable(int id, bool on);
42 36
43#endif /* __PLAT_SAMSUNG_MIPI_CSIS_H_ */ 37#endif /* __PLAT_SAMSUNG_MIPI_CSIS_H_ */
diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h
index 421d24c7f686..f56c945cecd4 100644
--- a/include/linux/v4l2-controls.h
+++ b/include/linux/v4l2-controls.h
@@ -349,6 +349,7 @@ enum v4l2_mpeg_video_multi_slice_mode {
349#define V4L2_CID_MPEG_VIDEO_VBV_SIZE (V4L2_CID_MPEG_BASE+222) 349#define V4L2_CID_MPEG_VIDEO_VBV_SIZE (V4L2_CID_MPEG_BASE+222)
350#define V4L2_CID_MPEG_VIDEO_DEC_PTS (V4L2_CID_MPEG_BASE+223) 350#define V4L2_CID_MPEG_VIDEO_DEC_PTS (V4L2_CID_MPEG_BASE+223)
351#define V4L2_CID_MPEG_VIDEO_DEC_FRAME (V4L2_CID_MPEG_BASE+224) 351#define V4L2_CID_MPEG_VIDEO_DEC_FRAME (V4L2_CID_MPEG_BASE+224)
352#define V4L2_CID_MPEG_VIDEO_VBV_DELAY (V4L2_CID_MPEG_BASE+225)
352 353
353#define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300) 354#define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300)
354#define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301) 355#define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301)
@@ -439,6 +440,46 @@ enum v4l2_mpeg_video_h264_vui_sar_idc {
439 V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1 = 16, 440 V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1 = 16,
440 V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED = 17, 441 V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED = 17,
441}; 442};
443#define V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING (V4L2_CID_MPEG_BASE+368)
444#define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0 (V4L2_CID_MPEG_BASE+369)
445#define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE (V4L2_CID_MPEG_BASE+370)
446enum v4l2_mpeg_video_h264_sei_fp_arrangement_type {
447 V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_CHECKERBOARD = 0,
448 V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_COLUMN = 1,
449 V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_ROW = 2,
450 V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE = 3,
451 V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TOP_BOTTOM = 4,
452 V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TEMPORAL = 5,
453};
454#define V4L2_CID_MPEG_VIDEO_H264_FMO (V4L2_CID_MPEG_BASE+371)
455#define V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE (V4L2_CID_MPEG_BASE+372)
456enum v4l2_mpeg_video_h264_fmo_map_type {
457 V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES = 0,
458 V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES = 1,
459 V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER = 2,
460 V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT = 3,
461 V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN = 4,
462 V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN = 5,
463 V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT = 6,
464};
465#define V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP (V4L2_CID_MPEG_BASE+373)
466#define V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION (V4L2_CID_MPEG_BASE+374)
467enum v4l2_mpeg_video_h264_fmo_change_dir {
468 V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT = 0,
469 V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT = 1,
470};
471#define V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE (V4L2_CID_MPEG_BASE+375)
472#define V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH (V4L2_CID_MPEG_BASE+376)
473#define V4L2_CID_MPEG_VIDEO_H264_ASO (V4L2_CID_MPEG_BASE+377)
474#define V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER (V4L2_CID_MPEG_BASE+378)
475#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING (V4L2_CID_MPEG_BASE+379)
476#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE (V4L2_CID_MPEG_BASE+380)
477enum v4l2_mpeg_video_h264_hierarchical_coding_type {
478 V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B = 0,
479 V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P = 1,
480};
481#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER (V4L2_CID_MPEG_BASE+381)
482#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP (V4L2_CID_MPEG_BASE+382)
442#define V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (V4L2_CID_MPEG_BASE+400) 483#define V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (V4L2_CID_MPEG_BASE+400)
443#define V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (V4L2_CID_MPEG_BASE+401) 484#define V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (V4L2_CID_MPEG_BASE+401)
444#define V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (V4L2_CID_MPEG_BASE+402) 485#define V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (V4L2_CID_MPEG_BASE+402)
@@ -757,5 +798,6 @@ enum v4l2_jpeg_chroma_subsampling {
757 798
758#define V4L2_CID_LINK_FREQ (V4L2_CID_IMAGE_PROC_CLASS_BASE + 1) 799#define V4L2_CID_LINK_FREQ (V4L2_CID_IMAGE_PROC_CLASS_BASE + 1)
759#define V4L2_CID_PIXEL_RATE (V4L2_CID_IMAGE_PROC_CLASS_BASE + 2) 800#define V4L2_CID_PIXEL_RATE (V4L2_CID_IMAGE_PROC_CLASS_BASE + 2)
801#define V4L2_CID_TEST_PATTERN (V4L2_CID_IMAGE_PROC_CLASS_BASE + 3)
760 802
761#endif 803#endif
diff --git a/include/linux/v4l2-mediabus.h b/include/linux/v4l2-mediabus.h
index 5ea7f753a348..7d64e0e1a18b 100644
--- a/include/linux/v4l2-mediabus.h
+++ b/include/linux/v4l2-mediabus.h
@@ -92,6 +92,11 @@ enum v4l2_mbus_pixelcode {
92 92
93 /* JPEG compressed formats - next is 0x4002 */ 93 /* JPEG compressed formats - next is 0x4002 */
94 V4L2_MBUS_FMT_JPEG_1X8 = 0x4001, 94 V4L2_MBUS_FMT_JPEG_1X8 = 0x4001,
95
96 /* Vendor specific formats - next is 0x5002 */
97
98 /* S5C73M3 sensor specific interleaved UYVY and JPEG */
99 V4L2_MBUS_FMT_S5C_UYVY_JPEG_1X8 = 0x5001,
95}; 100};
96 101
97/** 102/**
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 61395ef85a00..873adbe82988 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -366,7 +366,9 @@ struct v4l2_pix_format {
366 366
367/* two non contiguous planes - one Y, one Cr + Cb interleaved */ 367/* two non contiguous planes - one Y, one Cr + Cb interleaved */
368#define V4L2_PIX_FMT_NV12M v4l2_fourcc('N', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 */ 368#define V4L2_PIX_FMT_NV12M v4l2_fourcc('N', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 */
369#define V4L2_PIX_FMT_NV21M v4l2_fourcc('N', 'M', '2', '1') /* 21 Y/CrCb 4:2:0 */
369#define V4L2_PIX_FMT_NV12MT v4l2_fourcc('T', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 64x32 macroblocks */ 370#define V4L2_PIX_FMT_NV12MT v4l2_fourcc('T', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 64x32 macroblocks */
371#define V4L2_PIX_FMT_NV12MT_16X16 v4l2_fourcc('V', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 16x16 macroblocks */
370 372
371/* three non contiguous planes - Y, Cb, Cr */ 373/* three non contiguous planes - Y, Cb, Cr */
372#define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2') /* 12 YUV420 planar */ 374#define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2') /* 12 YUV420 planar */
@@ -403,6 +405,7 @@ struct v4l2_pix_format {
403#define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 Multiplexed */ 405#define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 Multiplexed */
404#define V4L2_PIX_FMT_H264 v4l2_fourcc('H', '2', '6', '4') /* H264 with start codes */ 406#define V4L2_PIX_FMT_H264 v4l2_fourcc('H', '2', '6', '4') /* H264 with start codes */
405#define V4L2_PIX_FMT_H264_NO_SC v4l2_fourcc('A', 'V', 'C', '1') /* H264 without start codes */ 407#define V4L2_PIX_FMT_H264_NO_SC v4l2_fourcc('A', 'V', 'C', '1') /* H264 without start codes */
408#define V4L2_PIX_FMT_H264_MVC v4l2_fourcc('M', '2', '6', '4') /* H264 MVC */
406#define V4L2_PIX_FMT_H263 v4l2_fourcc('H', '2', '6', '3') /* H263 */ 409#define V4L2_PIX_FMT_H263 v4l2_fourcc('H', '2', '6', '3') /* H263 */
407#define V4L2_PIX_FMT_MPEG1 v4l2_fourcc('M', 'P', 'G', '1') /* MPEG-1 ES */ 410#define V4L2_PIX_FMT_MPEG1 v4l2_fourcc('M', 'P', 'G', '1') /* MPEG-1 ES */
408#define V4L2_PIX_FMT_MPEG2 v4l2_fourcc('M', 'P', 'G', '2') /* MPEG-2 ES */ 411#define V4L2_PIX_FMT_MPEG2 v4l2_fourcc('M', 'P', 'G', '2') /* MPEG-2 ES */
@@ -410,6 +413,7 @@ struct v4l2_pix_format {
410#define V4L2_PIX_FMT_XVID v4l2_fourcc('X', 'V', 'I', 'D') /* Xvid */ 413#define V4L2_PIX_FMT_XVID v4l2_fourcc('X', 'V', 'I', 'D') /* Xvid */
411#define V4L2_PIX_FMT_VC1_ANNEX_G v4l2_fourcc('V', 'C', '1', 'G') /* SMPTE 421M Annex G compliant stream */ 414#define V4L2_PIX_FMT_VC1_ANNEX_G v4l2_fourcc('V', 'C', '1', 'G') /* SMPTE 421M Annex G compliant stream */
412#define V4L2_PIX_FMT_VC1_ANNEX_L v4l2_fourcc('V', 'C', '1', 'L') /* SMPTE 421M Annex L compliant stream */ 415#define V4L2_PIX_FMT_VC1_ANNEX_L v4l2_fourcc('V', 'C', '1', 'L') /* SMPTE 421M Annex L compliant stream */
416#define V4L2_PIX_FMT_VP8 v4l2_fourcc('V', 'P', '8', '0') /* VP8 */
413 417
414/* Vendor-specific formats */ 418/* Vendor-specific formats */
415#define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */ 419#define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */
@@ -437,6 +441,7 @@ struct v4l2_pix_format {
437#define V4L2_PIX_FMT_KONICA420 v4l2_fourcc('K', 'O', 'N', 'I') /* YUV420 planar in blocks of 256 pixels */ 441#define V4L2_PIX_FMT_KONICA420 v4l2_fourcc('K', 'O', 'N', 'I') /* YUV420 planar in blocks of 256 pixels */
438#define V4L2_PIX_FMT_JPGL v4l2_fourcc('J', 'P', 'G', 'L') /* JPEG-Lite */ 442#define V4L2_PIX_FMT_JPGL v4l2_fourcc('J', 'P', 'G', 'L') /* JPEG-Lite */
439#define V4L2_PIX_FMT_SE401 v4l2_fourcc('S', '4', '0', '1') /* se401 janggu compressed rgb */ 443#define V4L2_PIX_FMT_SE401 v4l2_fourcc('S', '4', '0', '1') /* se401 janggu compressed rgb */
444#define V4L2_PIX_FMT_S5C_UYVY_JPG v4l2_fourcc('S', '5', 'C', 'I') /* S5C73M3 interleaved UYVY/JPEG */
440 445
441/* 446/*
442 * F O R M A T E N U M E R A T I O N 447 * F O R M A T E N U M E R A T I O N
diff --git a/include/media/davinci/vpbe.h b/include/media/davinci/vpbe.h
index 8bc1b3c0e679..a7ca4884c46c 100644
--- a/include/media/davinci/vpbe.h
+++ b/include/media/davinci/vpbe.h
@@ -35,7 +35,7 @@ struct osd_config_info {
35struct vpbe_output { 35struct vpbe_output {
36 struct v4l2_output output; 36 struct v4l2_output output;
37 /* 37 /*
38 * If output capabilities include dv_preset, list supported presets 38 * If output capabilities include dv_timings, list supported timings
39 * below 39 * below
40 */ 40 */
41 char *subdev_name; 41 char *subdev_name;
@@ -120,16 +120,16 @@ struct vpbe_device_ops {
120 unsigned int (*get_output)(struct vpbe_device *vpbe_dev); 120 unsigned int (*get_output)(struct vpbe_device *vpbe_dev);
121 121
122 /* Set DV preset at current output */ 122 /* Set DV preset at current output */
123 int (*s_dv_preset)(struct vpbe_device *vpbe_dev, 123 int (*s_dv_timings)(struct vpbe_device *vpbe_dev,
124 struct v4l2_dv_preset *dv_preset); 124 struct v4l2_dv_timings *dv_timings);
125 125
126 /* Get DV presets supported at the output */ 126 /* Get DV presets supported at the output */
127 int (*g_dv_preset)(struct vpbe_device *vpbe_dev, 127 int (*g_dv_timings)(struct vpbe_device *vpbe_dev,
128 struct v4l2_dv_preset *dv_preset); 128 struct v4l2_dv_timings *dv_timings);
129 129
130 /* Enumerate the DV Presets supported at the output */ 130 /* Enumerate the DV Presets supported at the output */
131 int (*enum_dv_presets)(struct vpbe_device *vpbe_dev, 131 int (*enum_dv_timings)(struct vpbe_device *vpbe_dev,
132 struct v4l2_dv_enum_preset *preset_info); 132 struct v4l2_enum_dv_timings *timings_info);
133 133
134 /* Set std at the output */ 134 /* Set std at the output */
135 int (*s_std)(struct vpbe_device *vpbe_dev, v4l2_std_id *std_id); 135 int (*s_std)(struct vpbe_device *vpbe_dev, v4l2_std_id *std_id);
diff --git a/include/media/davinci/vpbe_types.h b/include/media/davinci/vpbe_types.h
index 727f55170e41..9b85396514be 100644
--- a/include/media/davinci/vpbe_types.h
+++ b/include/media/davinci/vpbe_types.h
@@ -32,11 +32,6 @@ enum vpbe_enc_timings_type {
32 VPBE_ENC_TIMINGS_INVALID = 0x8, 32 VPBE_ENC_TIMINGS_INVALID = 0x8,
33}; 33};
34 34
35union vpbe_timings {
36 v4l2_std_id std_id;
37 unsigned int dv_preset;
38};
39
40/* 35/*
41 * struct vpbe_enc_mode_info 36 * struct vpbe_enc_mode_info
42 * @name: ptr to name string of the standard, "NTSC", "PAL" etc 37 * @name: ptr to name string of the standard, "NTSC", "PAL" etc
@@ -73,7 +68,8 @@ union vpbe_timings {
73struct vpbe_enc_mode_info { 68struct vpbe_enc_mode_info {
74 unsigned char *name; 69 unsigned char *name;
75 enum vpbe_enc_timings_type timings_type; 70 enum vpbe_enc_timings_type timings_type;
76 union vpbe_timings timings; 71 v4l2_std_id std_id;
72 struct v4l2_dv_timings dv_timings;
77 unsigned int interlaced; 73 unsigned int interlaced;
78 unsigned int xres; 74 unsigned int xres;
79 unsigned int yres; 75 unsigned int yres;
diff --git a/include/media/davinci/vpbe_venc.h b/include/media/davinci/vpbe_venc.h
index 6b57334f4029..cc78c2eb16da 100644
--- a/include/media/davinci/vpbe_venc.h
+++ b/include/media/davinci/vpbe_venc.h
@@ -32,7 +32,7 @@ struct venc_platform_data {
32 int (*setup_pinmux)(enum v4l2_mbus_pixelcode if_type, 32 int (*setup_pinmux)(enum v4l2_mbus_pixelcode if_type,
33 int field); 33 int field);
34 int (*setup_clock)(enum vpbe_enc_timings_type type, 34 int (*setup_clock)(enum vpbe_enc_timings_type type,
35 unsigned int mode); 35 unsigned int pixclock);
36 int (*setup_if_config)(enum v4l2_mbus_pixelcode pixcode); 36 int (*setup_if_config)(enum v4l2_mbus_pixelcode pixcode);
37 /* Number of LCD outputs supported */ 37 /* Number of LCD outputs supported */
38 int num_lcd_outputs; 38 int num_lcd_outputs;
diff --git a/include/media/davinci/vpif_types.h b/include/media/davinci/vpif_types.h
index d8f6ab1943e4..3882e0675ccf 100644
--- a/include/media/davinci/vpif_types.h
+++ b/include/media/davinci/vpif_types.h
@@ -20,6 +20,7 @@
20#include <linux/i2c.h> 20#include <linux/i2c.h>
21 21
22#define VPIF_CAPTURE_MAX_CHANNELS 2 22#define VPIF_CAPTURE_MAX_CHANNELS 2
23#define VPIF_DISPLAY_MAX_CHANNELS 2
23 24
24enum vpif_if_type { 25enum vpif_if_type {
25 VPIF_IF_BT656, 26 VPIF_IF_BT656,
@@ -37,29 +38,38 @@ struct vpif_interface {
37struct vpif_subdev_info { 38struct vpif_subdev_info {
38 const char *name; 39 const char *name;
39 struct i2c_board_info board_info; 40 struct i2c_board_info board_info;
40 u32 input; 41};
41 u32 output; 42
42 unsigned can_route:1; 43struct vpif_output {
43 struct vpif_interface vpif_if; 44 struct v4l2_output output;
45 const char *subdev_name;
46 u32 input_route;
47 u32 output_route;
48};
49
50struct vpif_display_chan_config {
51 const struct vpif_output *outputs;
52 int output_count;
53 bool clip_en;
44}; 54};
45 55
46struct vpif_display_config { 56struct vpif_display_config {
47 int (*set_clock)(int, int); 57 int (*set_clock)(int, int);
48 struct vpif_subdev_info *subdevinfo; 58 struct vpif_subdev_info *subdevinfo;
49 int subdev_count; 59 int subdev_count;
50 const char **output; 60 struct vpif_display_chan_config chan_config[VPIF_DISPLAY_MAX_CHANNELS];
51 int output_count;
52 const char *card_name; 61 const char *card_name;
53 bool ch2_clip_en;
54 bool ch3_clip_en;
55}; 62};
56 63
57struct vpif_input { 64struct vpif_input {
58 struct v4l2_input input; 65 struct v4l2_input input;
59 const char *subdev_name; 66 const char *subdev_name;
67 u32 input_route;
68 u32 output_route;
60}; 69};
61 70
62struct vpif_capture_chan_config { 71struct vpif_capture_chan_config {
72 struct vpif_interface vpif_if;
63 const struct vpif_input *inputs; 73 const struct vpif_input *inputs;
64 int input_count; 74 int input_count;
65}; 75};
diff --git a/include/media/s5p_fimc.h b/include/media/s5p_fimc.h
index 09421a611d73..eaea62a382f8 100644
--- a/include/media/s5p_fimc.h
+++ b/include/media/s5p_fimc.h
@@ -30,7 +30,6 @@ struct i2c_board_info;
30 * @board_info: pointer to I2C subdevice's board info 30 * @board_info: pointer to I2C subdevice's board info
31 * @clk_frequency: frequency of the clock the host interface provides to sensor 31 * @clk_frequency: frequency of the clock the host interface provides to sensor
32 * @bus_type: determines bus type, MIPI, ITU-R BT.601 etc. 32 * @bus_type: determines bus type, MIPI, ITU-R BT.601 etc.
33 * @csi_data_align: MIPI-CSI interface data alignment in bits
34 * @i2c_bus_num: i2c control bus id the sensor is attached to 33 * @i2c_bus_num: i2c control bus id the sensor is attached to
35 * @mux_id: FIMC camera interface multiplexer index (separate for MIPI and ITU) 34 * @mux_id: FIMC camera interface multiplexer index (separate for MIPI and ITU)
36 * @clk_id: index of the SoC peripheral clock for sensors 35 * @clk_id: index of the SoC peripheral clock for sensors
@@ -40,7 +39,6 @@ struct s5p_fimc_isp_info {
40 struct i2c_board_info *board_info; 39 struct i2c_board_info *board_info;
41 unsigned long clk_frequency; 40 unsigned long clk_frequency;
42 enum cam_bus_type bus_type; 41 enum cam_bus_type bus_type;
43 u16 csi_data_align;
44 u16 i2c_bus_num; 42 u16 i2c_bus_num;
45 u16 mux_id; 43 u16 mux_id;
46 u16 flags; 44 u16 flags;
diff --git a/include/media/s5p_hdmi.h b/include/media/s5p_hdmi.h
index 361a751f73af..181642b8d0a5 100644
--- a/include/media/s5p_hdmi.h
+++ b/include/media/s5p_hdmi.h
@@ -20,6 +20,7 @@ struct i2c_board_info;
20 * @hdmiphy_info: template for HDMIPHY I2C device 20 * @hdmiphy_info: template for HDMIPHY I2C device
21 * @mhl_bus: controller id for MHL control bus 21 * @mhl_bus: controller id for MHL control bus
22 * @mhl_info: template for MHL I2C device 22 * @mhl_info: template for MHL I2C device
23 * @hpd_gpio: GPIO for Hot-Plug-Detect pin
23 * 24 *
24 * NULL pointer for *_info fields indicates that 25 * NULL pointer for *_info fields indicates that
25 * the corresponding chip is not present 26 * the corresponding chip is not present
@@ -29,6 +30,7 @@ struct s5p_hdmi_platform_data {
29 struct i2c_board_info *hdmiphy_info; 30 struct i2c_board_info *hdmiphy_info;
30 int mhl_bus; 31 int mhl_bus;
31 struct i2c_board_info *mhl_info; 32 struct i2c_board_info *mhl_info;
33 int hpd_gpio;
32}; 34};
33 35
34#endif /* S5P_HDMI_H */ 36#endif /* S5P_HDMI_H */
diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h
index 801adb466bd2..96509119f28f 100644
--- a/include/media/v4l2-ctrls.h
+++ b/include/media/v4l2-ctrls.h
@@ -351,6 +351,29 @@ struct v4l2_ctrl *v4l2_ctrl_new_std_menu(struct v4l2_ctrl_handler *hdl,
351 const struct v4l2_ctrl_ops *ops, 351 const struct v4l2_ctrl_ops *ops,
352 u32 id, s32 max, s32 mask, s32 def); 352 u32 id, s32 max, s32 mask, s32 def);
353 353
354/** v4l2_ctrl_new_std_menu_items() - Create a new standard V4L2 menu control
355 * with driver specific menu.
356 * @hdl: The control handler.
357 * @ops: The control ops.
358 * @id: The control ID.
359 * @max: The control's maximum value.
360 * @mask: The control's skip mask for menu controls. This makes it
361 * easy to skip menu items that are not valid. If bit X is set,
362 * then menu item X is skipped. Of course, this only works for
363 * menus with <= 32 menu items. There are no menus that come
364 * close to that number, so this is OK. Should we ever need more,
365 * then this will have to be extended to a u64 or a bit array.
366 * @def: The control's default value.
367 * @qmenu: The new menu.
368 *
369 * Same as v4l2_ctrl_new_std_menu(), but @qmenu will be the driver specific
370 * menu of this control.
371 *
372 */
373struct v4l2_ctrl *v4l2_ctrl_new_std_menu_items(struct v4l2_ctrl_handler *hdl,
374 const struct v4l2_ctrl_ops *ops, u32 id, s32 max,
375 s32 mask, s32 def, const char * const *qmenu);
376
354/** v4l2_ctrl_new_int_menu() - Create a new standard V4L2 integer menu control. 377/** v4l2_ctrl_new_int_menu() - Create a new standard V4L2 integer menu control.
355 * @hdl: The control handler. 378 * @hdl: The control handler.
356 * @ops: The control ops. 379 * @ops: The control ops.
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 2ecd7377153b..b137a5e1151a 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -21,6 +21,7 @@
21#ifndef _V4L2_SUBDEV_H 21#ifndef _V4L2_SUBDEV_H
22#define _V4L2_SUBDEV_H 22#define _V4L2_SUBDEV_H
23 23
24#include <linux/types.h>
24#include <linux/v4l2-subdev.h> 25#include <linux/v4l2-subdev.h>
25#include <media/media-entity.h> 26#include <media/media-entity.h>
26#include <media/v4l2-common.h> 27#include <media/v4l2-common.h>
@@ -45,6 +46,7 @@ struct v4l2_fh;
45struct v4l2_subdev; 46struct v4l2_subdev;
46struct v4l2_subdev_fh; 47struct v4l2_subdev_fh;
47struct tuner_setup; 48struct tuner_setup;
49struct v4l2_mbus_frame_desc;
48 50
49/* decode_vbi_line */ 51/* decode_vbi_line */
50struct v4l2_decode_vbi_line { 52struct v4l2_decode_vbi_line {
@@ -226,6 +228,36 @@ struct v4l2_subdev_audio_ops {
226 int (*s_stream)(struct v4l2_subdev *sd, int enable); 228 int (*s_stream)(struct v4l2_subdev *sd, int enable);
227}; 229};
228 230
231/* Indicates the @length field specifies maximum data length. */
232#define V4L2_MBUS_FRAME_DESC_FL_LEN_MAX (1U << 0)
233/* Indicates user defined data format, i.e. non standard frame format. */
234#define V4L2_MBUS_FRAME_DESC_FL_BLOB (1U << 1)
235
236/**
237 * struct v4l2_mbus_frame_desc_entry - media bus frame description structure
238 * @flags: V4L2_MBUS_FRAME_DESC_FL_* flags
239 * @pixelcode: media bus pixel code, valid if FRAME_DESC_FL_BLOB is not set
240 * @length: number of octets per frame, valid for compressed or unspecified
241 * formats
242 */
243struct v4l2_mbus_frame_desc_entry {
244 u16 flags;
245 u32 pixelcode;
246 u32 length;
247};
248
249#define V4L2_FRAME_DESC_ENTRY_MAX 4
250
251/**
252 * struct v4l2_mbus_frame_desc - media bus data frame description
253 * @entry: frame descriptors array
254 * @num_entries: number of entries in @entry array
255 */
256struct v4l2_mbus_frame_desc {
257 struct v4l2_mbus_frame_desc_entry entry[V4L2_FRAME_DESC_ENTRY_MAX];
258 unsigned short num_entries;
259};
260
229/* 261/*
230 s_std_output: set v4l2_std_id for video OUTPUT devices. This is ignored by 262 s_std_output: set v4l2_std_id for video OUTPUT devices. This is ignored by
231 video input devices. 263 video input devices.
@@ -274,6 +306,10 @@ struct v4l2_subdev_audio_ops {
274 s_mbus_config: set a certain mediabus configuration. This operation is added 306 s_mbus_config: set a certain mediabus configuration. This operation is added
275 for compatibility with soc-camera drivers and should not be used by new 307 for compatibility with soc-camera drivers and should not be used by new
276 software. 308 software.
309
310 s_rx_buffer: set a host allocated memory buffer for the subdev. The subdev
311 can adjust @size to a lower value and must not write more data to the
312 buffer starting at @data than the original value of @size.
277 */ 313 */
278struct v4l2_subdev_video_ops { 314struct v4l2_subdev_video_ops {
279 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);
@@ -327,6 +363,8 @@ struct v4l2_subdev_video_ops {
327 struct v4l2_mbus_config *cfg); 363 struct v4l2_mbus_config *cfg);
328 int (*s_mbus_config)(struct v4l2_subdev *sd, 364 int (*s_mbus_config)(struct v4l2_subdev *sd,
329 const struct v4l2_mbus_config *cfg); 365 const struct v4l2_mbus_config *cfg);
366 int (*s_rx_buffer)(struct v4l2_subdev *sd, void *buf,
367 unsigned int *size);
330}; 368};
331 369
332/* 370/*
@@ -455,6 +493,12 @@ struct v4l2_subdev_ir_ops {
455 struct v4l2_subdev_ir_parameters *params); 493 struct v4l2_subdev_ir_parameters *params);
456}; 494};
457 495
496/**
497 * struct v4l2_subdev_pad_ops - v4l2-subdev pad level operations
498 * @get_frame_desc: get the current low level media bus frame parameters.
499 * @get_frame_desc: set the low level media bus frame parameters, @fd array
500 * may be adjusted by the subdev driver to device capabilities.
501 */
458struct v4l2_subdev_pad_ops { 502struct v4l2_subdev_pad_ops {
459 int (*enum_mbus_code)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, 503 int (*enum_mbus_code)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
460 struct v4l2_subdev_mbus_code_enum *code); 504 struct v4l2_subdev_mbus_code_enum *code);
@@ -483,6 +527,10 @@ struct v4l2_subdev_pad_ops {
483 struct v4l2_subdev_format *source_fmt, 527 struct v4l2_subdev_format *source_fmt,
484 struct v4l2_subdev_format *sink_fmt); 528 struct v4l2_subdev_format *sink_fmt);
485#endif /* CONFIG_MEDIA_CONTROLLER */ 529#endif /* CONFIG_MEDIA_CONTROLLER */
530 int (*get_frame_desc)(struct v4l2_subdev *sd, unsigned int pad,
531 struct v4l2_mbus_frame_desc *fd);
532 int (*set_frame_desc)(struct v4l2_subdev *sd, unsigned int pad,
533 struct v4l2_mbus_frame_desc *fd);
486}; 534};
487 535
488struct v4l2_subdev_ops { 536struct v4l2_subdev_ops {