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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 3 Mar 2022 19:37:20 +0100
From:   José Expósito <jose.exposito89@...il.com>
To:     Kieran Bingham <kieran.bingham@...asonboard.com>
Cc:     andrzej.hajda@...el.com, linux-pwm@...r.kernel.org,
        jonas@...boo.se, airlied@...ux.ie, robert.foss@...aro.org,
        dri-devel@...ts.freedesktop.org, narmstrong@...libre.com,
        linux-kernel@...r.kernel.org, jernej.skrabec@...il.com,
        thierry.reding@...il.com, Laurent.pinchart@...asonboard.com,
        u.kleine-koenig@...gutronix.de, lee.jones@...aro.org,
        maxime@...no.tech
Subject: Re: [PATCH] drm/bridge: ti-sn65dsi86: switch to
 devm_drm_of_get_bridge

On Mon, Feb 28, 2022 at 11:24:36PM +0000, Kieran Bingham wrote:
> Hi José
> 
> Quoting José Expósito (2022-02-28 18:39:54)
> > The function "drm_of_find_panel_or_bridge" has been deprecated in
> > favor of "devm_drm_of_get_bridge".
> > 
> > Switch to the new function and reduce boilerplate.
> > 
> > Signed-off-by: José Expósito <jose.exposito89@...il.com>
> > ---
> >  drivers/gpu/drm/bridge/ti-sn65dsi86.c | 8 +-------
> >  1 file changed, 1 insertion(+), 7 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> > index dab8f76618f3..fb8e16ed7e90 100644
> > --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> > +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> > @@ -1232,15 +1232,9 @@ static int ti_sn_bridge_probe(struct auxiliary_device *adev,
> >  {
> >         struct ti_sn65dsi86 *pdata = dev_get_drvdata(adev->dev.parent);
> >         struct device_node *np = pdata->dev->of_node;
> > -       struct drm_panel *panel;
> >         int ret;
> >  
> > -       ret = drm_of_find_panel_or_bridge(np, 1, 0, &panel, NULL);
> > -       if (ret)
> > -               return dev_err_probe(&adev->dev, ret,
> > -                                    "could not find any panel node\n");
> > -
> > -       pdata->next_bridge = devm_drm_panel_bridge_add(pdata->dev, panel);
> > +       pdata->next_bridge = devm_drm_of_get_bridge(pdata->dev, np, 1, 0);
> 
> Yikes, I was about to rely on this panel variable to determine if the
> device is a panel or a display port connector. (Well, I am relying on
> it, and patches are hoping to be reposted this week).
> 
> Is there expected to be another way to identify if the next connection
> is a panel or a bridge?
> 
> Regards

Hi Kieran,

I'm getting started in the DRM subsystem. I couldn't tell if there is a
good way to access the panel pointer... I didn't manage to find it, but
hopefully someone with more experience can point us to a solution.

Since you mentioned display port, I'm not sure if in your case checking
"pdata->next_bridge->type" could be good enough.

Anyway, if this patch causes you problems, please go ahead and ignore it.
I'm sure the series you are working on are more important than removing
a deprecated function :)

Best wishes,
Jose

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ