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] [day] [month] [year] [list]
Message-ID: <X9iJe2GdJ2VteOwl@phenom.ffwll.local>
Date:   Tue, 15 Dec 2020 11:01:31 +0100
From:   Daniel Vetter <daniel@...ll.ch>
To:     Guido Günther <agx@...xcpu.org>
Cc:     Marek Vasut <marex@...x.de>, Stefan Agner <stefan@...er.ch>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        NXP Linux Team <linux-imx@....com>,
        Emil Velikov <emil.l.velikov@...il.com>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        dri-devel@...ts.freedesktop.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 1/1] drm: mxsfb: Silence -EPROBE_DEFER while waiting
 for bridge

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ