Skip to content

Commit e511f8f

Browse files
Alain Volmatdkalowsk
authored andcommitted
video: gc2145: avoid useless register page change
Avoid some register page change when the right page is already being accessible. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
1 parent 747d73c commit e511f8f

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

drivers/video/gc2145.c

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ static const struct gc2145_reg default_regs[] = {
199199
{0xa2, 0x00},
200200

201201
/* BLK Settings */
202-
{GC2145_REG_RESET, GC2145_REG_RESET_P0_REGS},
203202
{0x40, 0x42},
204203
{0x41, 0x00},
205204
{0x43, 0x5b},
@@ -232,7 +231,6 @@ static const struct gc2145_reg default_regs[] = {
232231
{0x48, 0x15},
233232
{0x49, 0x00},
234233
{0x4b, 0x0b},
235-
{GC2145_REG_RESET, GC2145_REG_RESET_P0_REGS},
236234

237235
/* AEC Settings */
238236
{GC2145_REG_RESET, GC2145_REG_RESET_P1_REGS},
@@ -275,8 +273,6 @@ static const struct gc2145_reg default_regs[] = {
275273
{0x95, 0x84},
276274
{0x97, 0x65},
277275
{0xa2, 0x11},
278-
{GC2145_REG_RESET, GC2145_REG_RESET_P0_REGS},
279-
{GC2145_REG_RESET, GC2145_REG_RESET_P2_REGS},
280276
{0x80, 0xc1},
281277
{0x81, 0x08},
282278
{0x82, 0x05},
@@ -306,10 +302,7 @@ static const struct gc2145_reg default_regs[] = {
306302
{0x3d, 0x15},
307303
{0x4b, 0x06},
308304
{0x4c, 0x20},
309-
{GC2145_REG_RESET, GC2145_REG_RESET_P0_REGS},
310-
311305
/* Gamma Control */
312-
{GC2145_REG_RESET, GC2145_REG_RESET_P2_REGS},
313306
{0x10, 0x09},
314307
{0x11, 0x0d},
315308
{0x12, 0x13},
@@ -358,7 +351,6 @@ static const struct gc2145_reg default_regs[] = {
358351
{0x39, 0xf3},
359352
{0x3a, 0xf9},
360353
{0x3b, 0xff},
361-
{GC2145_REG_RESET, GC2145_REG_RESET_P2_REGS},
362354
{0xd1, 0x32},
363355
{0xd2, 0x32},
364356
{0xd3, 0x40},
@@ -373,7 +365,6 @@ static const struct gc2145_reg default_regs[] = {
373365
{0xd8, 0xd8},
374366
{GC2145_REG_RESET, GC2145_REG_RESET_P1_REGS},
375367
{0x9f, 0x40},
376-
{GC2145_REG_RESET, GC2145_REG_RESET_P1_REGS},
377368
{0xc2, 0x14},
378369
{0xc3, 0x0d},
379370
{0xc4, 0x0c},
@@ -430,8 +421,6 @@ static const struct gc2145_reg default_regs[] = {
430421
{0xa9, 0x77},
431422
{0xa1, 0x80},
432423
{0xa2, 0x80},
433-
434-
{GC2145_REG_RESET, GC2145_REG_RESET_P1_REGS},
435424
{0xdf, 0x0d},
436425
{0xdc, 0x25},
437426
{0xdd, 0x30},
@@ -443,13 +432,10 @@ static const struct gc2145_reg default_regs[] = {
443432
{0xe7, 0xa0},
444433
{0xe8, 0x90},
445434
{0xe9, 0xa0},
446-
{GC2145_REG_RESET, GC2145_REG_RESET_P0_REGS},
447-
{GC2145_REG_RESET, GC2145_REG_RESET_P1_REGS},
448435
{0x4f, 0x00},
449436
{0x4f, 0x00},
450437
{0x4b, 0x01},
451438
{0x4f, 0x00},
452-
453439
{0x4c, 0x01},
454440
{0x4d, 0x71},
455441
{0x4e, 0x01},
@@ -684,7 +670,6 @@ static const struct gc2145_reg default_regs[] = {
684670
{0x79, 0x5e},
685671
{0x7a, 0x54},
686672
{0x7b, 0x58},
687-
{GC2145_REG_RESET, GC2145_REG_RESET_P0_REGS},
688673
{GC2145_REG_RESET, GC2145_REG_RESET_P2_REGS},
689674
{0xc0, 0x01},
690675
{0xc1, 0x44},
@@ -707,13 +692,11 @@ static const struct gc2145_reg default_regs[] = {
707692
{0xe5, 0xe0},
708693
{GC2145_REG_RESET, GC2145_REG_RESET_P1_REGS},
709694
{0x9f, 0x40},
710-
{GC2145_REG_RESET, GC2145_REG_RESET_P0_REGS},
711695

712696
/* Output Control */
713697
{GC2145_REG_RESET, GC2145_REG_RESET_P2_REGS},
714698
{0x40, 0xbf},
715699
{0x46, 0xcf},
716-
{GC2145_REG_RESET, GC2145_REG_RESET_P0_REGS},
717700

718701
{GC2145_REG_RESET, GC2145_REG_RESET_P0_REGS},
719702
{0x05, 0x01},

0 commit comments

Comments
 (0)