build/patch/kernel/archive/sunxi-5.15/patches.megous/drm-panel-st7703-Improve-the-power-up-sequence-of-the-panel.patch

51 lines
1.5 KiB
Diff

From 332fe8a37b1586886d723e336ec109ae583f5fbb Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megous@megous.com>
Date: Sun, 5 Jul 2020 15:55:46 +0200
Subject: [PATCH 296/478] drm/panel: st7703: Improve the power up sequence of
the panel
The datasheet specifies that there needs to be 120ms delay after
the sleep out command, not after reset as the driver assumes.
The delay between init commands and the sleep out is not necessary.
Signed-off-by: Ondrej Jirman <megous@megous.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 a2c303e5732c..9a34368f1851 100644
--- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
@@ -290,7 +290,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 */
@@ -367,16 +366,14 @@ static int st7703_enable(struct drm_panel *panel)
return ret;
}
- msleep(20);
-
ret = mipi_dsi_dcs_exit_sleep_mode(dsi);
if (ret < 0) {
dev_err(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.35.3