dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/probe_helper: Don't bother probing when connectors are forced off
@ 2018-09-17 17:43 Lyude Paul
  2018-09-17 17:55 ` Ville Syrjälä
  0 siblings, 1 reply; 7+ messages in thread
From: Lyude Paul @ 2018-09-17 17:43 UTC (permalink / raw)
  To: dri-devel
  Cc: Gustavo Padovan, Maarten Lankhorst, Sean Paul, David Airlie,
	linux-kernel

Userspace asked them to be forced off, so why would we care about what a
probe tells us?

Signed-off-by: Lyude Paul <lyude@redhat.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;
+		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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-09-21  8:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-17 17:43 [PATCH] drm/probe_helper: Don't bother probing when connectors are forced off Lyude Paul
2018-09-17 17:55 ` Ville Syrjälä
2018-09-17 17:58   ` Lyude Paul
2018-09-17 18:10   ` Lyude Paul
2018-09-17 18:16     ` Ville Syrjälä
2018-09-17 21:12       ` Lyude Paul
2018-09-21  8:59         ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).