summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2014-12-08 15:38:17 +0100
committerThierry Reding <treding@nvidia.com>2014-12-19 10:19:57 +0100
commit31919dc9388040d32f5aba6f57ba575959b75fc6 (patch)
treec8dedb543fe8b7b9399796193b397901dfca09ac
parent1effaf3cf251a4caadcfab5ddf020ddc392c35d8 (diff)
drm/panel: sharp: lq101r1sx01: Respect power timings
Before shutting down the display using the DCS display_off command, wait for 4 frames according to the datasheet. Furthermore, after enabling the power supply, the supply voltage needs around 10 ms to settle. After that, another 120 ms is required before a DCS exit_sleep_mode command can be sent. While at it, no longer send the DCS soft_reset command. This is totally unnecessary because we've just powered up the display, hence it will be in a reset state already. Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r--drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c
index a20559ea331..dc73e0e7870 100644
--- a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c
+++ b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c
@@ -116,6 +116,8 @@ static int sharp_panel_unprepare(struct drm_panel *panel)
if (!sharp->prepared)
return 0;
+ sharp_wait_frames(sharp, 4);
+
err = mipi_dsi_dcs_set_display_off(sharp->link1);
if (err < 0)
dev_err(panel->dev, "failed to set display off: %d\n", err);
@@ -180,15 +182,13 @@ static int sharp_panel_prepare(struct drm_panel *panel)
if (err < 0)
return err;
- usleep_range(10000, 20000);
-
- err = mipi_dsi_dcs_soft_reset(sharp->link1);
- if (err < 0) {
- dev_err(panel->dev, "soft reset failed: %d\n", err);
- goto poweroff;
- }
-
- msleep(120);
+ /*
+ * According to the datasheet, the panel needs around 10 ms to fully
+ * power up. At least another 120 ms is required before exiting sleep
+ * mode to make sure the panel is ready. Throw in another 20 ms for
+ * good measure.
+ */
+ msleep(150);
err = mipi_dsi_dcs_exit_sleep_mode(sharp->link1);
if (err < 0) {