1 From 212b50d76ee63b58a59ccb687719583f72ea5e23 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.org>
3 Date: Thu, 10 May 2018 12:42:17 -0700
4 Subject: [PATCH 376/454] staging: bcm2835-camera: Fix indentation of tables
6 commit 6166045e7964067dba0da43a122de27ceb49be7b upstream
8 As requested by Mauro Carvalho Chehab in review.
10 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
11 Signed-off-by: Eric Anholt <eric@anholt.net>
12 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
14 .../bcm2835-camera/bcm2835-camera.c | 289 +++++++++---------
15 1 file changed, 139 insertions(+), 150 deletions(-)
17 --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
18 +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
19 @@ -81,145 +81,132 @@ static const struct v4l2_fract
21 static struct mmal_fmt formats[] = {
23 - .name = "4:2:0, planar, YUV",
24 - .fourcc = V4L2_PIX_FMT_YUV420,
26 - .mmal = MMAL_ENCODING_I420,
28 - .mmal_component = MMAL_COMPONENT_CAMERA,
30 - .remove_padding = 1,
33 - .name = "4:2:2, packed, YUYV",
34 - .fourcc = V4L2_PIX_FMT_YUYV,
36 - .mmal = MMAL_ENCODING_YUYV,
38 - .mmal_component = MMAL_COMPONENT_CAMERA,
40 - .remove_padding = 0,
43 - .name = "RGB24 (LE)",
44 - .fourcc = V4L2_PIX_FMT_RGB24,
46 - .mmal = MMAL_ENCODING_RGB24,
48 - .mmal_component = MMAL_COMPONENT_CAMERA,
50 - .remove_padding = 0,
54 - .fourcc = V4L2_PIX_FMT_JPEG,
55 - .flags = V4L2_FMT_FLAG_COMPRESSED,
56 - .mmal = MMAL_ENCODING_JPEG,
58 - .mmal_component = MMAL_COMPONENT_IMAGE_ENCODE,
60 - .remove_padding = 0,
64 - .fourcc = V4L2_PIX_FMT_H264,
65 - .flags = V4L2_FMT_FLAG_COMPRESSED,
66 - .mmal = MMAL_ENCODING_H264,
68 - .mmal_component = MMAL_COMPONENT_VIDEO_ENCODE,
70 - .remove_padding = 0,
74 - .fourcc = V4L2_PIX_FMT_MJPEG,
75 - .flags = V4L2_FMT_FLAG_COMPRESSED,
76 - .mmal = MMAL_ENCODING_MJPEG,
78 - .mmal_component = MMAL_COMPONENT_VIDEO_ENCODE,
80 - .remove_padding = 0,
83 - .name = "4:2:2, packed, YVYU",
84 - .fourcc = V4L2_PIX_FMT_YVYU,
86 - .mmal = MMAL_ENCODING_YVYU,
88 - .mmal_component = MMAL_COMPONENT_CAMERA,
90 - .remove_padding = 0,
93 - .name = "4:2:2, packed, VYUY",
94 - .fourcc = V4L2_PIX_FMT_VYUY,
96 - .mmal = MMAL_ENCODING_VYUY,
98 - .mmal_component = MMAL_COMPONENT_CAMERA,
100 - .remove_padding = 0,
103 - .name = "4:2:2, packed, UYVY",
104 - .fourcc = V4L2_PIX_FMT_UYVY,
106 - .mmal = MMAL_ENCODING_UYVY,
108 - .mmal_component = MMAL_COMPONENT_CAMERA,
110 - .remove_padding = 0,
113 - .name = "4:2:0, planar, NV12",
114 - .fourcc = V4L2_PIX_FMT_NV12,
116 - .mmal = MMAL_ENCODING_NV12,
118 - .mmal_component = MMAL_COMPONENT_CAMERA,
120 - .remove_padding = 1,
123 - .name = "RGB24 (BE)",
124 - .fourcc = V4L2_PIX_FMT_BGR24,
126 - .mmal = MMAL_ENCODING_BGR24,
128 - .mmal_component = MMAL_COMPONENT_CAMERA,
130 - .remove_padding = 0,
133 - .name = "4:2:0, planar, YVU",
134 - .fourcc = V4L2_PIX_FMT_YVU420,
136 - .mmal = MMAL_ENCODING_YV12,
138 - .mmal_component = MMAL_COMPONENT_CAMERA,
140 - .remove_padding = 1,
143 - .name = "4:2:0, planar, NV21",
144 - .fourcc = V4L2_PIX_FMT_NV21,
146 - .mmal = MMAL_ENCODING_NV21,
148 - .mmal_component = MMAL_COMPONENT_CAMERA,
150 - .remove_padding = 1,
153 - .name = "RGB32 (BE)",
154 - .fourcc = V4L2_PIX_FMT_BGR32,
156 - .mmal = MMAL_ENCODING_BGRA,
158 - .mmal_component = MMAL_COMPONENT_CAMERA,
160 - .remove_padding = 0,
162 + .name = "4:2:0, planar, YUV",
163 + .fourcc = V4L2_PIX_FMT_YUV420,
165 + .mmal = MMAL_ENCODING_I420,
167 + .mmal_component = MMAL_COMPONENT_CAMERA,
169 + .remove_padding = 1,
171 + .name = "4:2:2, packed, YUYV",
172 + .fourcc = V4L2_PIX_FMT_YUYV,
174 + .mmal = MMAL_ENCODING_YUYV,
176 + .mmal_component = MMAL_COMPONENT_CAMERA,
178 + .remove_padding = 0,
180 + .name = "RGB24 (LE)",
181 + .fourcc = V4L2_PIX_FMT_RGB24,
183 + .mmal = MMAL_ENCODING_RGB24,
185 + .mmal_component = MMAL_COMPONENT_CAMERA,
187 + .remove_padding = 0,
190 + .fourcc = V4L2_PIX_FMT_JPEG,
191 + .flags = V4L2_FMT_FLAG_COMPRESSED,
192 + .mmal = MMAL_ENCODING_JPEG,
194 + .mmal_component = MMAL_COMPONENT_IMAGE_ENCODE,
196 + .remove_padding = 0,
199 + .fourcc = V4L2_PIX_FMT_H264,
200 + .flags = V4L2_FMT_FLAG_COMPRESSED,
201 + .mmal = MMAL_ENCODING_H264,
203 + .mmal_component = MMAL_COMPONENT_VIDEO_ENCODE,
205 + .remove_padding = 0,
208 + .fourcc = V4L2_PIX_FMT_MJPEG,
209 + .flags = V4L2_FMT_FLAG_COMPRESSED,
210 + .mmal = MMAL_ENCODING_MJPEG,
212 + .mmal_component = MMAL_COMPONENT_VIDEO_ENCODE,
214 + .remove_padding = 0,
216 + .name = "4:2:2, packed, YVYU",
217 + .fourcc = V4L2_PIX_FMT_YVYU,
219 + .mmal = MMAL_ENCODING_YVYU,
221 + .mmal_component = MMAL_COMPONENT_CAMERA,
223 + .remove_padding = 0,
225 + .name = "4:2:2, packed, VYUY",
226 + .fourcc = V4L2_PIX_FMT_VYUY,
228 + .mmal = MMAL_ENCODING_VYUY,
230 + .mmal_component = MMAL_COMPONENT_CAMERA,
232 + .remove_padding = 0,
234 + .name = "4:2:2, packed, UYVY",
235 + .fourcc = V4L2_PIX_FMT_UYVY,
237 + .mmal = MMAL_ENCODING_UYVY,
239 + .mmal_component = MMAL_COMPONENT_CAMERA,
241 + .remove_padding = 0,
243 + .name = "4:2:0, planar, NV12",
244 + .fourcc = V4L2_PIX_FMT_NV12,
246 + .mmal = MMAL_ENCODING_NV12,
248 + .mmal_component = MMAL_COMPONENT_CAMERA,
250 + .remove_padding = 1,
252 + .name = "RGB24 (BE)",
253 + .fourcc = V4L2_PIX_FMT_BGR24,
255 + .mmal = MMAL_ENCODING_BGR24,
257 + .mmal_component = MMAL_COMPONENT_CAMERA,
259 + .remove_padding = 0,
261 + .name = "4:2:0, planar, YVU",
262 + .fourcc = V4L2_PIX_FMT_YVU420,
264 + .mmal = MMAL_ENCODING_YV12,
266 + .mmal_component = MMAL_COMPONENT_CAMERA,
268 + .remove_padding = 1,
270 + .name = "4:2:0, planar, NV21",
271 + .fourcc = V4L2_PIX_FMT_NV21,
273 + .mmal = MMAL_ENCODING_NV21,
275 + .mmal_component = MMAL_COMPONENT_CAMERA,
277 + .remove_padding = 1,
279 + .name = "RGB32 (BE)",
280 + .fourcc = V4L2_PIX_FMT_BGR32,
282 + .mmal = MMAL_ENCODING_BGRA,
284 + .mmal_component = MMAL_COMPONENT_CAMERA,
286 + .remove_padding = 0,
290 static struct mmal_fmt *get_format(struct v4l2_format *f)
291 @@ -709,17 +696,19 @@ static int set_overlay_params(struct bm2
292 struct vchiq_mmal_port *port)
294 struct mmal_parameter_displayregion prev_config = {
295 - .set = MMAL_DISPLAY_SET_LAYER | MMAL_DISPLAY_SET_ALPHA |
296 - MMAL_DISPLAY_SET_DEST_RECT | MMAL_DISPLAY_SET_FULLSCREEN,
297 - .layer = PREVIEW_LAYER,
298 - .alpha = dev->overlay.global_alpha,
301 - .x = dev->overlay.w.left,
302 - .y = dev->overlay.w.top,
303 - .width = dev->overlay.w.width,
304 - .height = dev->overlay.w.height,
306 + .set = MMAL_DISPLAY_SET_LAYER |
307 + MMAL_DISPLAY_SET_ALPHA |
308 + MMAL_DISPLAY_SET_DEST_RECT |
309 + MMAL_DISPLAY_SET_FULLSCREEN,
310 + .layer = PREVIEW_LAYER,
311 + .alpha = dev->overlay.global_alpha,
314 + .x = dev->overlay.w.left,
315 + .y = dev->overlay.w.top,
316 + .width = dev->overlay.w.width,
317 + .height = dev->overlay.w.height,
320 return vchiq_mmal_port_parameter_set(dev->instance, port,
321 MMAL_PARAMETER_DISPLAYREGION,