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]
Message-ID: <CAMty3ZA3rTqkPtmC2yBq8zSExGd9jRjOPR06tpt2fB_AXHRxdQ@mail.gmail.com>
Date:   Tue, 30 Nov 2021 13:08:57 +0530
From:   Jagan Teki <jagan@...rulasolutions.com>
To:     Kieran Bingham <kieran.bingham+renesas@...asonboard.com>
Cc:     Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        linux-renesas-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
        dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH 4/4] drm: rcar-du: mipi-dsi: Support bridge probe ordering

Hi Kieran,

On Fri, Nov 26, 2021 at 3:45 PM Kieran Bingham
<kieran.bingham+renesas@...asonboard.com> wrote:
>
> The bridge probe ordering for DSI devices has been clarified and further
> documented in
>
> To support connecting with the SN65DSI86 device after commit c3b75d4734cb
> ("drm/bridge: sn65dsi86: Register and attach our DSI device at probe"),
> update to the new probe ordering to remove a perpetual -EPROBE_DEFER
> loop between the two devices.
>
> Signed-off-by: Kieran Bingham <kieran.bingham+renesas@...asonboard.com>
> ---
>  drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c | 48 +++++++++++++------------
>  1 file changed, 26 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c b/drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c
> index 833f4480bdf3..f783bacee8da 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c
> @@ -639,6 +639,8 @@ static int rcar_mipi_dsi_host_attach(struct mipi_dsi_host *host,
>                                         struct mipi_dsi_device *device)
>  {
>         struct rcar_mipi_dsi *dsi = host_to_rcar_mipi_dsi(host);
> +       struct drm_panel *panel;
> +       int ret;
>
>         if (device->lanes > dsi->num_data_lanes)
>                 return -EINVAL;
> @@ -646,12 +648,36 @@ static int rcar_mipi_dsi_host_attach(struct mipi_dsi_host *host,
>         dsi->lanes = device->lanes;
>         dsi->format = device->format;
>
> +       ret = drm_of_find_panel_or_bridge(dsi->dev->of_node, 1, 0, &panel,
> +                                         &dsi->next_bridge);
> +       if (ret) {
> +               dev_err_probe(dsi->dev, ret, "could not find next bridge\n");
> +               return ret;
> +       }
> +
> +       if (!dsi->next_bridge) {
> +               dsi->next_bridge = devm_drm_panel_bridge_add(dsi->dev, panel);
> +               if (IS_ERR(dsi->next_bridge)) {
> +                       dev_err(dsi->dev, "failed to create panel bridge\n");
> +                       return PTR_ERR(dsi->next_bridge);
> +               }
> +       }

Can we use the new function devm_drm_of_get_bridge instead of the entire code?

Jagan.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ