Re: [PATCH v2 8/8] drm: bridge: anx7625: Switch to devm_drm_of_get_bridge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 2, 2022 at 4:43 AM Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:
>
> On Tue, Mar 1, 2022 at 3:13 PM Jagan Teki <jagan@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> > devm_drm_of_get_bridge is capable of looking up the downstream
> > bridge and panel and trying to add a panel bridge if the panel
> > is found.
> >
> > Replace explicit finding calls with devm_drm_of_get_bridge.
> >
> > Cc: Linus Walleij <linus.walleij@xxxxxxxxxx>
> > Signed-off-by: Jagan Teki <jagan@xxxxxxxxxxxxxxxxxxxx>
> > ---
> > Changes for v2:
> > - split the patch
>
> This will be nice code reduction when it works!
>
> > -       struct drm_panel *panel = NULL;
> > -       struct drm_bridge *bridge = NULL;
> > +       struct drm_bridge *bridge;
>
> OK... and then you delete the code that uses panel. But:
>
> static void mcde_dsi_unbind(struct device *dev, struct device *master,
>                             void *data)
> {
>         struct mcde_dsi *d = dev_get_drvdata(dev);
>
>         if (d->panel)
>                 drm_panel_bridge_remove(d->bridge_out);

I think using drm_bridge_remove(d->bridge_out); will directly remove
the bridge whether it is the next bridge or panel bridge as bridge_out
is already found the relevant downstream.

Jagan.



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux