[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54c01a13f382aacd7cd4d75a642630053f54b8f1.camel@redhat.com>
Date: Mon, 17 Sep 2018 14:10:02 -0400
From: Lyude Paul <lyude@...hat.com>
To: Ville Syrjälä <ville.syrjala@...ux.intel.com>
Cc: dri-devel@...ts.freedesktop.org, Sean Paul <sean@...rly.run>,
David Airlie <airlied@...ux.ie>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/probe_helper: Don't bother probing when connectors
are forced off
On Mon, 2018-09-17 at 20:55 +0300, Ville Syrjälä wrote:
> On Mon, Sep 17, 2018 at 01:43:44PM -0400, Lyude Paul wrote:
> > Userspace asked them to be forced off, so why would we care about what a
> > probe tells us?
>
> I believe there should be force checks in the callers already.
> Or are we missing some?
JFYI, what triggered me to send this patch are these error messages that come
from nouveau when a hotplug happens on a port that we've forced off:
[ 1903.918104] nouveau 0000:01:00.0: DRM: DDC responded, but no EDID for DP-2
[ 1903.918123] [drm:drm_helper_hpd_irq_event [drm_kms_helper]] [CONNECTOR:61:DP-2] status updated from disconnected to disconnected
That being said; I'm sure there are probably some checks missing, but I don't
really see the purpose in calling the driver's probe functions at all if they're
just supposed to return the status we forced.
>
> >
> > Signed-off-by: Lyude Paul <lyude@...hat.com>
> > ---
> > drivers/gpu/drm/drm_probe_helper.c | 7 ++++++-
> > 1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/drm_probe_helper.c
> > b/drivers/gpu/drm/drm_probe_helper.c
> > index a1bb157bfdfa..56d2b5dd1f58 100644
> > --- a/drivers/gpu/drm/drm_probe_helper.c
> > +++ b/drivers/gpu/drm/drm_probe_helper.c
> > @@ -269,7 +269,9 @@ drm_helper_probe_detect_ctx(struct drm_connector
> > *connector, bool force)
> > retry:
> > ret = drm_modeset_lock(&connector->dev->mode_config.connection_mutex,
> > &ctx);
> > if (!ret) {
> > - if (funcs->detect_ctx)
> > + if (connector->force == DRM_FORCE_OFF)
> > + ret = connector_status_disconnected;
>
> connector->force is protected by mode_config.mutex IIRC.
>
> > + else if (funcs->detect_ctx)
> > ret = funcs->detect_ctx(connector, &ctx, force);
> > else if (connector->funcs->detect)
> > ret = connector->funcs->detect(connector, force);
> > @@ -317,6 +319,9 @@ drm_helper_probe_detect(struct drm_connector *connector,
> > if (ret)
> > return ret;
> >
> > + if (connector->force == DRM_FORCE_OFF)
> > + return connector_status_disconnected;
> > +
> > if (funcs->detect_ctx)
> > return funcs->detect_ctx(connector, ctx, force);
> > else if (connector->funcs->detect)
> > --
> > 2.17.1
> >
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@...ts.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
>
Powered by blists - more mailing lists