mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: "Guido Günther" <agx@sigxcpu.org>
Cc: Marek Vasut <marex@denx.de>, Stefan Agner <stefan@agner.ch>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Emil Velikov <emil.l.velikov@gmail.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	dri-devel@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/1] drm: mxsfb: Silence -EPROBE_DEFER while waiting for bridge
Date: Tue, 15 Dec 2020 11:01:31 +0100	[thread overview]
Message-ID: <X9iJe2GdJ2VteOwl@phenom.ffwll.local> (raw)
In-Reply-To: <d5761eb871adde5464ba112b89d966568bc2ff6c.1608020391.git.agx@sigxcpu.org>

On Tue, Dec 15, 2020 at 09:23:38AM +0100, Guido Günther wrote:
> It can take multiple iterations until all components for an attached DSI
> bridge are up leading to several:
> 
> [    3.796425] mxsfb 30320000.lcd-controller: Cannot connect bridge: -517
> [    3.816952] mxsfb 30320000.lcd-controller: [drm:mxsfb_probe [mxsfb]] *ERROR* failed to attach bridge: -517
> 
> Silence this by checking for -EPROBE_DEFER and using dev_err_probe() so
> we set a deferred reason in case a dependency fails to probe (which
> quickly happens on small config/DT changes due to the rather long probe
> chain which can include bridges, phys, panels, backights, leds, etc.).
> 
> This also removes the only DRM_DEV_ERROR() usage, the rest of the driver
> uses dev_err().
> 
> Signed-off-by: Guido Günther <agx@sigxcpu.org>
> Fixes: c42001e357f7 ("drm: mxsfb: Use drm_panel_bridge")

Queued up for 5.11, thanks for your patch.
-Daniel

> ---
>  drivers/gpu/drm/mxsfb/mxsfb_drv.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> index 6faf17b6408d..6da93551e2e5 100644
> --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> @@ -134,11 +134,8 @@ static int mxsfb_attach_bridge(struct mxsfb_drm_private *mxsfb)
>  		return -ENODEV;
>  
>  	ret = drm_bridge_attach(&mxsfb->encoder, bridge, NULL, 0);
> -	if (ret) {
> -		DRM_DEV_ERROR(drm->dev,
> -			      "failed to attach bridge: %d\n", ret);
> -		return ret;
> -	}
> +	if (ret)
> +		return dev_err_probe(drm->dev, ret, "Failed to attach bridge\n");
>  
>  	mxsfb->bridge = bridge;
>  
> @@ -212,7 +209,8 @@ static int mxsfb_load(struct drm_device *drm,
>  
>  	ret = mxsfb_attach_bridge(mxsfb);
>  	if (ret) {
> -		dev_err(drm->dev, "Cannot connect bridge: %d\n", ret);
> +		if (ret != -EPROBE_DEFER)
> +			dev_err(drm->dev, "Cannot connect bridge: %d\n", ret);
>  		goto err_vblank;
>  	}
>  
> -- 
> 2.29.2
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

      reply	other threads:[~2020-12-15 10:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-15  8:23 [PATCH v1 0/1] " Guido Günther
2020-12-15  8:23 ` [PATCH v1 1/1] " Guido Günther
2020-12-15 10:01   ` Daniel Vetter [this message]

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=X9iJe2GdJ2VteOwl@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=agx@sigxcpu.org \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=stefan@agner.ch \
    /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

Powered by JetHome