[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YWaJm4u5fWbLHIea@qwark.sigxcpu.org>
Date: Wed, 13 Oct 2021 09:24:11 +0200
From: Guido Günther <agx@...xcpu.org>
To: Andrzej Hajda <andrzej.hajda@...il.com>
Cc: Laurent Pinchart <laurent.pinchart@...asonboard.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>,
Jyri Sarha <jyri.sarha@....fi>,
Tomi Valkeinen <tomi.valkeinen@...asonboard.com>,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/bridge: Ignore -EPROBE_DEFER when bridge attach fails
Hi,
On Wed, Oct 13, 2021 at 08:48:32AM +0200, Andrzej Hajda wrote:
> On 12.10.2021 22:47, Guido Günther wrote:
> > Hi Laurent,
> > On Tue, Oct 12, 2021 at 11:17:07PM +0300, Laurent Pinchart wrote:
> > > Hi Guido,
> > >
> > > Thank you for the patch.
> > >
> > > On Tue, Oct 12, 2021 at 09:58:58PM +0200, Guido Günther wrote:
> > > > Otherwise logs are filled with
> > > >
> > > > [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@...us@...00000/mipi-dsi@...0 0000 to encoder None-34: -517
> > > >
> > > > when the bridge isn't ready yet.
> > > >
> > > > Fixes: fb8d617f8fd6 ("drm/bridge: Centralize error message when bridge attach fails")
> > > > Signed-off-by: Guido Günther <agx@...xcpu.org>
> > > > ---
> > > > drivers/gpu/drm/drm_bridge.c | 11 ++++++-----
> > > > 1 file changed, 6 insertions(+), 5 deletions(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c
> > > > index a8ed66751c2d..f0508e85ae98 100644
> > > > --- a/drivers/gpu/drm/drm_bridge.c
> > > > +++ b/drivers/gpu/drm/drm_bridge.c
> > > > @@ -227,14 +227,15 @@ int drm_bridge_attach(struct drm_encoder *encoder, struct drm_bridge *bridge,
> > > > bridge->encoder = NULL;
> > > > list_del(&bridge->chain_node);
> > > > + if (ret != -EPROBE_DEFER) {
> > > > #ifdef CONFIG_OF
> > > > - DRM_ERROR("failed to attach bridge %pOF to encoder %s: %d\n",
> > > > - bridge->of_node, encoder->name, ret);
> > > > + 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);
> > > > + DRM_ERROR("failed to attach bridge to encoder %s: %d\n",
> > > > + encoder->name, ret);
> > > > #endif
> > > > -
> > > > + }
> > >
> > > This looks fine as such, but I'm concerned about the direction it's
> > > taking. Ideally, probe deferral should happen at probe time, way before
> > > the bridge is attached. Doing otherwise is a step in the wrong direction
> > > in my opinion, and something we'll end up regretting when we'll feel the
> > > pain it inflicts.
> >
> > The particular case I'm seeing this is the nwl driver probe deferrals if
> > the panel bridge isn't ready (which needs a bunch of components
> > (dsi, panel, backlight wrapped led, ...) and it probes fine later on so I
> > wonder where you see the actual error cause? That downstream of the
> > bridge isn't ready or that the display controller is already attaching
> > the bridge?
>
> So it is something wrong there, nwl should not publish bridge interface
> until it gather its resources (the panel in this case).
That helps, I'll look at that. Thanks!
-- Guido
>
> Regards
> Andrzej
>
>
> >
> > Cheers,
> > -- Guido
> >
> > >
> > > > return ret;
> > > > }
> > > > EXPORT_SYMBOL(drm_bridge_attach);
> > >
> > > --
> > > Regards,
> > >
> > > Laurent Pinchart
> > >
>
Powered by blists - more mailing lists