lcd: add lcd tv driver when the panel disable in uboot [1/1]

PD#SWPL-5937

Problem:
need screen initialization moved from uboot to kernel

Solution:
1, add lcd tv driver when the panel disable in uboot

Verify:
t962x2-x301

Change-Id: Ia7837db5f6581543b2a093357a264ee63dbd33a9
Signed-off-by: shaochan.liu <shaochan.liu@amlogic.com>
This commit is contained in:
shaochan.liu
2019-05-21 15:59:46 +08:00
committed by Chris KIM
parent 3de298ebe9
commit a96f139539
2 changed files with 21 additions and 1 deletions

View File

@@ -44,6 +44,7 @@
static unsigned int lcd_output_vmode;
static char lcd_output_name[30];
static int lcd_init_on_flag;
/* ************************************************** *
* lcd mode function
@@ -331,7 +332,19 @@ static int lcd_set_current_vmode(enum vmode_e mode)
if (VMODE_LCD == (mode & VMODE_MODE_BIT_MASK)) {
if (mode & VMODE_INIT_BIT_MASK) {
lcd_clk_gate_switch(1);
} else {
} else if (lcd_init_on_flag == 0) {
lcd_init_on_flag = 1;
if ((lcd_drv->lcd_key_valid == 0)
&& !(lcd_drv->lcd_status & LCD_STATUS_ENCL_ON)) {
aml_lcd_notifier_call_chain
(LCD_EVENT_POWER_ON, NULL);
lcd_if_enable_retry(lcd_drv->lcd_config);
} else if (lcd_drv->driver_change != NULL) {
mutex_lock(&lcd_vout_mutex);
ret = lcd_drv->driver_change();
mutex_unlock(&lcd_vout_mutex);
}
} else if (lcd_init_on_flag == 1) {
mutex_lock(&lcd_vout_mutex);
ret = lcd_drv->driver_change();
mutex_unlock(&lcd_vout_mutex);

View File

@@ -1026,6 +1026,13 @@ static void lcd_config_probe_delayed(struct work_struct *work)
lcd_driver = NULL;
LCDERR("probe exit\n");
}
if ((lcd_driver->lcd_status & LCD_STATUS_VMODE_ACTIVE)
&& !(lcd_driver->lcd_status & LCD_STATUS_ENCL_ON)) {
LCDPR("%s: lcd_enable in kernel\n", __func__);
aml_lcd_notifier_call_chain(LCD_EVENT_POWER_ON, NULL);
lcd_if_enable_retry(lcd_driver->lcd_config);
}
}
static void lcd_config_default(void)