[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Yanj7O9Kktw8PPY1@pendragon.ideasonboard.com>
Date: Fri, 3 Dec 2021 11:31:24 +0200
From: Laurent Pinchart <laurent.pinchart@...asonboard.com>
To: Yannick Fertre <yannick.fertre@...s.st.com>
Cc: Philippe Cornu <philippe.cornu@...s.st.com>,
Raphael Gallais-Pou <raphael.gallais-pou@...s.st.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm: bridge: remove error message for EPROBE_DEFER in
bridge_attach
Hi Yannick,
Thank you for the patch.
On Fri, Dec 03, 2021 at 09:59:31AM +0100, Yannick Fertre wrote:
> Probe deferred is not an error, don't print it.
>
> Signed-off-by: Yannick Fertre <yannick.fertre@...s.st.com>
> ---
> drivers/gpu/drm/drm_bridge.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c
> index c96847fc0ebc..cef0a62ef5d0 100644
> --- a/drivers/gpu/drm/drm_bridge.c
> +++ b/drivers/gpu/drm/drm_bridge.c
> @@ -288,11 +288,13 @@ int drm_bridge_attach(struct drm_encoder *encoder, struct drm_bridge *bridge,
> list_del(&bridge->chain_node);
>
> #ifdef CONFIG_OF
> - DRM_ERROR("failed to attach bridge %pOF to encoder %s: %d\n",
> - bridge->of_node, encoder->name, ret);
> + if (ret != -EPROBE_DEFER)
> + DRM_ERROR("failed to attach bridge %pOF to encoder %s: %d\n",
> + bridge->of_node, encoder->name, ret);
> #else
> - DRM_ERROR("failed to attach bridge to encoder %s: %d\n",
> - encoder->name, ret);
> + if (ret != -EPROBE_DEFER)
> + DRM_ERROR("failed to attach bridge to encoder %s: %d\n",
> + encoder->name, ret);
It's useful to know about what caused a probe deferral though. There's
now a dev_err_probe() function that prints the message as an dev_err if
the error code is not -EPROBE_DEFER, and as dev_dbg otherwise. It's
meant for probe time only though, so I don't think it can be used here,
but a similar feature could be useful. Or dev_err_probe() could be
extended to support non-probe use cases, but that would be more
difficult.
> #endif
>
> return ret;
--
Regards,
Laurent Pinchart
Powered by blists - more mailing lists