diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2014-01-26 16:42:37 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-05-25 11:57:26 -0400 |
commit | 539b33b05913f1de34c7e0ef3376347ffd273e8f (patch) | |
tree | a55dae970177bd6ebeb6d456f5ba43b421e916b0 /include/media/adv7604.h | |
parent | c784b1e2ece8a591263050d1f59607547dfad8f3 (diff) |
[media] adv7604: Make output format configurable through pad format operations
Replace the dummy video format operations by pad format operations that
configure the output format.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'include/media/adv7604.h')
-rw-r--r-- | include/media/adv7604.h | 56 |
1 files changed, 20 insertions, 36 deletions
diff --git a/include/media/adv7604.h b/include/media/adv7604.h index 6186771c0642..d8b2cb8f5dce 100644 --- a/include/media/adv7604.h +++ b/include/media/adv7604.h | |||
@@ -32,14 +32,18 @@ enum adv7604_ain_sel { | |||
32 | ADV7604_AIN9_4_5_6_SYNC_2_1 = 4, | 32 | ADV7604_AIN9_4_5_6_SYNC_2_1 = 4, |
33 | }; | 33 | }; |
34 | 34 | ||
35 | /* Bus rotation and reordering (IO register 0x04, [7:5]) */ | 35 | /* |
36 | enum adv7604_op_ch_sel { | 36 | * Bus rotation and reordering. This is used to specify component reordering on |
37 | ADV7604_OP_CH_SEL_GBR = 0, | 37 | * the board and describes the components order on the bus when the ADV7604 |
38 | ADV7604_OP_CH_SEL_GRB = 1, | 38 | * outputs RGB. |
39 | ADV7604_OP_CH_SEL_BGR = 2, | 39 | */ |
40 | ADV7604_OP_CH_SEL_RGB = 3, | 40 | enum adv7604_bus_order { |
41 | ADV7604_OP_CH_SEL_BRG = 4, | 41 | ADV7604_BUS_ORDER_RGB, /* No operation */ |
42 | ADV7604_OP_CH_SEL_RBG = 5, | 42 | ADV7604_BUS_ORDER_GRB, /* Swap 1-2 */ |
43 | ADV7604_BUS_ORDER_RBG, /* Swap 2-3 */ | ||
44 | ADV7604_BUS_ORDER_BGR, /* Swap 1-3 */ | ||
45 | ADV7604_BUS_ORDER_BRG, /* Rotate right */ | ||
46 | ADV7604_BUS_ORDER_GBR, /* Rotate left */ | ||
43 | }; | 47 | }; |
44 | 48 | ||
45 | /* Input Color Space (IO register 0x02, [7:4]) */ | 49 | /* Input Color Space (IO register 0x02, [7:4]) */ |
@@ -55,29 +59,11 @@ enum adv7604_inp_color_space { | |||
55 | ADV7604_INP_COLOR_SPACE_AUTO = 0xf, | 59 | ADV7604_INP_COLOR_SPACE_AUTO = 0xf, |
56 | }; | 60 | }; |
57 | 61 | ||
58 | /* Select output format (IO register 0x03, [7:0]) */ | 62 | /* Select output format (IO register 0x03, [4:2]) */ |
59 | enum adv7604_op_format_sel { | 63 | enum adv7604_op_format_mode_sel { |
60 | ADV7604_OP_FORMAT_SEL_SDR_ITU656_8 = 0x00, | 64 | ADV7604_OP_FORMAT_MODE0 = 0x00, |
61 | ADV7604_OP_FORMAT_SEL_SDR_ITU656_10 = 0x01, | 65 | ADV7604_OP_FORMAT_MODE1 = 0x04, |
62 | ADV7604_OP_FORMAT_SEL_SDR_ITU656_12_MODE0 = 0x02, | 66 | ADV7604_OP_FORMAT_MODE2 = 0x08, |
63 | ADV7604_OP_FORMAT_SEL_SDR_ITU656_12_MODE1 = 0x06, | ||
64 | ADV7604_OP_FORMAT_SEL_SDR_ITU656_12_MODE2 = 0x0a, | ||
65 | ADV7604_OP_FORMAT_SEL_DDR_422_8 = 0x20, | ||
66 | ADV7604_OP_FORMAT_SEL_DDR_422_10 = 0x21, | ||
67 | ADV7604_OP_FORMAT_SEL_DDR_422_12_MODE0 = 0x22, | ||
68 | ADV7604_OP_FORMAT_SEL_DDR_422_12_MODE1 = 0x23, | ||
69 | ADV7604_OP_FORMAT_SEL_DDR_422_12_MODE2 = 0x24, | ||
70 | ADV7604_OP_FORMAT_SEL_SDR_444_24 = 0x40, | ||
71 | ADV7604_OP_FORMAT_SEL_SDR_444_30 = 0x41, | ||
72 | ADV7604_OP_FORMAT_SEL_SDR_444_36_MODE0 = 0x42, | ||
73 | ADV7604_OP_FORMAT_SEL_DDR_444_24 = 0x60, | ||
74 | ADV7604_OP_FORMAT_SEL_DDR_444_30 = 0x61, | ||
75 | ADV7604_OP_FORMAT_SEL_DDR_444_36 = 0x62, | ||
76 | ADV7604_OP_FORMAT_SEL_SDR_ITU656_16 = 0x80, | ||
77 | ADV7604_OP_FORMAT_SEL_SDR_ITU656_20 = 0x81, | ||
78 | ADV7604_OP_FORMAT_SEL_SDR_ITU656_24_MODE0 = 0x82, | ||
79 | ADV7604_OP_FORMAT_SEL_SDR_ITU656_24_MODE1 = 0x86, | ||
80 | ADV7604_OP_FORMAT_SEL_SDR_ITU656_24_MODE2 = 0x8a, | ||
81 | }; | 67 | }; |
82 | 68 | ||
83 | enum adv7604_drive_strength { | 69 | enum adv7604_drive_strength { |
@@ -105,10 +91,10 @@ struct adv7604_platform_data { | |||
105 | enum adv7604_ain_sel ain_sel; | 91 | enum adv7604_ain_sel ain_sel; |
106 | 92 | ||
107 | /* Bus rotation and reordering */ | 93 | /* Bus rotation and reordering */ |
108 | enum adv7604_op_ch_sel op_ch_sel; | 94 | enum adv7604_bus_order bus_order; |
109 | 95 | ||
110 | /* Select output format */ | 96 | /* Select output format mode */ |
111 | enum adv7604_op_format_sel op_format_sel; | 97 | enum adv7604_op_format_mode_sel op_format_mode_sel; |
112 | 98 | ||
113 | /* Configuration of the INT1 pin */ | 99 | /* Configuration of the INT1 pin */ |
114 | enum adv7604_int1_config int1_config; | 100 | enum adv7604_int1_config int1_config; |
@@ -116,14 +102,12 @@ struct adv7604_platform_data { | |||
116 | /* IO register 0x02 */ | 102 | /* IO register 0x02 */ |
117 | unsigned alt_gamma:1; | 103 | unsigned alt_gamma:1; |
118 | unsigned op_656_range:1; | 104 | unsigned op_656_range:1; |
119 | unsigned rgb_out:1; | ||
120 | unsigned alt_data_sat:1; | 105 | unsigned alt_data_sat:1; |
121 | 106 | ||
122 | /* IO register 0x05 */ | 107 | /* IO register 0x05 */ |
123 | unsigned blank_data:1; | 108 | unsigned blank_data:1; |
124 | unsigned insert_av_codes:1; | 109 | unsigned insert_av_codes:1; |
125 | unsigned replicate_av_codes:1; | 110 | unsigned replicate_av_codes:1; |
126 | unsigned invert_cbcr:1; | ||
127 | 111 | ||
128 | /* IO register 0x06 */ | 112 | /* IO register 0x06 */ |
129 | unsigned inv_vs_pol:1; | 113 | unsigned inv_vs_pol:1; |