lcd: fix lcd_status mistake

PD#171850: lcd: fix lcd_status mistake

Change-Id: I5f0486bbc5ba89ba153d752a9e43af1379697658
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
This commit is contained in:
Evoke Zhang
2018-08-15 20:16:14 +08:00
committed by Jianxin Pan
parent 9664c0275f
commit 52c5f36978
3 changed files with 12 additions and 10 deletions

View File

@@ -216,7 +216,7 @@ static int lcd_set_vframe_rate_hint(int duration)
struct lcd_vframe_match_s *vtable = lcd_vframe_match_table_1;
int fps, i, n;
if (lcd_drv->lcd_status == 0) {
if ((lcd_drv->lcd_status & LCD_STATUS_ENCL_ON) == 0) {
LCDPR("%s: lcd is disabled, exit\n", __func__);
return 0;
}
@@ -271,7 +271,7 @@ static int lcd_set_vframe_rate_end_hint(void)
struct aml_lcd_drv_s *lcd_drv = aml_lcd_get_driver();
struct vinfo_s *info;
if (lcd_drv->lcd_status == 0) {
if ((lcd_drv->lcd_status & LCD_STATUS_ENCL_ON) == 0) {
LCDPR("%s: lcd is disabled, exit\n", __func__);
return 0;
}
@@ -615,15 +615,16 @@ static int lcd_init_load_from_dts(struct lcd_config_s *pconf,
int ret = 0;
struct aml_lcd_drv_s *lcd_drv = aml_lcd_get_driver();
/* lock pinmux if lcd in on */
switch (pconf->lcd_basic.lcd_type) {
case LCD_TTL:
if (lcd_drv->lcd_status) /* lock pinmux if lcd in on */
if (lcd_drv->lcd_status & LCD_STATUS_IF_ON)
lcd_ttl_pinmux_set(1);
else
lcd_ttl_pinmux_set(0);
break;
case LCD_VBYONE:
if (lcd_drv->lcd_status) /* lock pinmux if lcd in on */
if (lcd_drv->lcd_status & LCD_STATUS_IF_ON)
lcd_vbyone_pinmux_set(1);
break;
default:

View File

@@ -474,7 +474,7 @@ static int lcd_set_vframe_rate_hint(int duration)
LCDPR("vout_serve bypass\n");
return 0;
}
if (lcd_drv->lcd_status == 0) {
if ((lcd_drv->lcd_status & LCD_STATUS_ENCL_ON) == 0) {
LCDPR("%s: lcd is disabled, exit\n", __func__);
return 0;
}
@@ -537,7 +537,7 @@ static int lcd_set_vframe_rate_end_hint(void)
LCDPR("vout_serve bypass\n");
return 0;
}
if (lcd_drv->lcd_status == 0) {
if ((lcd_drv->lcd_status & LCD_STATUS_ENCL_ON) == 0) {
LCDPR("%s: lcd is disabled, exit\n", __func__);
return 0;
}
@@ -775,9 +775,10 @@ static int lcd_init_load_from_dts(struct lcd_config_s *pconf,
int ret = 0;
struct aml_lcd_drv_s *lcd_drv = aml_lcd_get_driver();
/* lock pinmux if lcd in on */
switch (pconf->lcd_basic.lcd_type) {
case LCD_VBYONE:
if (lcd_drv->lcd_status) /* lock pinmux if lcd in on */
if (lcd_drv->lcd_status & LCD_STATUS_IF_ON)
lcd_vbyone_pinmux_set(1);
break;
default:

View File

@@ -1141,7 +1141,7 @@ static void lcd_auto_test_delayed(struct work_struct *work)
static void lcd_auto_test(unsigned char flag)
{
lcd_driver->lcd_test_flag = flag;
lcd_driver->lcd_test_state = flag;
if (lcd_driver->workqueue) {
queue_delayed_work(lcd_driver->workqueue,
&lcd_test_delayed_work,
@@ -1257,7 +1257,7 @@ static int lcd_resume(struct platform_device *pdev)
static int lcd_suspend(struct platform_device *pdev, pm_message_t state)
{
mutex_lock(&lcd_driver->power_mutex);
if (lcd_driver->lcd_status) {
if (lcd_driver->lcd_status & LCD_STATUS_ENCL_ON) {
aml_lcd_notifier_call_chain(LCD_EVENT_POWER_OFF, NULL);
lcd_resume_flag = 0;
LCDPR("%s finished\n", __func__);
@@ -1271,7 +1271,7 @@ static void lcd_shutdown(struct platform_device *pdev)
if (lcd_debug_print_flag)
LCDPR("%s\n", __func__);
if (lcd_driver->lcd_status)
if (lcd_driver->lcd_status & LCD_STATUS_ENCL_ON)
aml_lcd_notifier_call_chain(LCD_EVENT_POWER_OFF, NULL);
}