linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Revert "drm: Stop resetting connector state to unknown"
@ 2015-12-15 18:07 Lyude
  2015-12-15 18:23 ` Rob Clark
  0 siblings, 1 reply; 8+ messages in thread
From: Lyude @ 2015-12-15 18:07 UTC (permalink / raw)
  To: David Airlie, open list:DRM DRIVERS, open list, Daniel Vetter
  Cc: Rui Matos, Julien Wajsberg, kuddel.mail, Lennart Poettering,
	Rob Clark, Benjamin Tissoires, Lyude

This reverts commit 5677d67ae394 ("drm: Stop resetting connector state to
unknown")

Unfortunately, not resetting the connector status to unknown actually
breaks reprobing on suspend/resume in i915, which is important to have
working since it means a user docking their laptop in suspend won't have
their monitors work after resume. This commit was originally pushed to fix
a bug with systemd[1], however said bug has already been fixed in
userspace.

Since "unknown" is technically a valid option to return to userspace for a
connector's status, I would think that this sort of behavior should
probably be expected from userspace. Some good examples of this are the
radeon driver reporting "unknown" for connectors that have done something
wonky during a hotplug event (e.g. part of the initialization of the
connector failed), and the omapdrm driver returns "unknown" for certain
connector types by default.

[1]: https://bugzilla.kernel.org/show_bug.cgi?id=100641

Signed-off-by: Lyude <cpaul@redhat.com>
---
 drivers/gpu/drm/drm_crtc.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 24c5434..474e636 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -5312,11 +5312,12 @@ void drm_mode_config_reset(struct drm_device *dev)
 		if (encoder->funcs->reset)
 			encoder->funcs->reset(encoder);
 
-	mutex_lock(&dev->mode_config.mutex);
-	drm_for_each_connector(connector, dev)
+	list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
+		connector->status = connector_status_unknown;
+
 		if (connector->funcs->reset)
 			connector->funcs->reset(connector);
-	mutex_unlock(&dev->mode_config.mutex);
+	}
 }
 EXPORT_SYMBOL(drm_mode_config_reset);
 
-- 
2.5.0


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

end of thread, other threads:[~2015-12-16  8:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-15 18:07 [PATCH] Revert "drm: Stop resetting connector state to unknown" Lyude
2015-12-15 18:23 ` Rob Clark
2015-12-15 18:33   ` Ville Syrjälä
2015-12-15 18:42     ` Rob Clark
2015-12-15 20:34       ` Lyude
2015-12-15 20:44         ` Ville Syrjälä
2015-12-15 22:25         ` [PATCH v2] drm/i915: Send a hotplug event on resume instead of an IRQ event Lyude
2015-12-16  8:33           ` 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).