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

Linus Walleij linus.walleij at linaro.org
Wed Mar 2 11:57:08 UTC 2022


On Wed, Mar 2, 2022 at 5:37 AM Jagan Teki <jagan at amarulasolutions.com> wrote:
> On Wed, Mar 2, 2022 at 4:50 AM Linus Walleij <linus.walleij at linaro.org> wrote:
> >
> > On Tue, Mar 1, 2022 at 3:13 PM Jagan Teki <jagan at amarulasolutions.com> wrote:
> >
> > > +       bridge = devm_drm_of_get_bridge(dev, dev->of_node, 0, 0);
> > > +       if (IS_ERR(bridge)) {
> > > +               dev_err(dev, "error to get bridge\n");
> > > +               return PTR_ERR(bridge);
> > >         }
> > >
> > >         d->bridge_out = bridge;
> >
> > Also notice how this bridge gets used in other places:
> >
> > struct drm_connector *connector = drm_panel_bridge_connector(mcde->bridge);
>
> mcde->bridge bridge is the current bridge pointer it cannot affect
> this change. d->bridge_out is what we are finding of the downstream
> bridge.

Sorry I confused things.

Got lost in my own code :/

The bridge in the other file is for DPI obviously...
I should rename it dpi_panel_bridge.

> > Since you deleted:
> >
> > -       } else if (bridge) {
> > -               /* TODO: AV8100 HDMI encoder goes here for example */
> > -               dev_info(dev, "connected to non-panel bridge (unsupported)\n");
> > -               return -ENODEV;
>
> So, this means mcde dsi can support if the downstream bridge is the
> panel not if the downstream bridge is the next bridge. With
> devm_drm_of_get_bridge we cannot find that diff. Identifying the
> panel-bridge with some name pointer during panel_bridge_add might
> solve this, not sure that is proper way to do that?

I'd say leave it, as the DSI bridge (bridge_out) doesn't really care
about this being a panel or not. A further bridge down the chain
should "just work" (famous last words).

Just make sure we properly remove bridge_out in unbind call.

Yours,
Linus Walleij


More information about the dri-devel mailing list