lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230704050744.1196293-1-yangcong5@huaqin.corp-partner.google.com>
Date:   Tue,  4 Jul 2023 13:07:44 +0800
From:   Cong Yang <yangcong5@...qin.corp-partner.google.com>
To:     sam@...nborg.org, neil.armstrong@...aro.org, daniel@...ll.ch,
        airlied@...il.com, dianders@...gle.com, hsinyi@...gle.com
Cc:     dri-devel@...ts.freedesktop.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Cong Yang <yangcong5@...qin.corp-partner.google.com>
Subject: [PATCH] drm/panel: Add avdd/avee delay for Starry-himax83102-j02 and Starry-ili9882t panel

>From power on/off sequence for panel data sheet[1], T2 timing VSP to VSN
needs 1ms delay when power on, and VSN to VSP also needs 1ms delay when
power off. Some pmic may not be able to adjust the delay internally, so
let's add a delay between avdd/avee regulator gpio to meet the timing of
panel.

[1]: https://github.com/HimaxSoftware/Doc/tree/main/Himax_Chipset_Power_Sequence

Fixes: 59bba51ec2a5 ("drm/panel: Fine tune Starry-ili9882t panel HFP and HBP")
Signed-off-by: Cong Yang <yangcong5@...qin.corp-partner.google.com>
---
 drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
index dc276c346fd1..b44a6871d97c 100644
--- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
+++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
@@ -37,6 +37,7 @@ struct panel_desc {
 	unsigned int lanes;
 	bool discharge_on_disable;
 	bool lp11_before_reset;
+	int avdd_avee_delay;
 };
 
 struct boe_panel {
@@ -1798,6 +1799,7 @@ static int boe_panel_unprepare(struct drm_panel *panel)
 
 	if (boe->desc->discharge_on_disable) {
 		regulator_disable(boe->avee);
+		usleep_range(boe->desc->avdd_avee_delay, boe->desc->avdd_avee_delay * 2);
 		regulator_disable(boe->avdd);
 		usleep_range(5000, 7000);
 		gpiod_set_value(boe->enable_gpio, 0);
@@ -1808,6 +1810,7 @@ static int boe_panel_unprepare(struct drm_panel *panel)
 		gpiod_set_value(boe->enable_gpio, 0);
 		usleep_range(1000, 2000);
 		regulator_disable(boe->avee);
+		usleep_range(boe->desc->avdd_avee_delay, boe->desc->avdd_avee_delay * 2);
 		regulator_disable(boe->avdd);
 		usleep_range(5000, 7000);
 		regulator_disable(boe->pp1800);
@@ -1843,6 +1846,7 @@ static int boe_panel_prepare(struct drm_panel *panel)
 	ret = regulator_enable(boe->avdd);
 	if (ret < 0)
 		goto poweroff1v8;
+	usleep_range(boe->desc->avdd_avee_delay, boe->desc->avdd_avee_delay * 2);
 	ret = regulator_enable(boe->avee);
 	if (ret < 0)
 		goto poweroffavdd;
@@ -2134,6 +2138,7 @@ static const struct panel_desc starry_himax83102_j02_desc = {
 		      MIPI_DSI_MODE_LPM,
 	.init_cmds = starry_himax83102_j02_init_cmd,
 	.lp11_before_reset = true,
+	.avdd_avee_delay = 1500,
 };
 
 static const struct drm_display_mode starry_ili9882t_default_mode = {
@@ -2162,6 +2167,7 @@ static const struct panel_desc starry_ili9882t_desc = {
 		      MIPI_DSI_MODE_LPM,
 	.init_cmds = starry_ili9882t_init_cmd,
 	.lp11_before_reset = true,
+	.avdd_avee_delay = 1500,
 };
 
 static int boe_panel_get_modes(struct drm_panel *panel,
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ