lcd: tcon: set od function [2/2]

PD#TV-7435

Problem:
when enable od function, the left half of the screen
display is abnormal after boot

Solution:
set od function

Verify:
x301

Change-Id: Ibe4f2e7e5d9bc46c6ce880715103e2cc69d4625b
Signed-off-by: shaochan.liu <shaochan.liu@amlogic.com>
This commit is contained in:
shaochan.liu
2019-07-12 13:20:52 +08:00
committed by Tao Zeng
parent 63db46f23d
commit 32e3323eac
2 changed files with 15 additions and 1 deletions

View File

@@ -106,6 +106,19 @@ void lcd_tcon_reg_write(unsigned int addr, unsigned int val)
}
}
static void lcd_tcon_od_init(unsigned char *table)
{
unsigned int reg, bit, flag;
if (lcd_tcon_data->reg_core_od == REG_LCD_TCON_MAX)
return;
reg = lcd_tcon_data->reg_core_od;
bit = lcd_tcon_data->bit_od_en;
flag = (table[reg] >> bit) & 1;
lcd_tcon_od_set(flag);
}
static void lcd_tcon_od_check(unsigned char *table)
{
unsigned int reg, bit;
@@ -369,6 +382,7 @@ static int lcd_tcon_config(struct aml_lcd_drv_s *lcd_drv)
#endif
lcd_tcon_intr_init(lcd_drv);
lcd_tcon_od_init(lcd_tcon_data->reg_table);
return 0;
}

View File

@@ -1122,10 +1122,10 @@ static int lcd_mode_probe(struct device *dev)
LCDERR("invalid lcd mode: %d\n", lcd_driver->lcd_mode);
break;
}
lcd_tcon_probe(lcd_driver);
if (lcd_driver->lcd_status & LCD_STATUS_ENCL_ON)
lcd_clk_gate_switch(1);
lcd_tcon_probe(lcd_driver);
lcd_debug_probe();
lcd_fops_create();