[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <652ff2e8.050a0220.2e2de.4666@mx.google.com>
Date: Wed, 18 Oct 2023 09:59:51 -0500
From: Chris Morgan <macroalpha82@...il.com>
To: Guido Günther <guido.gunther@...i.sm>
Cc: Frank Oltmanns <frank@...manns.dev>,
Ondrej Jirman <megous@...ous.com>,
Purism Kernel Team <kernel@...i.sm>,
Samuel Holland <samuel@...lland.org>,
Sam Ravnborg <sam@...nborg.org>,
open list <linux-kernel@...r.kernel.org>,
"open list:DRM PANEL DRIVERS" <dri-devel@...ts.freedesktop.org>,
Thierry Reding <thierry.reding@...il.com>,
Ondrej Jirman <megi@....cz>, phone-devel@...r.kernel.org
Subject: Re: [PATCH 1/1] drm/panel: st7703: Pick different reset sequence
On Sun, Oct 15, 2023 at 02:49:20PM +0200, Guido Günther wrote:
> Hi,
> On Sat, Feb 11, 2023 at 06:17:48PM +0100, Frank Oltmanns wrote:
> > From: Ondrej Jirman <megi@....cz>
> >
> > Switching to a different reset sequence, enabling IOVCC before enabling
> > VCC.
> >
> > There also needs to be a delay after enabling the supplies and before
> > deasserting the reset. The datasheet specifies 1ms after the supplies
> > reach the required voltage. Use 10-20ms to also give the power supplies
> > some time to reach the required voltage, too.
> >
> > This fixes intermittent panel initialization failures and screen
> > corruption during resume from sleep on panel xingbangda,xbd599 (e.g.
> > used in PinePhone).
>
> Thanks, applied to drm-misc-next.
> Cheers,
> -- Guido
Thank you. Probably too late, but this fixes problems I have with a
different ST7703 based panel.
Tested-by: Chris Morgan <macromorgan@...mail.com>
>
> >
> > Signed-off-by: Ondrej Jirman <megi@....cz>
> > Signed-off-by: Frank Oltmanns <frank@...manns.dev>
> > Reported-by: Samuel Holland <samuel@...lland.org>
> > ---
> > drivers/gpu/drm/panel/panel-sitronix-st7703.c | 25 ++++++++++---------
> > 1 file changed, 13 insertions(+), 12 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
> > index 6747ca237ced..45695aa51f62 100644
> > --- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c
> > +++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
> > @@ -411,29 +411,30 @@ static int st7703_prepare(struct drm_panel *panel)
> > return 0;
> >
> > dev_dbg(ctx->dev, "Resetting the panel\n");
> > - ret = regulator_enable(ctx->vcc);
> > + gpiod_set_value_cansleep(ctx->reset_gpio, 1);
> > +
> > + ret = regulator_enable(ctx->iovcc);
> > if (ret < 0) {
> > - dev_err(ctx->dev, "Failed to enable vcc supply: %d\n", ret);
> > + dev_err(ctx->dev, "Failed to enable iovcc supply: %d\n", ret);
> > return ret;
> > }
> > - ret = regulator_enable(ctx->iovcc);
> > +
> > + ret = regulator_enable(ctx->vcc);
> > if (ret < 0) {
> > - dev_err(ctx->dev, "Failed to enable iovcc supply: %d\n", ret);
> > - goto disable_vcc;
> > + dev_err(ctx->dev, "Failed to enable vcc supply: %d\n", ret);
> > + regulator_disable(ctx->iovcc);
> > + return ret;
> > }
> >
> > - gpiod_set_value_cansleep(ctx->reset_gpio, 1);
> > - usleep_range(20, 40);
> > + /* Give power supplies time to stabilize before deasserting reset. */
> > + usleep_range(10000, 20000);
> > +
> > gpiod_set_value_cansleep(ctx->reset_gpio, 0);
> > - msleep(20);
> > + usleep_range(15000, 20000);
> >
> > ctx->prepared = true;
> >
> > return 0;
> > -
> > -disable_vcc:
> > - regulator_disable(ctx->vcc);
> > - return ret;
> > }
> >
> > static const u32 mantix_bus_formats[] = {
> > --
> > 2.39.1
> >
Powered by blists - more mailing lists