3434#define IMX355_REG_FLL 0x0340
3535#define IMX355_FLL_MAX 0xffff
3636
37+ #define IMX355_REG_LLP 0x0342
38+ #define IMX355_LLP_MAX 0xffff
39+
3740#define IMX355_REG_X_ADD_START 0x0344
3841#define IMX355_REG_Y_ADD_START 0x0346
3942#define IMX355_REG_X_ADD_END 0x0348
@@ -266,8 +269,6 @@ static const struct imx355_reg_list imx355_global_setting = {
266269};
267270
268271static const struct imx355_reg mode_3268x2448_regs [] = {
269- { 0x0342 , 0x0e },
270- { 0x0343 , 0x58 },
271272 { 0x0900 , 0x00 },
272273 { 0x0901 , 0x11 },
273274 { 0x0902 , 0x00 },
@@ -276,8 +277,6 @@ static const struct imx355_reg mode_3268x2448_regs[] = {
276277};
277278
278279static const struct imx355_reg mode_3264x2448_regs [] = {
279- { 0x0342 , 0x0e },
280- { 0x0343 , 0x58 },
281280 { 0x0900 , 0x00 },
282281 { 0x0901 , 0x11 },
283282 { 0x0902 , 0x00 },
@@ -286,8 +285,6 @@ static const struct imx355_reg mode_3264x2448_regs[] = {
286285};
287286
288287static const struct imx355_reg mode_3280x2464_regs [] = {
289- { 0x0342 , 0x0e },
290- { 0x0343 , 0x58 },
291288 { 0x0900 , 0x00 },
292289 { 0x0901 , 0x11 },
293290 { 0x0902 , 0x00 },
@@ -296,8 +293,6 @@ static const struct imx355_reg mode_3280x2464_regs[] = {
296293};
297294
298295static const struct imx355_reg mode_1940x1096_regs [] = {
299- { 0x0342 , 0x0e },
300- { 0x0343 , 0x58 },
301296 { 0x0900 , 0x00 },
302297 { 0x0901 , 0x11 },
303298 { 0x0902 , 0x00 },
@@ -306,8 +301,6 @@ static const struct imx355_reg mode_1940x1096_regs[] = {
306301};
307302
308303static const struct imx355_reg mode_1936x1096_regs [] = {
309- { 0x0342 , 0x0e },
310- { 0x0343 , 0x58 },
311304 { 0x0900 , 0x00 },
312305 { 0x0901 , 0x11 },
313306 { 0x0902 , 0x00 },
@@ -316,8 +309,6 @@ static const struct imx355_reg mode_1936x1096_regs[] = {
316309};
317310
318311static const struct imx355_reg mode_1924x1080_regs [] = {
319- { 0x0342 , 0x0e },
320- { 0x0343 , 0x58 },
321312 { 0x0900 , 0x00 },
322313 { 0x0901 , 0x11 },
323314 { 0x0902 , 0x00 },
@@ -326,8 +317,6 @@ static const struct imx355_reg mode_1924x1080_regs[] = {
326317};
327318
328319static const struct imx355_reg mode_1920x1080_regs [] = {
329- { 0x0342 , 0x0e },
330- { 0x0343 , 0x58 },
331320 { 0x0900 , 0x00 },
332321 { 0x0901 , 0x11 },
333322 { 0x0902 , 0x00 },
@@ -336,8 +325,6 @@ static const struct imx355_reg mode_1920x1080_regs[] = {
336325};
337326
338327static const struct imx355_reg mode_1640x1232_regs [] = {
339- { 0x0342 , 0x07 },
340- { 0x0343 , 0x2c },
341328 { 0x0900 , 0x01 },
342329 { 0x0901 , 0x22 },
343330 { 0x0902 , 0x00 },
@@ -346,8 +333,6 @@ static const struct imx355_reg mode_1640x1232_regs[] = {
346333};
347334
348335static const struct imx355_reg mode_1640x922_regs [] = {
349- { 0x0342 , 0x07 },
350- { 0x0343 , 0x2c },
351336 { 0x0900 , 0x01 },
352337 { 0x0901 , 0x22 },
353338 { 0x0902 , 0x00 },
@@ -356,8 +341,6 @@ static const struct imx355_reg mode_1640x922_regs[] = {
356341};
357342
358343static const struct imx355_reg mode_1300x736_regs [] = {
359- { 0x0342 , 0x07 },
360- { 0x0343 , 0x2c },
361344 { 0x0900 , 0x01 },
362345 { 0x0901 , 0x22 },
363346 { 0x0902 , 0x00 },
@@ -366,8 +349,6 @@ static const struct imx355_reg mode_1300x736_regs[] = {
366349};
367350
368351static const struct imx355_reg mode_1296x736_regs [] = {
369- { 0x0342 , 0x07 },
370- { 0x0343 , 0x2c },
371352 { 0x0900 , 0x01 },
372353 { 0x0901 , 0x22 },
373354 { 0x0902 , 0x00 },
@@ -376,8 +357,6 @@ static const struct imx355_reg mode_1296x736_regs[] = {
376357};
377358
378359static const struct imx355_reg mode_1284x720_regs [] = {
379- { 0x0342 , 0x07 },
380- { 0x0343 , 0x2c },
381360 { 0x0900 , 0x01 },
382361 { 0x0901 , 0x22 },
383362 { 0x0902 , 0x00 },
@@ -386,8 +365,6 @@ static const struct imx355_reg mode_1284x720_regs[] = {
386365};
387366
388367static const struct imx355_reg mode_1280x720_regs [] = {
389- { 0x0342 , 0x07 },
390- { 0x0343 , 0x2c },
391368 { 0x0900 , 0x01 },
392369 { 0x0901 , 0x22 },
393370 { 0x0902 , 0x00 },
@@ -396,8 +373,6 @@ static const struct imx355_reg mode_1280x720_regs[] = {
396373};
397374
398375static const struct imx355_reg mode_820x616_regs [] = {
399- { 0x0342 , 0x0e },
400- { 0x0343 , 0x58 },
401376 { 0x0900 , 0x01 },
402377 { 0x0901 , 0x44 },
403378 { 0x0902 , 0x00 },
@@ -1041,6 +1016,13 @@ static int imx355_start_streaming(struct imx355 *imx355)
10411016 if (ret )
10421017 return ret ;
10431018
1019+ /* set line length */
1020+ ret = imx355_write_reg (imx355 , IMX355_REG_LLP ,
1021+ imx355 -> hblank -> val + imx355 -> cur_mode -> width ,
1022+ 2 );
1023+ if (ret )
1024+ return ret ;
1025+
10441026 /* Apply customized values from user */
10451027 ret = __v4l2_ctrl_handler_setup (imx355 -> sd .ctrl_handler );
10461028 if (ret )
0 commit comments