From f72b7c857e313e1c5c14dc15fe26d0bcaac24510 Mon Sep 17 00:00:00 2001 From: Wyon Bi Date: Mon, 9 May 2022 06:44:43 +0000 Subject: [PATCH] drm/panel: simple: Add reset gpio Fixes: 12353d72438b ("drm/panel: simple: Add reset gpio") Signed-off-by: Wyon Bi Change-Id: I3c3066e4249aa49f948de9f0bb5d888f0e3d2739 --- drivers/gpu/drm/panel/panel-simple.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 68553c28c802..d1db91dbe17b 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -518,16 +518,6 @@ static int panel_simple_prepare(struct drm_panel *panel) gpiod_direction_output(p->enable_gpio, 1); - if (p->desc->delay.reset) - msleep(p->desc->delay.prepare); - - gpiod_direction_output(p->reset_gpio, 1); - - if (p->desc->delay.reset) - msleep(p->desc->delay.reset); - - gpiod_direction_output(p->reset_gpio, 0); - delay = p->desc->delay.prepare; if (p->no_hpd) delay += p->desc->delay.hpd_absent_delay; @@ -554,6 +544,13 @@ static int panel_simple_prepare(struct drm_panel *panel) } } + gpiod_direction_output(p->reset_gpio, 1); + + if (p->desc->delay.reset) + msleep(p->desc->delay.reset); + + gpiod_direction_output(p->reset_gpio, 0); + if (p->desc->init_seq) if (p->dsi) panel_simple_xfer_dsi_cmd_seq(p, p->desc->init_seq);