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 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);
        regmap_update_bits(d->prcmu, PRCM_DSI_SW_RESET,
                           PRCM_DSI_SW_RESET_DSI0_SW_RESETN, 0);
}

So this will not even compile.

I suppose you have a solution for removing the panel bridge automatically
as well?

Yours,
Linus Walleij



[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