IKXCLOCK-4509 Display: tilting is not activating the screen
put same priority for enable and interactive control of display
Change-Id: Iddc721a831c19f1e97eec1c4bf68a355064cb69d
diff --git a/drivers/video/omap2/displays/panel-minnow.c b/drivers/video/omap2/displays/panel-minnow.c
index 59c3113..d1014b0 100644
--- a/drivers/video/omap2/displays/panel-minnow.c
+++ b/drivers/video/omap2/displays/panel-minnow.c
@@ -2541,6 +2541,7 @@
mpd->dssdev = dssdev;
mpd->first_enable = true;
mpd->m4_state = DISPLAY_ENABLE;
+ mpd->interactive = true;
r = minnow_panel_dt_init(mpd);
if (r)
@@ -3470,7 +3471,7 @@
static int minnow_panel_enable(struct omap_dss_device *dssdev)
{
struct minnow_panel_data *mpd = dev_get_drvdata(&dssdev->dev);
- int r;
+ int r, state;
mutex_lock(&mpd->lock);
#ifdef CONFIG_WAKEUP_SOURCE_NOTIFY
@@ -3480,7 +3481,12 @@
cancel_delayed_work(&mpd->early_init_timeout_work);
}
#endif
- r = minnow_panel_change_state_mlocked(mpd, DISPLAY_ENABLE);
+ state = DISPLAY_ENABLE;
+#ifdef CONFIG_HAS_AMBIENTMODE
+ if (!mpd->interactive)
+ state = DISPLAY_AMBIENT_ON;
+#endif
+ r = minnow_panel_change_state_mlocked(mpd, state);
mutex_unlock(&mpd->lock);
return r;
}