[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPVz0n3JEHtUOq4qaZbqPu97NXdYxx_=5im4rxoEWi8EbKmKEw@mail.gmail.com>
Date: Thu, 15 Jan 2026 09:49:05 +0200
From: Svyatoslav Ryhel <clamor95@...il.com>
To: Mikko Perttunen <mperttunen@...dia.com>
Cc: Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Thierry Reding <thierry.reding@...il.com>,
Thierry Reding <treding@...dia.com>, Jonathan Hunter <jonathanh@...dia.com>,
Prashant Gaikwad <pgaikwad@...dia.com>, Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>, David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Dmitry Osipenko <digetx@...il.com>, Charan Pedumuru <charan.pedumuru@...il.com>, devicetree@...r.kernel.org,
linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-clk@...r.kernel.org, dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH v2 2/4 RESEND] gpu/drm: tegra: dsi: move prepare function
to the top of encoder enable
чт, 15 січ. 2026 р. о 07:54 Mikko Perttunen <mperttunen@...dia.com> пише:
>
> On Thursday, December 4, 2025 3:17 PM Svyatoslav Ryhel wrote:
> > The tegra_dsi_prepare function performs hardware setup and should be
> > called before any register readings or there will be a risk of device
> > hangup on register access. To avoid this situation, tegra_dsi_prepare must
> > be called at the beginning of tegra_dsi_encoder_enable.
> >
> > Signed-off-by: Svyatoslav Ryhel <clamor95@...il.com>
> > ---
> > drivers/gpu/drm/tegra/dsi.c | 12 ++++++------
> > 1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c
> > index 278bf2c85524..8e80c7efe8b4 100644
> > --- a/drivers/gpu/drm/tegra/dsi.c
> > +++ b/drivers/gpu/drm/tegra/dsi.c
> > @@ -914,6 +914,12 @@ static void tegra_dsi_encoder_enable(struct drm_encoder *encoder)
> > u32 value;
> > int err;
> >
> > + err = tegra_dsi_prepare(dsi);
> > + if (err < 0) {
> > + dev_err(dsi->dev, "failed to prepare: %d\n", err);
> > + return;
> > + }
> > +
> > /* If the bootloader enabled DSI it needs to be disabled
> > * in order for the panel initialization commands to be
> > * properly sent.
> > @@ -923,12 +929,6 @@ static void tegra_dsi_encoder_enable(struct drm_encoder *encoder)
> > if (value & DSI_POWER_CONTROL_ENABLE)
> > tegra_dsi_disable(dsi);
> >
> > - err = tegra_dsi_prepare(dsi);
> > - if (err < 0) {
> > - dev_err(dsi->dev, "failed to prepare: %d\n", err);
> > - return;
> > - }
> > -
> > state = tegra_dsi_get_state(dsi);
> >
> > tegra_dsi_set_timeout(dsi, state->bclk, state->vrefresh);
> >
>
> The section of code before the tegra_dsi_prepare call was removed in 'Revert "drm/tegra: dsi: Clear enable register if powered by bootloader"', so this patch should no longer be necessary.
>
> Mikko
>
You are correct. I have found this when rebasing onto v6.18 which was
much later then this series was resent. Obviously, this patch would be
dropped on the next resend/v3. Sorry for inconvenience.
>
>
Powered by blists - more mailing lists