aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/vivid/vivid-vid-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/platform/vivid/vivid-vid-common.c')
-rw-r--r--drivers/media/platform/vivid/vivid-vid-common.c68
1 files changed, 18 insertions, 50 deletions
diff --git a/drivers/media/platform/vivid/vivid-vid-common.c b/drivers/media/platform/vivid/vivid-vid-common.c
index aa446271ad34..fc73927a4abc 100644
--- a/drivers/media/platform/vivid/vivid-vid-common.c
+++ b/drivers/media/platform/vivid/vivid-vid-common.c
@@ -45,7 +45,6 @@ const struct v4l2_dv_timings_cap vivid_dv_timings_cap = {
45 45
46struct vivid_fmt vivid_formats[] = { 46struct vivid_fmt vivid_formats[] = {
47 { 47 {
48 .name = "4:2:2, packed, YUYV",
49 .fourcc = V4L2_PIX_FMT_YUYV, 48 .fourcc = V4L2_PIX_FMT_YUYV,
50 .vdownsampling = { 1 }, 49 .vdownsampling = { 1 },
51 .bit_depth = { 16 }, 50 .bit_depth = { 16 },
@@ -55,7 +54,6 @@ struct vivid_fmt vivid_formats[] = {
55 .data_offset = { PLANE0_DATA_OFFSET }, 54 .data_offset = { PLANE0_DATA_OFFSET },
56 }, 55 },
57 { 56 {
58 .name = "4:2:2, packed, UYVY",
59 .fourcc = V4L2_PIX_FMT_UYVY, 57 .fourcc = V4L2_PIX_FMT_UYVY,
60 .vdownsampling = { 1 }, 58 .vdownsampling = { 1 },
61 .bit_depth = { 16 }, 59 .bit_depth = { 16 },
@@ -64,7 +62,6 @@ struct vivid_fmt vivid_formats[] = {
64 .buffers = 1, 62 .buffers = 1,
65 }, 63 },
66 { 64 {
67 .name = "4:2:2, packed, YVYU",
68 .fourcc = V4L2_PIX_FMT_YVYU, 65 .fourcc = V4L2_PIX_FMT_YVYU,
69 .vdownsampling = { 1 }, 66 .vdownsampling = { 1 },
70 .bit_depth = { 16 }, 67 .bit_depth = { 16 },
@@ -73,7 +70,6 @@ struct vivid_fmt vivid_formats[] = {
73 .buffers = 1, 70 .buffers = 1,
74 }, 71 },
75 { 72 {
76 .name = "4:2:2, packed, VYUY",
77 .fourcc = V4L2_PIX_FMT_VYUY, 73 .fourcc = V4L2_PIX_FMT_VYUY,
78 .vdownsampling = { 1 }, 74 .vdownsampling = { 1 },
79 .bit_depth = { 16 }, 75 .bit_depth = { 16 },
@@ -82,7 +78,6 @@ struct vivid_fmt vivid_formats[] = {
82 .buffers = 1, 78 .buffers = 1,
83 }, 79 },
84 { 80 {
85 .name = "YUV 4:2:2 triplanar",
86 .fourcc = V4L2_PIX_FMT_YUV422P, 81 .fourcc = V4L2_PIX_FMT_YUV422P,
87 .vdownsampling = { 1, 1, 1 }, 82 .vdownsampling = { 1, 1, 1 },
88 .bit_depth = { 8, 4, 4 }, 83 .bit_depth = { 8, 4, 4 },
@@ -91,7 +86,6 @@ struct vivid_fmt vivid_formats[] = {
91 .buffers = 1, 86 .buffers = 1,
92 }, 87 },
93 { 88 {
94 .name = "YUV 4:2:0 triplanar",
95 .fourcc = V4L2_PIX_FMT_YUV420, 89 .fourcc = V4L2_PIX_FMT_YUV420,
96 .vdownsampling = { 1, 2, 2 }, 90 .vdownsampling = { 1, 2, 2 },
97 .bit_depth = { 8, 4, 4 }, 91 .bit_depth = { 8, 4, 4 },
@@ -100,7 +94,6 @@ struct vivid_fmt vivid_formats[] = {
100 .buffers = 1, 94 .buffers = 1,
101 }, 95 },
102 { 96 {
103 .name = "YVU 4:2:0 triplanar",
104 .fourcc = V4L2_PIX_FMT_YVU420, 97 .fourcc = V4L2_PIX_FMT_YVU420,
105 .vdownsampling = { 1, 2, 2 }, 98 .vdownsampling = { 1, 2, 2 },
106 .bit_depth = { 8, 4, 4 }, 99 .bit_depth = { 8, 4, 4 },
@@ -109,7 +102,6 @@ struct vivid_fmt vivid_formats[] = {
109 .buffers = 1, 102 .buffers = 1,
110 }, 103 },
111 { 104 {
112 .name = "YUV 4:2:0 biplanar",
113 .fourcc = V4L2_PIX_FMT_NV12, 105 .fourcc = V4L2_PIX_FMT_NV12,
114 .vdownsampling = { 1, 2 }, 106 .vdownsampling = { 1, 2 },
115 .bit_depth = { 8, 8 }, 107 .bit_depth = { 8, 8 },
@@ -118,7 +110,6 @@ struct vivid_fmt vivid_formats[] = {
118 .buffers = 1, 110 .buffers = 1,
119 }, 111 },
120 { 112 {
121 .name = "YVU 4:2:0 biplanar",
122 .fourcc = V4L2_PIX_FMT_NV21, 113 .fourcc = V4L2_PIX_FMT_NV21,
123 .vdownsampling = { 1, 2 }, 114 .vdownsampling = { 1, 2 },
124 .bit_depth = { 8, 8 }, 115 .bit_depth = { 8, 8 },
@@ -127,7 +118,6 @@ struct vivid_fmt vivid_formats[] = {
127 .buffers = 1, 118 .buffers = 1,
128 }, 119 },
129 { 120 {
130 .name = "YUV 4:2:2 biplanar",
131 .fourcc = V4L2_PIX_FMT_NV16, 121 .fourcc = V4L2_PIX_FMT_NV16,
132 .vdownsampling = { 1, 1 }, 122 .vdownsampling = { 1, 1 },
133 .bit_depth = { 8, 8 }, 123 .bit_depth = { 8, 8 },
@@ -136,7 +126,6 @@ struct vivid_fmt vivid_formats[] = {
136 .buffers = 1, 126 .buffers = 1,
137 }, 127 },
138 { 128 {
139 .name = "YVU 4:2:2 biplanar",
140 .fourcc = V4L2_PIX_FMT_NV61, 129 .fourcc = V4L2_PIX_FMT_NV61,
141 .vdownsampling = { 1, 1 }, 130 .vdownsampling = { 1, 1 },
142 .bit_depth = { 8, 8 }, 131 .bit_depth = { 8, 8 },
@@ -145,7 +134,6 @@ struct vivid_fmt vivid_formats[] = {
145 .buffers = 1, 134 .buffers = 1,
146 }, 135 },
147 { 136 {
148 .name = "YUV 4:4:4 biplanar",
149 .fourcc = V4L2_PIX_FMT_NV24, 137 .fourcc = V4L2_PIX_FMT_NV24,
150 .vdownsampling = { 1, 1 }, 138 .vdownsampling = { 1, 1 },
151 .bit_depth = { 8, 16 }, 139 .bit_depth = { 8, 16 },
@@ -154,7 +142,6 @@ struct vivid_fmt vivid_formats[] = {
154 .buffers = 1, 142 .buffers = 1,
155 }, 143 },
156 { 144 {
157 .name = "YVU 4:4:4 biplanar",
158 .fourcc = V4L2_PIX_FMT_NV42, 145 .fourcc = V4L2_PIX_FMT_NV42,
159 .vdownsampling = { 1, 1 }, 146 .vdownsampling = { 1, 1 },
160 .bit_depth = { 8, 16 }, 147 .bit_depth = { 8, 16 },
@@ -163,7 +150,6 @@ struct vivid_fmt vivid_formats[] = {
163 .buffers = 1, 150 .buffers = 1,
164 }, 151 },
165 { 152 {
166 .name = "YUV555 (LE)",
167 .fourcc = V4L2_PIX_FMT_YUV555, /* uuuvvvvv ayyyyyuu */ 153 .fourcc = V4L2_PIX_FMT_YUV555, /* uuuvvvvv ayyyyyuu */
168 .vdownsampling = { 1 }, 154 .vdownsampling = { 1 },
169 .bit_depth = { 16 }, 155 .bit_depth = { 16 },
@@ -172,7 +158,6 @@ struct vivid_fmt vivid_formats[] = {
172 .alpha_mask = 0x8000, 158 .alpha_mask = 0x8000,
173 }, 159 },
174 { 160 {
175 .name = "YUV565 (LE)",
176 .fourcc = V4L2_PIX_FMT_YUV565, /* uuuvvvvv yyyyyuuu */ 161 .fourcc = V4L2_PIX_FMT_YUV565, /* uuuvvvvv yyyyyuuu */
177 .vdownsampling = { 1 }, 162 .vdownsampling = { 1 },
178 .bit_depth = { 16 }, 163 .bit_depth = { 16 },
@@ -180,7 +165,6 @@ struct vivid_fmt vivid_formats[] = {
180 .buffers = 1, 165 .buffers = 1,
181 }, 166 },
182 { 167 {
183 .name = "YUV444",
184 .fourcc = V4L2_PIX_FMT_YUV444, /* uuuuvvvv aaaayyyy */ 168 .fourcc = V4L2_PIX_FMT_YUV444, /* uuuuvvvv aaaayyyy */
185 .vdownsampling = { 1 }, 169 .vdownsampling = { 1 },
186 .bit_depth = { 16 }, 170 .bit_depth = { 16 },
@@ -189,7 +173,6 @@ struct vivid_fmt vivid_formats[] = {
189 .alpha_mask = 0xf000, 173 .alpha_mask = 0xf000,
190 }, 174 },
191 { 175 {
192 .name = "YUV32 (LE)",
193 .fourcc = V4L2_PIX_FMT_YUV32, /* ayuv */ 176 .fourcc = V4L2_PIX_FMT_YUV32, /* ayuv */
194 .vdownsampling = { 1 }, 177 .vdownsampling = { 1 },
195 .bit_depth = { 32 }, 178 .bit_depth = { 32 },
@@ -198,7 +181,6 @@ struct vivid_fmt vivid_formats[] = {
198 .alpha_mask = 0x000000ff, 181 .alpha_mask = 0x000000ff,
199 }, 182 },
200 { 183 {
201 .name = "Monochrome",
202 .fourcc = V4L2_PIX_FMT_GREY, 184 .fourcc = V4L2_PIX_FMT_GREY,
203 .vdownsampling = { 1 }, 185 .vdownsampling = { 1 },
204 .bit_depth = { 8 }, 186 .bit_depth = { 8 },
@@ -207,7 +189,22 @@ struct vivid_fmt vivid_formats[] = {
207 .buffers = 1, 189 .buffers = 1,
208 }, 190 },
209 { 191 {
210 .name = "RGB332", 192 .fourcc = V4L2_PIX_FMT_Y16,
193 .vdownsampling = { 1 },
194 .bit_depth = { 16 },
195 .is_yuv = true,
196 .planes = 1,
197 .buffers = 1,
198 },
199 {
200 .fourcc = V4L2_PIX_FMT_Y16_BE,
201 .vdownsampling = { 1 },
202 .bit_depth = { 16 },
203 .is_yuv = true,
204 .planes = 1,
205 .buffers = 1,
206 },
207 {
211 .fourcc = V4L2_PIX_FMT_RGB332, /* rrrgggbb */ 208 .fourcc = V4L2_PIX_FMT_RGB332, /* rrrgggbb */
212 .vdownsampling = { 1 }, 209 .vdownsampling = { 1 },
213 .bit_depth = { 8 }, 210 .bit_depth = { 8 },
@@ -215,7 +212,6 @@ struct vivid_fmt vivid_formats[] = {
215 .buffers = 1, 212 .buffers = 1,
216 }, 213 },
217 { 214 {
218 .name = "RGB565 (LE)",
219 .fourcc = V4L2_PIX_FMT_RGB565, /* gggbbbbb rrrrrggg */ 215 .fourcc = V4L2_PIX_FMT_RGB565, /* gggbbbbb rrrrrggg */
220 .vdownsampling = { 1 }, 216 .vdownsampling = { 1 },
221 .bit_depth = { 16 }, 217 .bit_depth = { 16 },
@@ -224,7 +220,6 @@ struct vivid_fmt vivid_formats[] = {
224 .can_do_overlay = true, 220 .can_do_overlay = true,
225 }, 221 },
226 { 222 {
227 .name = "RGB565 (BE)",
228 .fourcc = V4L2_PIX_FMT_RGB565X, /* rrrrrggg gggbbbbb */ 223 .fourcc = V4L2_PIX_FMT_RGB565X, /* rrrrrggg gggbbbbb */
229 .vdownsampling = { 1 }, 224 .vdownsampling = { 1 },
230 .bit_depth = { 16 }, 225 .bit_depth = { 16 },
@@ -233,7 +228,6 @@ struct vivid_fmt vivid_formats[] = {
233 .can_do_overlay = true, 228 .can_do_overlay = true,
234 }, 229 },
235 { 230 {
236 .name = "RGB444",
237 .fourcc = V4L2_PIX_FMT_RGB444, /* xxxxrrrr ggggbbbb */ 231 .fourcc = V4L2_PIX_FMT_RGB444, /* xxxxrrrr ggggbbbb */
238 .vdownsampling = { 1 }, 232 .vdownsampling = { 1 },
239 .bit_depth = { 16 }, 233 .bit_depth = { 16 },
@@ -241,7 +235,6 @@ struct vivid_fmt vivid_formats[] = {
241 .buffers = 1, 235 .buffers = 1,
242 }, 236 },
243 { 237 {
244 .name = "XRGB444",
245 .fourcc = V4L2_PIX_FMT_XRGB444, /* xxxxrrrr ggggbbbb */ 238 .fourcc = V4L2_PIX_FMT_XRGB444, /* xxxxrrrr ggggbbbb */
246 .vdownsampling = { 1 }, 239 .vdownsampling = { 1 },
247 .bit_depth = { 16 }, 240 .bit_depth = { 16 },
@@ -249,7 +242,6 @@ struct vivid_fmt vivid_formats[] = {
249 .buffers = 1, 242 .buffers = 1,
250 }, 243 },
251 { 244 {
252 .name = "ARGB444",
253 .fourcc = V4L2_PIX_FMT_ARGB444, /* aaaarrrr ggggbbbb */ 245 .fourcc = V4L2_PIX_FMT_ARGB444, /* aaaarrrr ggggbbbb */
254 .vdownsampling = { 1 }, 246 .vdownsampling = { 1 },
255 .bit_depth = { 16 }, 247 .bit_depth = { 16 },
@@ -258,7 +250,6 @@ struct vivid_fmt vivid_formats[] = {
258 .alpha_mask = 0x00f0, 250 .alpha_mask = 0x00f0,
259 }, 251 },
260 { 252 {
261 .name = "RGB555 (LE)",
262 .fourcc = V4L2_PIX_FMT_RGB555, /* gggbbbbb xrrrrrgg */ 253 .fourcc = V4L2_PIX_FMT_RGB555, /* gggbbbbb xrrrrrgg */
263 .vdownsampling = { 1 }, 254 .vdownsampling = { 1 },
264 .bit_depth = { 16 }, 255 .bit_depth = { 16 },
@@ -267,7 +258,6 @@ struct vivid_fmt vivid_formats[] = {
267 .can_do_overlay = true, 258 .can_do_overlay = true,
268 }, 259 },
269 { 260 {
270 .name = "XRGB555 (LE)",
271 .fourcc = V4L2_PIX_FMT_XRGB555, /* gggbbbbb xrrrrrgg */ 261 .fourcc = V4L2_PIX_FMT_XRGB555, /* gggbbbbb xrrrrrgg */
272 .vdownsampling = { 1 }, 262 .vdownsampling = { 1 },
273 .bit_depth = { 16 }, 263 .bit_depth = { 16 },
@@ -276,7 +266,6 @@ struct vivid_fmt vivid_formats[] = {
276 .can_do_overlay = true, 266 .can_do_overlay = true,
277 }, 267 },
278 { 268 {
279 .name = "ARGB555 (LE)",
280 .fourcc = V4L2_PIX_FMT_ARGB555, /* gggbbbbb arrrrrgg */ 269 .fourcc = V4L2_PIX_FMT_ARGB555, /* gggbbbbb arrrrrgg */
281 .vdownsampling = { 1 }, 270 .vdownsampling = { 1 },
282 .bit_depth = { 16 }, 271 .bit_depth = { 16 },
@@ -286,7 +275,6 @@ struct vivid_fmt vivid_formats[] = {
286 .alpha_mask = 0x8000, 275 .alpha_mask = 0x8000,
287 }, 276 },
288 { 277 {
289 .name = "RGB555 (BE)",
290 .fourcc = V4L2_PIX_FMT_RGB555X, /* xrrrrrgg gggbbbbb */ 278 .fourcc = V4L2_PIX_FMT_RGB555X, /* xrrrrrgg gggbbbbb */
291 .vdownsampling = { 1 }, 279 .vdownsampling = { 1 },
292 .bit_depth = { 16 }, 280 .bit_depth = { 16 },
@@ -294,7 +282,6 @@ struct vivid_fmt vivid_formats[] = {
294 .buffers = 1, 282 .buffers = 1,
295 }, 283 },
296 { 284 {
297 .name = "XRGB555 (BE)",
298 .fourcc = V4L2_PIX_FMT_XRGB555X, /* xrrrrrgg gggbbbbb */ 285 .fourcc = V4L2_PIX_FMT_XRGB555X, /* xrrrrrgg gggbbbbb */
299 .vdownsampling = { 1 }, 286 .vdownsampling = { 1 },
300 .bit_depth = { 16 }, 287 .bit_depth = { 16 },
@@ -302,7 +289,6 @@ struct vivid_fmt vivid_formats[] = {
302 .buffers = 1, 289 .buffers = 1,
303 }, 290 },
304 { 291 {
305 .name = "ARGB555 (BE)",
306 .fourcc = V4L2_PIX_FMT_ARGB555X, /* arrrrrgg gggbbbbb */ 292 .fourcc = V4L2_PIX_FMT_ARGB555X, /* arrrrrgg gggbbbbb */
307 .vdownsampling = { 1 }, 293 .vdownsampling = { 1 },
308 .bit_depth = { 16 }, 294 .bit_depth = { 16 },
@@ -311,7 +297,6 @@ struct vivid_fmt vivid_formats[] = {
311 .alpha_mask = 0x0080, 297 .alpha_mask = 0x0080,
312 }, 298 },
313 { 299 {
314 .name = "RGB24 (LE)",
315 .fourcc = V4L2_PIX_FMT_RGB24, /* rgb */ 300 .fourcc = V4L2_PIX_FMT_RGB24, /* rgb */
316 .vdownsampling = { 1 }, 301 .vdownsampling = { 1 },
317 .bit_depth = { 24 }, 302 .bit_depth = { 24 },
@@ -319,7 +304,6 @@ struct vivid_fmt vivid_formats[] = {
319 .buffers = 1, 304 .buffers = 1,
320 }, 305 },
321 { 306 {
322 .name = "RGB24 (BE)",
323 .fourcc = V4L2_PIX_FMT_BGR24, /* bgr */ 307 .fourcc = V4L2_PIX_FMT_BGR24, /* bgr */
324 .vdownsampling = { 1 }, 308 .vdownsampling = { 1 },
325 .bit_depth = { 24 }, 309 .bit_depth = { 24 },
@@ -327,7 +311,6 @@ struct vivid_fmt vivid_formats[] = {
327 .buffers = 1, 311 .buffers = 1,
328 }, 312 },
329 { 313 {
330 .name = "BGR666",
331 .fourcc = V4L2_PIX_FMT_BGR666, /* bbbbbbgg ggggrrrr rrxxxxxx */ 314 .fourcc = V4L2_PIX_FMT_BGR666, /* bbbbbbgg ggggrrrr rrxxxxxx */
332 .vdownsampling = { 1 }, 315 .vdownsampling = { 1 },
333 .bit_depth = { 32 }, 316 .bit_depth = { 32 },
@@ -335,7 +318,6 @@ struct vivid_fmt vivid_formats[] = {
335 .buffers = 1, 318 .buffers = 1,
336 }, 319 },
337 { 320 {
338 .name = "RGB32 (LE)",
339 .fourcc = V4L2_PIX_FMT_RGB32, /* xrgb */ 321 .fourcc = V4L2_PIX_FMT_RGB32, /* xrgb */
340 .vdownsampling = { 1 }, 322 .vdownsampling = { 1 },
341 .bit_depth = { 32 }, 323 .bit_depth = { 32 },
@@ -343,7 +325,6 @@ struct vivid_fmt vivid_formats[] = {
343 .buffers = 1, 325 .buffers = 1,
344 }, 326 },
345 { 327 {
346 .name = "RGB32 (BE)",
347 .fourcc = V4L2_PIX_FMT_BGR32, /* bgrx */ 328 .fourcc = V4L2_PIX_FMT_BGR32, /* bgrx */
348 .vdownsampling = { 1 }, 329 .vdownsampling = { 1 },
349 .bit_depth = { 32 }, 330 .bit_depth = { 32 },
@@ -351,7 +332,6 @@ struct vivid_fmt vivid_formats[] = {
351 .buffers = 1, 332 .buffers = 1,
352 }, 333 },
353 { 334 {
354 .name = "XRGB32 (LE)",
355 .fourcc = V4L2_PIX_FMT_XRGB32, /* xrgb */ 335 .fourcc = V4L2_PIX_FMT_XRGB32, /* xrgb */
356 .vdownsampling = { 1 }, 336 .vdownsampling = { 1 },
357 .bit_depth = { 32 }, 337 .bit_depth = { 32 },
@@ -359,7 +339,6 @@ struct vivid_fmt vivid_formats[] = {
359 .buffers = 1, 339 .buffers = 1,
360 }, 340 },
361 { 341 {
362 .name = "XRGB32 (BE)",
363 .fourcc = V4L2_PIX_FMT_XBGR32, /* bgrx */ 342 .fourcc = V4L2_PIX_FMT_XBGR32, /* bgrx */
364 .vdownsampling = { 1 }, 343 .vdownsampling = { 1 },
365 .bit_depth = { 32 }, 344 .bit_depth = { 32 },
@@ -367,7 +346,6 @@ struct vivid_fmt vivid_formats[] = {
367 .buffers = 1, 346 .buffers = 1,
368 }, 347 },
369 { 348 {
370 .name = "ARGB32 (LE)",
371 .fourcc = V4L2_PIX_FMT_ARGB32, /* argb */ 349 .fourcc = V4L2_PIX_FMT_ARGB32, /* argb */
372 .vdownsampling = { 1 }, 350 .vdownsampling = { 1 },
373 .bit_depth = { 32 }, 351 .bit_depth = { 32 },
@@ -376,7 +354,6 @@ struct vivid_fmt vivid_formats[] = {
376 .alpha_mask = 0x000000ff, 354 .alpha_mask = 0x000000ff,
377 }, 355 },
378 { 356 {
379 .name = "ARGB32 (BE)",
380 .fourcc = V4L2_PIX_FMT_ABGR32, /* bgra */ 357 .fourcc = V4L2_PIX_FMT_ABGR32, /* bgra */
381 .vdownsampling = { 1 }, 358 .vdownsampling = { 1 },
382 .bit_depth = { 32 }, 359 .bit_depth = { 32 },
@@ -385,7 +362,6 @@ struct vivid_fmt vivid_formats[] = {
385 .alpha_mask = 0xff000000, 362 .alpha_mask = 0xff000000,
386 }, 363 },
387 { 364 {
388 .name = "Bayer BG/GR",
389 .fourcc = V4L2_PIX_FMT_SBGGR8, /* Bayer BG/GR */ 365 .fourcc = V4L2_PIX_FMT_SBGGR8, /* Bayer BG/GR */
390 .vdownsampling = { 1 }, 366 .vdownsampling = { 1 },
391 .bit_depth = { 8 }, 367 .bit_depth = { 8 },
@@ -393,7 +369,6 @@ struct vivid_fmt vivid_formats[] = {
393 .buffers = 1, 369 .buffers = 1,
394 }, 370 },
395 { 371 {
396 .name = "Bayer GB/RG",
397 .fourcc = V4L2_PIX_FMT_SGBRG8, /* Bayer GB/RG */ 372 .fourcc = V4L2_PIX_FMT_SGBRG8, /* Bayer GB/RG */
398 .vdownsampling = { 1 }, 373 .vdownsampling = { 1 },
399 .bit_depth = { 8 }, 374 .bit_depth = { 8 },
@@ -401,7 +376,6 @@ struct vivid_fmt vivid_formats[] = {
401 .buffers = 1, 376 .buffers = 1,
402 }, 377 },
403 { 378 {
404 .name = "Bayer GR/BG",
405 .fourcc = V4L2_PIX_FMT_SGRBG8, /* Bayer GR/BG */ 379 .fourcc = V4L2_PIX_FMT_SGRBG8, /* Bayer GR/BG */
406 .vdownsampling = { 1 }, 380 .vdownsampling = { 1 },
407 .bit_depth = { 8 }, 381 .bit_depth = { 8 },
@@ -409,7 +383,6 @@ struct vivid_fmt vivid_formats[] = {
409 .buffers = 1, 383 .buffers = 1,
410 }, 384 },
411 { 385 {
412 .name = "Bayer RG/GB",
413 .fourcc = V4L2_PIX_FMT_SRGGB8, /* Bayer RG/GB */ 386 .fourcc = V4L2_PIX_FMT_SRGGB8, /* Bayer RG/GB */
414 .vdownsampling = { 1 }, 387 .vdownsampling = { 1 },
415 .bit_depth = { 8 }, 388 .bit_depth = { 8 },
@@ -417,7 +390,6 @@ struct vivid_fmt vivid_formats[] = {
417 .buffers = 1, 390 .buffers = 1,
418 }, 391 },
419 { 392 {
420 .name = "4:2:2, biplanar, YUV",
421 .fourcc = V4L2_PIX_FMT_NV16M, 393 .fourcc = V4L2_PIX_FMT_NV16M,
422 .vdownsampling = { 1, 1 }, 394 .vdownsampling = { 1, 1 },
423 .bit_depth = { 8, 8 }, 395 .bit_depth = { 8, 8 },
@@ -427,7 +399,6 @@ struct vivid_fmt vivid_formats[] = {
427 .data_offset = { PLANE0_DATA_OFFSET, 0 }, 399 .data_offset = { PLANE0_DATA_OFFSET, 0 },
428 }, 400 },
429 { 401 {
430 .name = "4:2:2, biplanar, YVU",
431 .fourcc = V4L2_PIX_FMT_NV61M, 402 .fourcc = V4L2_PIX_FMT_NV61M,
432 .vdownsampling = { 1, 1 }, 403 .vdownsampling = { 1, 1 },
433 .bit_depth = { 8, 8 }, 404 .bit_depth = { 8, 8 },
@@ -437,7 +408,6 @@ struct vivid_fmt vivid_formats[] = {
437 .data_offset = { 0, PLANE0_DATA_OFFSET }, 408 .data_offset = { 0, PLANE0_DATA_OFFSET },
438 }, 409 },
439 { 410 {
440 .name = "4:2:0, triplanar, YUV",
441 .fourcc = V4L2_PIX_FMT_YUV420M, 411 .fourcc = V4L2_PIX_FMT_YUV420M,
442 .vdownsampling = { 1, 2, 2 }, 412 .vdownsampling = { 1, 2, 2 },
443 .bit_depth = { 8, 4, 4 }, 413 .bit_depth = { 8, 4, 4 },
@@ -446,7 +416,6 @@ struct vivid_fmt vivid_formats[] = {
446 .buffers = 3, 416 .buffers = 3,
447 }, 417 },
448 { 418 {
449 .name = "4:2:0, triplanar, YVU",
450 .fourcc = V4L2_PIX_FMT_YVU420M, 419 .fourcc = V4L2_PIX_FMT_YVU420M,
451 .vdownsampling = { 1, 2, 2 }, 420 .vdownsampling = { 1, 2, 2 },
452 .bit_depth = { 8, 4, 4 }, 421 .bit_depth = { 8, 4, 4 },
@@ -455,7 +424,6 @@ struct vivid_fmt vivid_formats[] = {
455 .buffers = 3, 424 .buffers = 3,
456 }, 425 },
457 { 426 {
458 .name = "4:2:0, biplanar, YUV",
459 .fourcc = V4L2_PIX_FMT_NV12M, 427 .fourcc = V4L2_PIX_FMT_NV12M,
460 .vdownsampling = { 1, 2 }, 428 .vdownsampling = { 1, 2 },
461 .bit_depth = { 8, 8 }, 429 .bit_depth = { 8, 8 },
@@ -464,7 +432,6 @@ struct vivid_fmt vivid_formats[] = {
464 .buffers = 2, 432 .buffers = 2,
465 }, 433 },
466 { 434 {
467 .name = "4:2:0, biplanar, YVU",
468 .fourcc = V4L2_PIX_FMT_NV21M, 435 .fourcc = V4L2_PIX_FMT_NV21M,
469 .vdownsampling = { 1, 2 }, 436 .vdownsampling = { 1, 2 },
470 .bit_depth = { 8, 8 }, 437 .bit_depth = { 8, 8 },
@@ -557,6 +524,7 @@ void fmt_sp2mp(const struct v4l2_format *sp_fmt, struct v4l2_format *mp_fmt)
557 mp->pixelformat = pix->pixelformat; 524 mp->pixelformat = pix->pixelformat;
558 mp->field = pix->field; 525 mp->field = pix->field;
559 mp->colorspace = pix->colorspace; 526 mp->colorspace = pix->colorspace;
527 mp->xfer_func = pix->xfer_func;
560 mp->ycbcr_enc = pix->ycbcr_enc; 528 mp->ycbcr_enc = pix->ycbcr_enc;
561 mp->quantization = pix->quantization; 529 mp->quantization = pix->quantization;
562 mp->num_planes = 1; 530 mp->num_planes = 1;
@@ -585,6 +553,7 @@ int fmt_sp2mp_func(struct file *file, void *priv,
585 pix->pixelformat = mp->pixelformat; 553 pix->pixelformat = mp->pixelformat;
586 pix->field = mp->field; 554 pix->field = mp->field;
587 pix->colorspace = mp->colorspace; 555 pix->colorspace = mp->colorspace;
556 pix->xfer_func = mp->xfer_func;
588 pix->ycbcr_enc = mp->ycbcr_enc; 557 pix->ycbcr_enc = mp->ycbcr_enc;
589 pix->quantization = mp->quantization; 558 pix->quantization = mp->quantization;
590 pix->sizeimage = ppix->sizeimage; 559 pix->sizeimage = ppix->sizeimage;
@@ -750,7 +719,6 @@ int vivid_enum_fmt_vid(struct file *file, void *priv,
750 719
751 fmt = &vivid_formats[f->index]; 720 fmt = &vivid_formats[f->index];
752 721
753 strlcpy(f->description, fmt->name, sizeof(f->description));
754 f->pixelformat = fmt->fourcc; 722 f->pixelformat = fmt->fourcc;
755 return 0; 723 return 0;
756} 724}