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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPVz0n2PZRSLyKNBAA+nfH66ujbvmQVQbG=6Ai_5sBe3U_dyPg@mail.gmail.com>
Date: Sat, 24 Jan 2026 22:19:51 +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 р. о 09:49 Svyatoslav Ryhel <clamor95@...il.com> пише:
>
> чт, 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.
>

Actually, "Revert "drm/tegra: dsi: Clear enable register if powered by
bootloader"" causes a  regression for me (DSI on Tegra20 device,
Motorola Atrix 4G). DSI initiated by bootloader will be stuck if not
disabled pre reconfiguration, Dmitry was right by bringing that
change, but he did not take into account that if DSI is accessed from
cold state (not configured by bootloader), device will hang. This
patch addresses this behavior of Dmitry's patch and prevents
regression introduced by reverting it.

> >
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ