Fix LCD white screen
Signed-off-by: August <mingxin.android@gmail.com>
This commit is contained in:
parent
fd93bb2190
commit
1e1eabd889
4 changed files with 29 additions and 14 deletions
|
@ -660,6 +660,8 @@ static void lcd_get_sys_config(u32 disp, disp_lcd_cfg *lcd_cfg)
|
|||
ret = disp_sys_script_get_item(primary_key,"lcd_bl_en", (int *)gpio_info, 3);
|
||||
if (ret == 3)
|
||||
{
|
||||
gpio_info->data = 0;
|
||||
gpio_info->mul_sel = 1;
|
||||
lcd_cfg->lcd_bl_hdl = disp_sys_gpio_request(gpio_info, 1);
|
||||
lcd_cfg->lcd_bl_en_used = 1;
|
||||
}
|
||||
|
@ -1041,16 +1043,20 @@ static s32 disp_lcd_tcon_disable(struct disp_device *lcd)
|
|||
|
||||
static s32 disp_lcd_pin_cfg(struct disp_device *lcd, u32 bon)
|
||||
{
|
||||
int i;
|
||||
//int i;
|
||||
struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
|
||||
char dev_name[25];
|
||||
//char dev_name[25];
|
||||
|
||||
printf("disp_lcd_pin_cfg\n");
|
||||
|
||||
if ((NULL == lcd) || (NULL == lcdp)) {
|
||||
DE_WRN("NULL hdl!\n");
|
||||
return DIS_FAIL;
|
||||
}
|
||||
DE_INF("lcd %d pin config, state %s, %d\n", lcd->disp, (bon)? "on":"off", bon);
|
||||
printf("lcd %d pin config, state %s, %d\n", lcd->disp, (bon)? "on":"off", bon);
|
||||
|
||||
/* lcd_pin_power already on in sw_enable, comment here to fix white screen before logo display */
|
||||
#if 0
|
||||
//io-pad
|
||||
if (bon == 1) {
|
||||
for (i=0; i<LCD_GPIO_REGU_NUM; i++) {
|
||||
|
@ -1070,7 +1076,9 @@ static s32 disp_lcd_pin_cfg(struct disp_device *lcd, u32 bon)
|
|||
disp_sys_power_disable(lcdp->lcd_cfg.lcd_pin_power[i]);
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
disp_al_lcd_io_cfg(lcd->hwdev_index, bon, &lcdp->panel_info);
|
||||
#endif
|
||||
return DIS_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -1130,9 +1138,13 @@ static s32 disp_lcd_backlight_enable(struct disp_device *lcd)
|
|||
if (!((!strcmp(lcdp->lcd_cfg.lcd_bl_en_power, "")) || (!strcmp(lcdp->lcd_cfg.lcd_bl_en_power, "none"))))
|
||||
disp_sys_power_enable(lcdp->lcd_cfg.lcd_bl_en_power);
|
||||
|
||||
memcpy(gpio_info, &(lcdp->lcd_cfg.lcd_bl_en), sizeof(disp_gpio_set_t));
|
||||
|
||||
disp_sys_gpio_request_simple(gpio_info, 1);
|
||||
if(!lcdp->lcd_cfg.lcd_bl_hdl) {
|
||||
memcpy(gpio_info, &(lcdp->lcd_cfg.lcd_bl_en), sizeof(disp_gpio_set_t));
|
||||
disp_sys_gpio_request_simple(gpio_info, 1);
|
||||
}
|
||||
else {
|
||||
disp_sys_gpio_set_value(lcdp->lcd_cfg.lcd_bl_hdl, 1, "lcd_bl_en");
|
||||
}
|
||||
}
|
||||
bl = disp_lcd_get_bright(lcd);
|
||||
disp_lcd_set_bright(lcd, bl);
|
||||
|
@ -1274,6 +1286,8 @@ s32 disp_lcd_set_bright(struct disp_device *lcd, u32 bright)
|
|||
struct disp_manager *mgr = NULL;
|
||||
struct disp_smbl *smbl = NULL;
|
||||
|
||||
return 0;
|
||||
|
||||
if ((NULL == lcd) || (NULL == lcdp)) {
|
||||
DE_WRN("NULL hdl!\n");
|
||||
return DIS_FAIL;
|
||||
|
@ -1523,8 +1537,6 @@ static s32 disp_lcd_post_enable(struct disp_device* lcd)
|
|||
bl = disp_lcd_get_bright(lcd);
|
||||
disp_lcd_set_bright(lcd, bl);
|
||||
|
||||
disp_sys_gpio_set_value(lcdp->lcd_cfg.lcd_bl_hdl, 1, "lcd_bl_en");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -112,8 +112,6 @@ static void LCD_power_on(u32 sel)
|
|||
sunxi_lcd_delay_ms(30);
|
||||
panel_reset(1);
|
||||
sunxi_lcd_delay_ms(10);
|
||||
|
||||
|
||||
}
|
||||
|
||||
static void LCD_power_off(u32 sel)
|
||||
|
|
|
@ -1704,6 +1704,8 @@ static s32 disp_lcd_enable(struct disp_device *lcd)
|
|||
unsigned bl;
|
||||
int ret;
|
||||
|
||||
pr_info("%s\n", __func__);
|
||||
|
||||
if ((lcd == NULL) || (lcdp == NULL)) {
|
||||
DE_WRN("NULL hdl!\n");
|
||||
return DIS_FAIL;
|
||||
|
@ -1807,6 +1809,8 @@ static s32 disp_lcd_disable(struct disp_device *lcd)
|
|||
struct disp_manager *mgr = NULL;
|
||||
int i;
|
||||
|
||||
pr_info("%s\n", __func__);
|
||||
|
||||
if ((lcd == NULL) || (lcdp == NULL)) {
|
||||
DE_WRN("NULL hdl!\n");
|
||||
return DIS_FAIL;
|
||||
|
@ -1948,6 +1952,7 @@ static s32 disp_lcd_sw_enable(struct disp_device *lcd)
|
|||
|| (!strcmp(lcdp->lcd_cfg.lcd_pin_power[i], "none"))))
|
||||
disp_sys_power_enable(lcdp->lcd_cfg.lcd_pin_power[i]);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* init bl */
|
||||
if (lcdp->lcd_cfg.lcd_bl_en_used) {
|
||||
|
@ -1956,10 +1961,10 @@ static s32 disp_lcd_sw_enable(struct disp_device *lcd)
|
|||
((!strcmp(lcdp->lcd_cfg.lcd_bl_en_power, ""))
|
||||
|| (!strcmp(lcdp->lcd_cfg.lcd_bl_en_power, "none"))))
|
||||
disp_sys_power_enable(lcdp->lcd_cfg.lcd_bl_en_power);
|
||||
|
||||
lcdp->lcd_cfg.lcd_bl_gpio_hdl =
|
||||
disp_sys_gpio_request(&lcdp->lcd_cfg.lcd_bl_en, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
spin_lock_irqsave(&lcd_data_lock, flags);
|
||||
lcdp->enabled = 1;
|
||||
|
@ -2484,7 +2489,7 @@ static s32 disp_lcd_init(struct disp_device *lcd)
|
|||
DE_WRN("NULL hdl!\n");
|
||||
return DIS_FAIL;
|
||||
}
|
||||
DE_INF("lcd %d\n", lcd->disp);
|
||||
pr_info("%s: lcd %d\n", __func__, lcd->disp);
|
||||
|
||||
lcd_get_sys_config(lcd->disp, &lcdp->lcd_cfg);
|
||||
if (disp_lcd_is_used(lcd)) {
|
||||
|
|
|
@ -581,7 +581,7 @@ lcd_gpio_0 = port:PD6<1><0><default><0>
|
|||
|
||||
;power enable
|
||||
lcd_gpio_1 = port:PD7<1><0><default><0>
|
||||
lcd_bl_en = port:PD5<1><0><default><0>
|
||||
lcd_bl_en = port:PD5<1><0><default><1>
|
||||
|
||||
lcd_power = "vcc-dsi-33"
|
||||
;lcd_power1 = "vcc-lcd"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue