]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.17.12/media-staging-atomisp-comment-out-several-unused-sensor-resolutions.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.17.12 / media-staging-atomisp-comment-out-several-unused-sensor-resolutions.patch
CommitLineData
722b7c48
GKH
1From foo@baz Sat Jul 28 10:14:30 CEST 2018
2From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
3Date: Mon, 16 Apr 2018 12:37:08 -0400
4Subject: media: staging: atomisp: Comment out several unused sensor resolutions
5
6From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7
8[ Upstream commit db01f7ccfa6d4738e366077ce7423d1710b805f3 ]
9
10The register settings for several resolutions aren't used
11currently. So, comment them out.
12
13Fix those warnings:
14
15In file included from drivers/staging/media/atomisp/i2c/atomisp-gc2235.c:35:0:
16drivers/staging/media/atomisp/i2c/gc2235.h:340:32: warning: 'gc2235_960_640_30fps' defined but not used [-Wunused-const-variable=]
17 static struct gc2235_reg const gc2235_960_640_30fps[] = {
18 ^~~~~~~~~~~~~~~~~~~~
19drivers/staging/media/atomisp/i2c/gc2235.h:287:32: warning: 'gc2235_1296_736_30fps' defined but not used [-Wunused-const-variable=]
20 static struct gc2235_reg const gc2235_1296_736_30fps[] = {
21 ^~~~~~~~~~~~~~~~~~~~~
22In file included from drivers/staging/media/atomisp/i2c/atomisp-ov2722.c:35:0:
23drivers/staging/media/atomisp/i2c/ov2722.h:999:32: warning: 'ov2722_720p_30fps' defined but not used [-Wunused-const-variable=]
24 static struct ov2722_reg const ov2722_720p_30fps[] = {
25 ^~~~~~~~~~~~~~~~~
26drivers/staging/media/atomisp/i2c/ov2722.h:787:32: warning: 'ov2722_1M3_30fps' defined but not used [-Wunused-const-variable=]
27 static struct ov2722_reg const ov2722_1M3_30fps[] = {
28 ^~~~~~~~~~~~~~~~
29drivers/staging/media/atomisp/i2c/ov2722.h:476:32: warning: 'ov2722_VGA_30fps' defined but not used [-Wunused-const-variable=]
30 static struct ov2722_reg const ov2722_VGA_30fps[] = {
31 ^~~~~~~~~~~~~~~~
32drivers/staging/media/atomisp/i2c/ov2722.h:367:32: warning: 'ov2722_480P_30fps' defined but not used [-Wunused-const-variable=]
33 static struct ov2722_reg const ov2722_480P_30fps[] = {
34 ^~~~~~~~~~~~~~~~~
35drivers/staging/media/atomisp/i2c/ov2722.h:257:32: warning: 'ov2722_QVGA_30fps' defined but not used [-Wunused-const-variable=]
36 static struct ov2722_reg const ov2722_QVGA_30fps[] = {
37 ^~~~~~~~~~~~~~~~~
38drivers/staging/media/atomisp/i2c/atomisp-ov2680.c: In function '__ov2680_set_exposure':
39In file included from drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:35:0:
40At top level:
41drivers/staging/media/atomisp/i2c/ov2680.h:736:33: warning: 'ov2680_1616x1082_30fps' defined but not used [-Wunused-const-variable=]
42 static struct ov2680_reg const ov2680_1616x1082_30fps[] = {
43 ^~~~~~~~~~~~~~~~~~~~~~
44drivers/staging/media/atomisp/i2c/ov2680.h:649:33: warning: 'ov2680_1456x1096_30fps' defined but not used [-Wunused-const-variable=]
45 static struct ov2680_reg const ov2680_1456x1096_30fps[]= {
46 ^~~~~~~~~~~~~~~~~~~~~~
47drivers/staging/media/atomisp/i2c/ov2680.h:606:33: warning: 'ov2680_1296x976_30fps' defined but not used [-Wunused-const-variable=]
48 static struct ov2680_reg const ov2680_1296x976_30fps[] = {
49 ^~~~~~~~~~~~~~~~~~~~~
50drivers/staging/media/atomisp/i2c/ov2680.h:563:33: warning: 'ov2680_720p_30fps' defined but not used [-Wunused-const-variable=]
51 static struct ov2680_reg const ov2680_720p_30fps[] = {
52 ^~~~~~~~~~~~~~~~~
53drivers/staging/media/atomisp/i2c/ov2680.h:520:33: warning: 'ov2680_800x600_30fps' defined but not used [-Wunused-const-variable=]
54 static struct ov2680_reg const ov2680_800x600_30fps[] = {
55 ^~~~~~~~~~~~~~~~~~~~
56drivers/staging/media/atomisp/i2c/ov2680.h:475:33: warning: 'ov2680_720x592_30fps' defined but not used [-Wunused-const-variable=]
57 static struct ov2680_reg const ov2680_720x592_30fps[] = {
58 ^~~~~~~~~~~~~~~~~~~~
59drivers/staging/media/atomisp/i2c/ov2680.h:433:33: warning: 'ov2680_656x496_30fps' defined but not used [-Wunused-const-variable=]
60 static struct ov2680_reg const ov2680_656x496_30fps[] = {
61 ^~~~~~~~~~~~~~~~~~~~
62drivers/staging/media/atomisp/i2c/ov2680.h:389:33: warning: 'ov2680_QVGA_30fps' defined but not used [-Wunused-const-variable=]
63 static struct ov2680_reg const ov2680_QVGA_30fps[] = {
64 ^~~~~~~~~~~~~~~~~
65drivers/staging/media/atomisp/i2c/ov2680.h:346:33: warning: 'ov2680_CIF_30fps' defined but not used [-Wunused-const-variable=]
66 static struct ov2680_reg const ov2680_CIF_30fps[] = {
67 ^~~~~~~~~~~~~~~~
68drivers/staging/media/atomisp/i2c/ov2680.h:301:33: warning: 'ov2680_QCIF_30fps' defined but not used [-Wunused-const-variable=]
69 static struct ov2680_reg const ov2680_QCIF_30fps[] = {
70 ^~~~~~~~~~~~~~~~~
71In file included from drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:36:0:
72drivers/staging/media/atomisp/i2c/ov5693/ov5693.h:988:32: warning: 'ov5693_1424x1168_30fps' defined but not used [-Wunused-const-variable=]
73 static struct ov5693_reg const ov5693_1424x1168_30fps[] = {
74 ^~~~~~~~~~~~~~~~~~~~~~
75drivers/staging/media/atomisp/i2c/ov5693/ov5693.h:954:32: warning: 'ov5693_2592x1944_30fps' defined but not used [-Wunused-const-variable=]
76 static struct ov5693_reg const ov5693_2592x1944_30fps[] = {
77 ^~~~~~~~~~~~~~~~~~~~~~
78drivers/staging/media/atomisp/i2c/ov5693/ov5693.h:889:32: warning: 'ov5693_2592x1456_30fps' defined but not used [-Wunused-const-variable=]
79 static struct ov5693_reg const ov5693_2592x1456_30fps[] = {
80 ^~~~~~~~~~~~~~~~~~~~~~
81drivers/staging/media/atomisp/i2c/ov5693/ov5693.h:862:32: warning: 'ov5693_1940x1096' defined but not used [-Wunused-const-variable=]
82 static struct ov5693_reg const ov5693_1940x1096[] = {
83 ^~~~~~~~~~~~~~~~
84drivers/staging/media/atomisp/i2c/ov5693/ov5693.h:796:32: warning: 'ov5693_1636p_30fps' defined but not used [-Wunused-const-variable=]
85 static struct ov5693_reg const ov5693_1636p_30fps[] = {
86 ^~~~~~~~~~~~~~~~~~
87drivers/staging/media/atomisp/i2c/ov5693/ov5693.h:758:32: warning: 'ov5693_1296x736' defined but not used [-Wunused-const-variable=]
88 static struct ov5693_reg const ov5693_1296x736[] = {
89 ^~~~~~~~~~~~~~~
90drivers/staging/media/atomisp/i2c/ov5693/ov5693.h:730:32: warning: 'ov5693_976x556' defined but not used [-Wunused-const-variable=]
91 static struct ov5693_reg const ov5693_976x556[] = {
92 ^~~~~~~~~~~~~~
93drivers/staging/media/atomisp/i2c/ov5693/ov5693.h:672:32: warning: 'ov5693_736x496' defined but not used [-Wunused-const-variable=]
94 static struct ov5693_reg const ov5693_736x496[] = {
95 ^~~~~~~~~~~~~~
96drivers/staging/media/atomisp/i2c/ov5693/ov5693.h:643:32: warning: 'ov5693_192x160' defined but not used [-Wunused-const-variable=]
97 static struct ov5693_reg const ov5693_192x160[] = {
98 ^~~~~~~~~~~~~~
99drivers/staging/media/atomisp/i2c/ov5693/ov5693.h:616:32: warning: 'ov5693_368x304' defined but not used [-Wunused-const-variable=]
100 static struct ov5693_reg const ov5693_368x304[] = {
101 ^~~~~~~~~~~~~~
102drivers/staging/media/atomisp/i2c/ov5693/ov5693.h:587:32: warning: 'ov5693_336x256' defined but not used [-Wunused-const-variable=]
103 static struct ov5693_reg const ov5693_336x256[] = {
104 ^~~~~~~~~~~~~~
105drivers/staging/media/atomisp/i2c/ov5693/ov5693.h:540:32: warning: 'ov5693_1296x976' defined but not used [-Wunused-const-variable=]
106 static struct ov5693_reg const ov5693_1296x976[] = {
107 ^~~~~~~~~~~~~~~
108drivers/staging/media/atomisp/i2c/ov5693/ov5693.h:509:32: warning: 'ov5693_654x496' defined but not used [-Wunused-const-variable=]
109 static struct ov5693_reg const ov5693_654x496[] = {
110 ^~~~~~~~~~~~~~
111
112Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
113Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
114Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
115Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
116Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
117---
118 drivers/staging/media/atomisp/i2c/gc2235.h | 9 ++++++++-
119 drivers/staging/media/atomisp/i2c/ov2680.h | 5 ++++-
120 drivers/staging/media/atomisp/i2c/ov2722.h | 6 ++++++
121 drivers/staging/media/atomisp/i2c/ov5693/ov5693.h | 18 +++++++++++++++++-
122 4 files changed, 35 insertions(+), 3 deletions(-)
123
124--- a/drivers/staging/media/atomisp/i2c/gc2235.h
125+++ b/drivers/staging/media/atomisp/i2c/gc2235.h
126@@ -33,6 +33,11 @@
127
128 #include "../include/linux/atomisp_platform.h"
129
130+/*
131+ * FIXME: non-preview resolutions are currently broken
132+ */
133+#define ENABLE_NON_PREVIEW 0
134+
135 /* Defines for register writes and register array processing */
136 #define I2C_MSG_LENGTH 0x2
137 #define I2C_RETRY_COUNT 5
138@@ -284,6 +289,7 @@ static struct gc2235_reg const gc2235_in
139 /*
140 * Register settings for various resolution
141 */
142+#if ENABLE_NON_PREVIEW
143 static struct gc2235_reg const gc2235_1296_736_30fps[] = {
144 { GC2235_8BIT, 0x8b, 0xa0 },
145 { GC2235_8BIT, 0x8c, 0x02 },
146@@ -387,6 +393,7 @@ static struct gc2235_reg const gc2235_96
147 { GC2235_8BIT, 0xfe, 0x00 }, /* switch to P0 */
148 { GC2235_TOK_TERM, 0, 0 }
149 };
150+#endif
151
152 static struct gc2235_reg const gc2235_1600_900_30fps[] = {
153 { GC2235_8BIT, 0x8b, 0xa0 },
154@@ -578,7 +585,7 @@ static struct gc2235_resolution gc2235_r
155 * Disable non-preview configurations until the configuration selection is
156 * improved.
157 */
158-#if 0
159+#if ENABLE_NON_PREVIEW
160 static struct gc2235_resolution gc2235_res_still[] = {
161 {
162 .desc = "gc2235_1600_900_30fps",
163--- a/drivers/staging/media/atomisp/i2c/ov2680.h
164+++ b/drivers/staging/media/atomisp/i2c/ov2680.h
165@@ -295,6 +295,7 @@ struct ov2680_format {
166 };
167
168
169+#if 0 /* None of the definitions below are used currently */
170 /*
171 * 176x144 30fps VBlanking 1lane 10Bit (binning)
172 */
173@@ -513,7 +514,6 @@ struct ov2680_format {
174 {OV2680_8BIT, 0x5081, 0x41},
175 {OV2680_TOK_TERM, 0, 0}
176 };
177-
178 /*
179 * 800x600 30fps VBlanking 1lane 10Bit (binning)
180 */
181@@ -685,6 +685,7 @@ struct ov2680_format {
182 // {OV2680_8BIT, 0x5090, 0x0c},
183 {OV2680_TOK_TERM, 0, 0}
184 };
185+#endif
186
187 /*
188 *1616x916 30fps VBlanking 1lane 10bit
189@@ -734,6 +735,7 @@ struct ov2680_format {
190 /*
191 * 1612x1212 30fps VBlanking 1lane 10Bit
192 */
193+#if 0
194 static struct ov2680_reg const ov2680_1616x1082_30fps[] = {
195 {OV2680_8BIT, 0x3086, 0x00},
196 {OV2680_8BIT, 0x3501, 0x48},
197@@ -773,6 +775,7 @@ struct ov2680_format {
198 {OV2680_8BIT, 0x5081, 0x41},
199 {OV2680_TOK_TERM, 0, 0}
200 };
201+#endif
202 /*
203 * 1616x1216 30fps VBlanking 1lane 10Bit
204 */
205--- a/drivers/staging/media/atomisp/i2c/ov2722.h
206+++ b/drivers/staging/media/atomisp/i2c/ov2722.h
207@@ -254,6 +254,7 @@ struct ov2722_write_ctrl {
208 /*
209 * Register settings for various resolution
210 */
211+#if 0
212 static struct ov2722_reg const ov2722_QVGA_30fps[] = {
213 {OV2722_8BIT, 0x3718, 0x10},
214 {OV2722_8BIT, 0x3702, 0x0c},
215@@ -581,6 +582,7 @@ static struct ov2722_reg const ov2722_VG
216 {OV2722_8BIT, 0x3509, 0x10},
217 {OV2722_TOK_TERM, 0, 0},
218 };
219+#endif
220
221 static struct ov2722_reg const ov2722_1632_1092_30fps[] = {
222 {OV2722_8BIT, 0x3021, 0x03}, /* For stand wait for
223@@ -784,6 +786,7 @@ static struct ov2722_reg const ov2722_14
224 {OV2722_8BIT, 0x3509, 0x00},
225 {OV2722_TOK_TERM, 0, 0}
226 };
227+#if 0
228 static struct ov2722_reg const ov2722_1M3_30fps[] = {
229 {OV2722_8BIT, 0x3718, 0x10},
230 {OV2722_8BIT, 0x3702, 0x24},
231@@ -890,6 +893,7 @@ static struct ov2722_reg const ov2722_1M
232 {OV2722_8BIT, 0x3509, 0x10},
233 {OV2722_TOK_TERM, 0, 0},
234 };
235+#endif
236
237 static struct ov2722_reg const ov2722_1080p_30fps[] = {
238 {OV2722_8BIT, 0x3021, 0x03}, /* For stand wait for a whole
239@@ -996,6 +1000,7 @@ static struct ov2722_reg const ov2722_10
240 {OV2722_TOK_TERM, 0, 0}
241 };
242
243+#if 0 /* Currently unused */
244 static struct ov2722_reg const ov2722_720p_30fps[] = {
245 {OV2722_8BIT, 0x3021, 0x03},
246 {OV2722_8BIT, 0x3718, 0x10},
247@@ -1095,6 +1100,7 @@ static struct ov2722_reg const ov2722_72
248 {OV2722_8BIT, 0x3509, 0x00},
249 {OV2722_TOK_TERM, 0, 0},
250 };
251+#endif
252
253 static struct ov2722_resolution ov2722_res_preview[] = {
254 {
255--- a/drivers/staging/media/atomisp/i2c/ov5693/ov5693.h
256+++ b/drivers/staging/media/atomisp/i2c/ov5693/ov5693.h
257@@ -31,6 +31,12 @@
258
259 #include "../../include/linux/atomisp_platform.h"
260
261+/*
262+ * FIXME: non-preview resolutions are currently broken
263+ */
264+#define ENABLE_NON_PREVIEW 0
265+
266+
267 #define OV5693_POWER_UP_RETRY_NUM 5
268
269 /* Defines for register writes and register array processing */
270@@ -503,6 +509,7 @@ static struct ov5693_reg const ov5693_gl
271 {OV5693_TOK_TERM, 0, 0}
272 };
273
274+#if ENABLE_NON_PREVIEW
275 /*
276 * 654x496 30fps 17ms VBlanking 2lane 10Bit (Scaling)
277 */
278@@ -695,6 +702,7 @@ static struct ov5693_reg const ov5693_73
279 {OV5693_8BIT, 0x0100, 0x01},
280 {OV5693_TOK_TERM, 0, 0}
281 };
282+#endif
283
284 /*
285 static struct ov5693_reg const ov5693_736x496[] = {
286@@ -727,6 +735,7 @@ static struct ov5693_reg const ov5693_73
287 /*
288 * 976x556 30fps 8.8ms VBlanking 2lane 10Bit (Scaling)
289 */
290+#if ENABLE_NON_PREVIEW
291 static struct ov5693_reg const ov5693_976x556[] = {
292 {OV5693_8BIT, 0x3501, 0x7b},
293 {OV5693_8BIT, 0x3502, 0x00},
294@@ -819,6 +828,7 @@ static struct ov5693_reg const ov5693_16
295 {OV5693_8BIT, 0x0100, 0x01},
296 {OV5693_TOK_TERM, 0, 0}
297 };
298+#endif
299
300 static struct ov5693_reg const ov5693_1616x1216_30fps[] = {
301 {OV5693_8BIT, 0x3501, 0x7b},
302@@ -859,6 +869,7 @@ static struct ov5693_reg const ov5693_16
303 /*
304 * 1940x1096 30fps 8.8ms VBlanking 2lane 10bit (Scaling)
305 */
306+#if ENABLE_NON_PREVIEW
307 static struct ov5693_reg const ov5693_1940x1096[] = {
308 {OV5693_8BIT, 0x3501, 0x7b},
309 {OV5693_8BIT, 0x3502, 0x00},
310@@ -916,6 +927,7 @@ static struct ov5693_reg const ov5693_25
311 {OV5693_8BIT, 0x5002, 0x00},
312 {OV5693_TOK_TERM, 0, 0}
313 };
314+#endif
315
316 static struct ov5693_reg const ov5693_2576x1456_30fps[] = {
317 {OV5693_8BIT, 0x3501, 0x7b},
318@@ -951,6 +963,7 @@ static struct ov5693_reg const ov5693_25
319 /*
320 * 2592x1944 30fps 0.6ms VBlanking 2lane 10Bit
321 */
322+#if ENABLE_NON_PREVIEW
323 static struct ov5693_reg const ov5693_2592x1944_30fps[] = {
324 {OV5693_8BIT, 0x3501, 0x7b},
325 {OV5693_8BIT, 0x3502, 0x00},
326@@ -977,6 +990,7 @@ static struct ov5693_reg const ov5693_25
327 {OV5693_8BIT, 0x0100, 0x01},
328 {OV5693_TOK_TERM, 0, 0}
329 };
330+#endif
331
332 /*
333 * 11:9 Full FOV Output, expected FOV Res: 2346x1920
334@@ -985,6 +999,7 @@ static struct ov5693_reg const ov5693_25
335 *
336 * WA: Left Offset: 8, Hor scal: 64
337 */
338+#if ENABLE_NON_PREVIEW
339 static struct ov5693_reg const ov5693_1424x1168_30fps[] = {
340 {OV5693_8BIT, 0x3501, 0x3b}, /* long exposure[15:8] */
341 {OV5693_8BIT, 0x3502, 0x80}, /* long exposure[7:0] */
342@@ -1019,6 +1034,7 @@ static struct ov5693_reg const ov5693_14
343 {OV5693_8BIT, 0x0100, 0x01},
344 {OV5693_TOK_TERM, 0, 0}
345 };
346+#endif
347
348 /*
349 * 3:2 Full FOV Output, expected FOV Res: 2560x1706
350@@ -1151,7 +1167,7 @@ static struct ov5693_resolution ov5693_r
351 * Disable non-preview configurations until the configuration selection is
352 * improved.
353 */
354-#if 0
355+#if ENABLE_NON_PREVIEW
356 struct ov5693_resolution ov5693_res_still[] = {
357 {
358 .desc = "ov5693_736x496_30fps",