lcd: add screen black support before backlight on [2/2]
authorEvoke Zhang <evoke.zhang@amlogic.com>
Fri, 8 Jun 2018 08:25:21 +0000 (16:25 +0800)
committerYixun Lan <yixun.lan@amlogic.com>
Wed, 13 Jun 2018 09:35:41 +0000 (02:35 -0700)
PD#167706: lcd: add screen black support before backlight on

Change-Id: I5fd1eb644ae96dac279a00740d8488d4c14870cf
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
drivers/amlogic/media/vout/lcd/lcd_common.h
drivers/amlogic/media/vout/lcd/lcd_debug.c
drivers/amlogic/media/vout/lcd/lcd_tablet/lcd_drv.c
drivers/amlogic/media/vout/lcd/lcd_tv/lcd_drv.c

index 4140c7bf82c9b28439197aa1dd5cf0cd02f43731..fad4a3dbbd9b9fec20b7d2b0cce8bfde9848c66f 100644 (file)
@@ -95,6 +95,7 @@ extern void lcd_venc_change(struct lcd_config_s *pconf);
 extern void lcd_if_enable_retry(struct lcd_config_s *pconf);
 
 /* lcd debug */
+extern void lcd_mute_setting(unsigned char flag);
 extern int lcd_class_creat(void);
 extern int lcd_class_remove(void);
 
index 98cd778da464e58393a1e10431ba1f190af45702..bc2c481ba4844580207ef121a1d8967ed1d22960 100644 (file)
@@ -1019,7 +1019,7 @@ static void lcd_debug_test(unsigned int num)
                LCDPR("disable test pattern\n");
 }
 
-static void lcd_mute_setting(unsigned char flag)
+void lcd_mute_setting(unsigned char flag)
 {
        LCDPR("set lcd mute: %d\n", flag);
        if (flag) {
@@ -1052,19 +1052,18 @@ static void lcd_screen_restore(void)
 
        h_active = lcd_drv->lcd_config->lcd_basic.h_active;
        video_on_pixel = lcd_drv->lcd_config->lcd_timing.video_on_pixel;
-       if (num >= 0) {
-               lcd_vcbus_write(ENCL_VIDEO_RGBIN_CTRL, lcd_enc_tst[num][6]);
-               lcd_vcbus_write(ENCL_TST_MDSEL, lcd_enc_tst[num][0]);
-               lcd_vcbus_write(ENCL_TST_Y, lcd_enc_tst[num][1]);
-               lcd_vcbus_write(ENCL_TST_CB, lcd_enc_tst[num][2]);
-               lcd_vcbus_write(ENCL_TST_CR, lcd_enc_tst[num][3]);
-               lcd_vcbus_write(ENCL_TST_CLRBAR_STRT, video_on_pixel);
-               lcd_vcbus_write(ENCL_TST_CLRBAR_WIDTH, (h_active / 9));
-               lcd_vcbus_write(ENCL_TST_EN, lcd_enc_tst[num][4]);
-               lcd_vcbus_setb(ENCL_VIDEO_MODE_ADV, lcd_enc_tst[num][5], 3, 1);
-               if (num > 0)
-                       LCDPR("show test pattern: %s\n", lcd_enc_tst_str[num]);
-       }
+
+       lcd_vcbus_write(ENCL_VIDEO_RGBIN_CTRL, lcd_enc_tst[num][6]);
+       lcd_vcbus_write(ENCL_TST_MDSEL, lcd_enc_tst[num][0]);
+       lcd_vcbus_write(ENCL_TST_Y, lcd_enc_tst[num][1]);
+       lcd_vcbus_write(ENCL_TST_CB, lcd_enc_tst[num][2]);
+       lcd_vcbus_write(ENCL_TST_CR, lcd_enc_tst[num][3]);
+       lcd_vcbus_write(ENCL_TST_CLRBAR_STRT, video_on_pixel);
+       lcd_vcbus_write(ENCL_TST_CLRBAR_WIDTH, (h_active / 9));
+       lcd_vcbus_write(ENCL_TST_EN, lcd_enc_tst[num][4]);
+       lcd_vcbus_setb(ENCL_VIDEO_MODE_ADV, lcd_enc_tst[num][5], 3, 1);
+       if (num > 0)
+               LCDPR("show test pattern: %s\n", lcd_enc_tst_str[num]);
 }
 
 static void lcd_screen_black(void)
index 4a735a2c9832085fabc6b61fb6c9a32da73effd1..3dfad10ae5df35708e488ef221a7ce5b524b0244 100644 (file)
@@ -913,6 +913,7 @@ void lcd_tablet_driver_init_pre(void)
        lcd_clk_set(pconf);
        lcd_venc_set(pconf);
        lcd_encl_tcon_set(pconf);
+       lcd_mute_setting(1);
 
        lcd_vcbus_write(VENC_INTCTRL, 0x200);
 
index 2da4b907c17300cbeb7f5421fd754eda652ce4e5..f4c976bfc594d945e8fa42db3f91331a4dc35854 100644 (file)
@@ -1264,6 +1264,7 @@ void lcd_tv_driver_init_pre(void)
        lcd_clk_set(pconf);
        lcd_venc_set(pconf);
        lcd_encl_tcon_set(pconf);
+       lcd_mute_setting(1);
 
        lcd_vcbus_write(VENC_INTCTRL, 0x200);