linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kieran Bingham <kieran.bingham@ideasonboard.com>
To: "José Expósito" <jose.exposito89@gmail.com>, andrzej.hajda@intel.com
Cc: linux-pwm@vger.kernel.org, jonas@kwiboo.se, airlied@linux.ie,
	robert.foss@linaro.org, dri-devel@lists.freedesktop.org,
	narmstrong@baylibre.com, linux-kernel@vger.kernel.org,
	jernej.skrabec@gmail.com, thierry.reding@gmail.com,
	Laurent.pinchart@ideasonboard.com,
	u.kleine-koenig@pengutronix.de,
	"José Expósito" <jose.exposito89@gmail.com>,
	lee.jones@linaro.org, maxime@cerno.tech
Subject: Re: [PATCH] drm/bridge: ti-sn65dsi86: switch to devm_drm_of_get_bridge
Date: Mon, 28 Feb 2022 23:24:36 +0000	[thread overview]
Message-ID: <164609067646.2361501.15747139249939190799@Monstersaurus> (raw)
In-Reply-To: <20220228183955.25508-1-jose.exposito89@gmail.com>

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@gmail.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

--
Kieran


>         if (IS_ERR(pdata->next_bridge)) {
>                 DRM_ERROR("failed to create panel bridge\n");
>                 return PTR_ERR(pdata->next_bridge);
> -- 
> 2.25.1
>

  reply	other threads:[~2022-02-28 23:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-28 18:39 [PATCH] drm/bridge: ti-sn65dsi86: switch to devm_drm_of_get_bridge José Expósito
2022-02-28 23:24 ` Kieran Bingham [this message]
2022-03-03 18:37   ` José Expósito
2022-03-03 21:59     ` Kieran Bingham
2022-03-04 12:12       ` Kieran Bingham
2022-03-09 13:53         ` Robert Foss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=164609067646.2361501.15747139249939190799@Monstersaurus \
    --to=kieran.bingham@ideasonboard.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@linux.ie \
    --cc=andrzej.hajda@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=jose.exposito89@gmail.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=maxime@cerno.tech \
    --cc=narmstrong@baylibre.com \
    --cc=robert.foss@linaro.org \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).