2 * Copyright (C) 2008-2009 QUALCOMM Incorporated.
4 #ifndef __MSM_VFE7X_H__
5 #define __MSM_VFE7X_H__
6 #include <media/msm_camera.h>
7 #include <mach/camera.h>
9 struct vfe_frame_extra
{
13 uint16_t r_b_def_p_cnt
;
18 uint32_t cbcr_address
;
20 unsigned int blacklevelevencolumn
:23;
22 unsigned int blackleveloddcolumn
:23;
25 uint16_t greendefectpixelcount
:8;
27 uint16_t redbluedefectpixelcount
:8;
29 } __attribute__((packed
, aligned(4)));
31 struct vfe_outputack
{
33 void *output2newybufferaddress
;
34 void *output2newcbcrbufferaddress
;
35 } __attribute__((packed
, aligned(4)));
37 struct vfe_stats_ack
{
39 /* MUST BE 64 bit ALIGNED */
41 } __attribute__((packed
, aligned(4)));
43 /* AXI Output Config Command sent to DSP */
45 uint32_t cmdheader
:32;
48 uint32_t /* reserved */ : 27;
50 /* AXI Output 1 Y Configuration, Part 1 */
51 uint32_t out1yimageheight
:12;
52 uint32_t /* reserved */ : 4;
53 uint32_t out1yimagewidthin64bitwords
:10;
54 uint32_t /* reserved */ : 6;
56 /* AXI Output 1 Y Configuration, Part 2 */
57 uint8_t out1yburstlen
:2;
58 uint32_t out1ynumrows
:12;
59 uint32_t out1yrowincin64bitincs
:12;
60 uint32_t /* reserved */ : 6;
62 /* AXI Output 1 CbCr Configuration, Part 1 */
63 uint32_t out1cbcrimageheight
:12;
64 uint32_t /* reserved */ : 4;
65 uint32_t out1cbcrimagewidthin64bitwords
:10;
66 uint32_t /* reserved */ : 6;
68 /* AXI Output 1 CbCr Configuration, Part 2 */
69 uint8_t out1cbcrburstlen
:2;
70 uint32_t out1cbcrnumrows
:12;
71 uint32_t out1cbcrrowincin64bitincs
:12;
72 uint32_t /* reserved */ : 6;
74 /* AXI Output 2 Y Configuration, Part 1 */
75 uint32_t out2yimageheight
:12;
76 uint32_t /* reserved */ : 4;
77 uint32_t out2yimagewidthin64bitwords
:10;
78 uint32_t /* reserved */ : 6;
80 /* AXI Output 2 Y Configuration, Part 2 */
81 uint8_t out2yburstlen
:2;
82 uint32_t out2ynumrows
:12;
83 uint32_t out2yrowincin64bitincs
:12;
84 uint32_t /* reserved */ : 6;
86 /* AXI Output 2 CbCr Configuration, Part 1 */
87 uint32_t out2cbcrimageheight
:12;
88 uint32_t /* reserved */ : 4;
89 uint32_t out2cbcrimagewidtein64bitwords
:10;
90 uint32_t /* reserved */ : 6;
92 /* AXI Output 2 CbCr Configuration, Part 2 */
93 uint8_t out2cbcrburstlen
:2;
94 uint32_t out2cbcrnumrows
:12;
95 uint32_t out2cbcrrowincin64bitincs
:12;
96 uint32_t /* reserved */ : 6;
98 /* Address configuration:
99 * output1 phisycal address */
100 unsigned long output1buffer1_y_phy
;
101 unsigned long output1buffer1_cbcr_phy
;
102 unsigned long output1buffer2_y_phy
;
103 unsigned long output1buffer2_cbcr_phy
;
104 unsigned long output1buffer3_y_phy
;
105 unsigned long output1buffer3_cbcr_phy
;
106 unsigned long output1buffer4_y_phy
;
107 unsigned long output1buffer4_cbcr_phy
;
108 unsigned long output1buffer5_y_phy
;
109 unsigned long output1buffer5_cbcr_phy
;
110 unsigned long output1buffer6_y_phy
;
111 unsigned long output1buffer6_cbcr_phy
;
112 unsigned long output1buffer7_y_phy
;
113 unsigned long output1buffer7_cbcr_phy
;
114 unsigned long output1buffer8_y_phy
;
115 unsigned long output1buffer8_cbcr_phy
;
117 /* output2 phisycal address */
118 unsigned long output2buffer1_y_phy
;
119 unsigned long output2buffer1_cbcr_phy
;
120 unsigned long output2buffer2_y_phy
;
121 unsigned long output2buffer2_cbcr_phy
;
122 unsigned long output2buffer3_y_phy
;
123 unsigned long output2buffer3_cbcr_phy
;
124 unsigned long output2buffer4_y_phy
;
125 unsigned long output2buffer4_cbcr_phy
;
126 unsigned long output2buffer5_y_phy
;
127 unsigned long output2buffer5_cbcr_phy
;
128 unsigned long output2buffer6_y_phy
;
129 unsigned long output2buffer6_cbcr_phy
;
130 unsigned long output2buffer7_y_phy
;
131 unsigned long output2buffer7_cbcr_phy
;
132 unsigned long output2buffer8_y_phy
;
133 unsigned long output2buffer8_cbcr_phy
;
134 } __attribute__((packed
, aligned(4)));
136 struct vfe_stats_we_cfg
{
139 /* White Balance/Exposure Statistic Selection */
140 uint8_t wb_expstatsenable
:1;
141 uint8_t wb_expstatbuspriorityselection
:1;
142 unsigned int wb_expstatbuspriorityvalue
:4;
143 unsigned int /* reserved */ : 26;
145 /* White Balance/Exposure Statistic Configuration, Part 1 */
146 uint8_t exposurestatregions
:1;
147 uint8_t exposurestatsubregions
:1;
148 unsigned int /* reserved */ : 14;
150 unsigned int whitebalanceminimumy
:8;
151 unsigned int whitebalancemaximumy
:8;
153 /* White Balance/Exposure Statistic Configuration, Part 2 */
154 uint8_t wb_expstatslopeofneutralregionline
[
155 NUM_WB_EXP_NEUTRAL_REGION_LINES
];
157 /* White Balance/Exposure Statistic Configuration, Part 3 */
158 unsigned int wb_expstatcrinterceptofneutralregionline2
:12;
159 unsigned int /* reserved */ : 4;
160 unsigned int wb_expstatcbinterceptofneutralreginnline1
:12;
161 unsigned int /* reserved */ : 4;
163 /* White Balance/Exposure Statistic Configuration, Part 4 */
164 unsigned int wb_expstatcrinterceptofneutralregionline4
:12;
165 unsigned int /* reserved */ : 4;
166 unsigned int wb_expstatcbinterceptofneutralregionline3
:12;
167 unsigned int /* reserved */ : 4;
169 /* White Balance/Exposure Statistic Output Buffer Header */
170 unsigned int wb_expmetricheaderpattern
:8;
171 unsigned int /* reserved */ : 24;
173 /* White Balance/Exposure Statistic Output Buffers-MUST
174 * BE 64 bit ALIGNED */
175 void *wb_expstatoutputbuffer
[NUM_WB_EXP_STAT_OUTPUT_BUFFERS
];
176 } __attribute__((packed
, aligned(4)));
178 struct vfe_stats_af_cfg
{
181 /* Autofocus Statistic Selection */
183 uint8_t af_busprioritysel
:1;
184 unsigned int af_buspriorityval
:4;
185 unsigned int /* reserved */ : 26;
187 /* Autofocus Statistic Configuration, Part 1 */
188 unsigned int af_singlewinvoffset
:12;
189 unsigned int /* reserved */ : 4;
190 unsigned int af_singlewinhoffset
:12;
191 unsigned int /* reserved */ : 3;
192 uint8_t af_winmode
:1;
194 /* Autofocus Statistic Configuration, Part 2 */
195 unsigned int af_singglewinvh
:11;
196 unsigned int /* reserved */ : 5;
197 unsigned int af_singlewinhw
:11;
198 unsigned int /* reserved */ : 5;
200 /* Autofocus Statistic Configuration, Parts 3-6 */
201 uint8_t af_multiwingrid
[NUM_AUTOFOCUS_MULTI_WINDOW_GRIDS
];
203 /* Autofocus Statistic Configuration, Part 7 */
204 signed int af_metrichpfcoefa00
:5;
205 signed int af_metrichpfcoefa04
:5;
206 unsigned int af_metricmaxval
:11;
207 uint8_t af_metricsel
:1;
208 unsigned int /* reserved */ : 10;
210 /* Autofocus Statistic Configuration, Part 8 */
211 signed int af_metrichpfcoefa20
:5;
212 signed int af_metrichpfcoefa21
:5;
213 signed int af_metrichpfcoefa22
:5;
214 signed int af_metrichpfcoefa23
:5;
215 signed int af_metrichpfcoefa24
:5;
216 unsigned int /* reserved */ : 7;
218 /* Autofocus Statistic Output Buffer Header */
219 unsigned int af_metrichp
:8;
220 unsigned int /* reserved */ : 24;
222 /* Autofocus Statistic Output Buffers - MUST BE 64 bit ALIGNED!!! */
223 void *af_outbuf
[NUM_AF_STAT_OUTPUT_BUFFERS
];
224 } __attribute__((packed
, aligned(4))); /* VFE_StatsAutofocusConfigCmdType */
226 struct msm_camera_frame_msg
{
227 unsigned long output_y_address
;
228 unsigned long output_cbcr_address
;
230 unsigned int blacklevelevenColumn
:23;
231 uint16_t reserved1
:9;
232 unsigned int blackleveloddColumn
:23;
233 uint16_t reserved2
:9;
235 uint16_t greendefectpixelcount
:8;
236 uint16_t reserved3
:8;
237 uint16_t redbluedefectpixelcount
:8;
238 uint16_t reserved4
:8;
239 } __attribute__((packed
, aligned(4)));
242 struct msm_vfe_command_7k
{
249 wait_queue_head_t wait
;
255 #endif /* __MSM_VFE7X_H__ */