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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAD=FV=UpiZxbeu9kF=bRfC=+YZmDj3qM+kSo5c7oRxaXTPDi6A@mail.gmail.com>
Date: Wed, 12 Feb 2025 07:14:51 -0800
From: Doug Anderson <dianders@...omium.org>
To: Maxime Ripard <mripard@...nel.org>
Cc: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, 
	Thomas Zimmermann <tzimmermann@...e.de>, David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>, 
	Andrzej Hajda <andrzej.hajda@...el.com>, Neil Armstrong <neil.armstrong@...aro.org>, 
	Robert Foss <rfoss@...nel.org>, Laurent Pinchart <Laurent.pinchart@...asonboard.com>, 
	Jonas Karlman <jonas@...boo.se>, Jernej Skrabec <jernej.skrabec@...il.com>, 
	dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org, 
	Stephen Boyd <swboyd@...omium.org>
Subject: Re: [PATCH v2 35/35] drm/bridge: ti-sn65dsi86: Use bridge_state crtc pointer

Hi,

On Tue, Feb 11, 2025 at 2:16 PM Doug Anderson <dianders@...omium.org> wrote:
>
> Hi,
>
> On Tue, Feb 4, 2025 at 7:01 AM Maxime Ripard <mripard@...nel.org> wrote:
> >
> > @@ -374,12 +377,15 @@ static int __maybe_unused ti_sn65dsi86_resume(struct device *dev)
> >          * panel (including the aux channel) w/out any need for an input clock
> >          * so we can do it in resume which lets us read the EDID before
> >          * pre_enable(). Without a reference clock we need the MIPI reference
> >          * clock so reading early doesn't work.
> >          */
> > -       if (pdata->refclk)
> > -               ti_sn65dsi86_enable_comms(pdata);
> > +       if (pdata->refclk) {
> > +               drm_modeset_lock(&pdata->bridge.base.lock, NULL);
> > +               ti_sn65dsi86_enable_comms(pdata, drm_bridge_get_current_state(&pdata->bridge));
> > +               drm_modeset_unlock(&pdata->bridge.base.lock);
>
> Oh. I haven't tested yet (my device is at home, but I think there is
> an easy solution to my deadlock problems. Drop the modeset locks here
> and just pass NULL for the state. We only end up here if
> "pdata->refclk" is not NULL. Then we only use the passed state if
> "pdata->refclk" _is_ NULL.

I can confirm this works. At the very least I was able to boot up both
with a hardcoded panel and with "edp-panel" and both worked. Seems
like a good solution for your patch.

Long term we should probably get rid of the support for working
without a "refclk". It's theoretically possible to use the hardware
that way and some super early prototypes I worked on used that. ...but
it's a bad idea and I'm fairly certain nobody is _actually_ using it.
That means that the code for handling it is likely not tested and may
have bugs.

-Doug

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ