LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Neil Armstrong <narmstrong@baylibre.com>
To: Paul Cercueil <paul@crapouillou.net>, Phong LE <ple@baylibre.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>,
	Robert Foss <robert.foss@linaro.org>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	list@opendingux.net, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] drm/bridge: it66121: Wait for next bridge to be probed
Date: Mon, 30 Aug 2021 11:40:52 +0200	[thread overview]
Message-ID: <c0d7aae8-5324-44b8-c412-8a6ed3bb3729@baylibre.com> (raw)
In-Reply-To: <20210827163956.27517-2-paul@crapouillou.net>

On 27/08/2021 18:39, Paul Cercueil wrote:
> If run before the next bridge is initialized, of_drm_find_bridge() will
> give us a NULL pointer.
> 
> If that's the case, return -EPROBE_DEFER; we may have more luck next
> time.
> 

Fixes: 988156dc2fc9 ("drm: bridge: add it66121 driver")

> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
>  drivers/gpu/drm/bridge/ite-it66121.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/bridge/ite-it66121.c b/drivers/gpu/drm/bridge/ite-it66121.c
> index b130d01147c6..9dc41a7b9136 100644
> --- a/drivers/gpu/drm/bridge/ite-it66121.c
> +++ b/drivers/gpu/drm/bridge/ite-it66121.c
> @@ -924,6 +924,9 @@ static int it66121_probe(struct i2c_client *client,
>  	ctx->next_bridge = of_drm_find_bridge(ep);
>  	of_node_put(ep);
>  
> +	if (!ctx->next_bridge)
> +		return -EPROBE_DEFER;
> +
>  	i2c_set_clientdata(client, ctx);
>  	mutex_init(&ctx->lock);
>  
> 


Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>

Thanks,
Neil

  reply	other threads:[~2021-08-30  9:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-27 16:39 [PATCH 1/2] drm/bridge: it66121: Initialize {device,vendor}_ids Paul Cercueil
2021-08-27 16:39 ` [PATCH 2/2] drm/bridge: it66121: Wait for next bridge to be probed Paul Cercueil
2021-08-30  9:40   ` Neil Armstrong [this message]
2021-08-30  9:40 ` [PATCH 1/2] drm/bridge: it66121: Initialize {device,vendor}_ids Neil Armstrong
2021-08-31 14:22   ` 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=c0d7aae8-5324-44b8-c412-8a6ed3bb3729@baylibre.com \
    --to=narmstrong@baylibre.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=list@opendingux.net \
    --cc=paul@crapouillou.net \
    --cc=ple@baylibre.com \
    --cc=robert.foss@linaro.org \
    --subject='Re: [PATCH 2/2] drm/bridge: it66121: Wait for next bridge to be probed' \
    /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

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).