[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200716123753.3552425-2-megous@megous.com>
Date: Thu, 16 Jul 2020 14:37:52 +0200
From: Ondrej Jirman <megous@...ous.com>
To: David Airlie <airlied@...ux.ie>, Daniel Vetter <daniel@...ll.ch>,
Thierry Reding <thierry.reding@...il.com>,
Sam Ravnborg <sam@...nborg.org>,
Fabio Estevam <festevam@...il.com>,
Guido Günther <agx@...xcpu.org>,
Robert Chiras <robert.chiras@....com>
Cc: Ondrej Jirman <megous@...ous.com>,
Samuel Holland <samuel@...lland.org>,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: [PATCH 1/2] drm/panel: st7703: Make the sleep exit timing match the spec
The driver seemed to try to make the total cumulative time of all delays
across the whole power up sequence to sum up to 120ms.
The datasheet on the other hand specifies that there needs to be 120ms
delay after the sleep out command, not after reset as the driver
assumes.
Lastly, the delay between init commands and the sleep exit command is
not necessary. (not specified anywhere)
Reported-by: Samuel Holland <samuel@...lland.org>
Signed-off-by: Ondrej Jirman <megous@...ous.com>
---
drivers/gpu/drm/panel/panel-sitronix-st7703.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
index 8996ced2b721..45833e6a0f4f 100644
--- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
@@ -291,7 +291,6 @@ static int xbd599_init_sequence(struct st7703 *ctx)
dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP,
0x07, /* VREF_SEL = 4.2V */
0x07 /* NVREF_SEL = 4.2V */);
- msleep(20);
dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM,
0x2C, /* VCOMDC_F = -0.67V */
@@ -369,16 +368,14 @@ static int st7703_enable(struct drm_panel *panel)
return ret;
}
- msleep(20);
-
ret = mipi_dsi_dcs_exit_sleep_mode(dsi);
if (ret < 0) {
DRM_DEV_ERROR(ctx->dev, "Failed to exit sleep mode: %d\n", ret);
return ret;
}
- /* Panel is operational 120 msec after reset */
- msleep(60);
+ /* Dsiplay on can be issued 120 msec after sleep out */
+ msleep(120);
ret = mipi_dsi_dcs_set_display_on(dsi);
if (ret)
--
2.27.0
Powered by blists - more mailing lists