From: David Heidelberg <[email protected]>
Asserting the reset GPIO in unprepare() and leaving it asserted puts
the DDIC into a state it never recovers from: after the following
prepare() the panel answers all DCS commands, reports display-on with
clean self-diagnostics, and its configuration registers read back
identical to a working panel, but it never lights up again.
On the Pixel 3, vddi is shared with the touchscreen controller and
remains powered while the panel is off, so with this driver the DDIC
sits in reset with its logic rail up for the whole blank period - a
state the vendor stack never creates: the vendor firmware only toggles
reset as part of a full power-on sequence, and the vendor OS never
power-cycles the panel at all (LP mode is used instead).
Leave reset alone in unprepare(); prepare() performs the regular reset
sequence anyway.
Without this, the Pixel 3 display never comes back after the first
blank/unblank cycle.
Since there isn't any other panel or device using this DDIC, this
approach seems resoanble to address the issue.
Fixes: 069a6c0e94f9 ("drm: panel: Add LG sw43408 panel driver")
Reviewed-by: Neil Armstrong <[email protected]>
Signed-off-by: David Heidelberg <[email protected]>
---
drivers/gpu/drm/panel/panel-lg-sw43408.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-lg-sw43408.c
b/drivers/gpu/drm/panel/panel-lg-sw43408.c
index 293826c5006b9..0bf8e08f10b9c 100644
--- a/drivers/gpu/drm/panel/panel-lg-sw43408.c
+++ b/drivers/gpu/drm/panel/panel-lg-sw43408.c
@@ -50,18 +50,24 @@ static int sw43408_unprepare(struct drm_panel *panel)
int ret;
mipi_dsi_dcs_set_display_off_multi(&ctx);
mipi_dsi_dcs_enter_sleep_mode_multi(&ctx);
mipi_dsi_msleep(&ctx, 100);
- gpiod_set_value(sw43408->reset_gpio, 1);
-
+ /*
+ * Keep reset deasserted: vddi may stay powered (it is shared with
+ * the touchscreen on Pixel 3) and holding the DDIC in reset while
+ * its logic rail is up puts it into a state that no init sequence
+ * recovers from - the panel keeps answering DCS commands and
+ * reports display-on, but never lights up again. The vendor stack
+ * only ever toggles reset as part of a powered-up init sequence.
+ */
ret = regulator_bulk_disable(ARRAY_SIZE(sw43408_supplies),
sw43408->supplies);
return ret ? : ctx.accum_err;
}
static int sw43408_program(struct drm_panel *panel)
{
struct sw43408_panel *sw43408 = to_panel_info(panel);
--
2.55.0