All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/dp: Update connector status for DP MST hotplugs
@ 2016-11-04  3:30 Dhinakaran Pandiyan
  2016-11-04  3:38 ` Dhinakaran Pandiyan
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Dhinakaran Pandiyan @ 2016-11-04  3:30 UTC (permalink / raw)
  To: intel-gfx; +Cc: Dhinakaran Pandiyan

Hotplugging a monitor in DP MST configuration triggers short pulses.
Although the short pulse handling path ends up in the MST hotplug function,
we do not perform a detect before sending the hotplug uvent. This leads to
the connector status not being updated when the userspace calls
DRM_IOCTL_MODE_GETCONNECTOR.

So, let's call the connector function ->detect() to update the connector
status before sending the uevent.

Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
---
 drivers/gpu/drm/i915/intel_dp_mst.c | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
index 3ffbd69..a28b12b 100644
--- a/drivers/gpu/drm/i915/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/intel_dp_mst.c
@@ -492,8 +492,25 @@ static void intel_dp_mst_hotplug(struct drm_dp_mst_topology_mgr *mgr)
 	struct intel_dp *intel_dp = container_of(mgr, struct intel_dp, mst_mgr);
 	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
 	struct drm_device *dev = intel_dig_port->base.base.dev;
+	struct intel_connector *intel_connector;
+	bool change = false;
+	enum drm_connector_status old_status;
+
+	for_each_intel_connector(dev, intel_connector) {
+		struct drm_connector *connector = &(intel_connector->base);
+
+		if (intel_connector->mst_port != intel_dp)
+			continue;
+
+		old_status = connector->status;
+		connector->status = connector->funcs->detect(connector, false);
+
+		if (old_status != connector->status)
+			changed = true;
+	}
 
-	drm_kms_helper_hotplug_event(dev);
+	if (changed)
+		drm_kms_helper_hotplug_event(dev);
 }
 
 static const struct drm_dp_mst_topology_cbs mst_cbs = {
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2016-11-17  9:12 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-04  3:30 [PATCH] drm/i915/dp: Update connector status for DP MST hotplugs Dhinakaran Pandiyan
2016-11-04  3:38 ` Dhinakaran Pandiyan
2016-11-07 16:14   ` Ville Syrjälä
2016-11-07 23:58     ` Pandiyan, Dhinakaran
2016-11-08  0:27     ` [PATCH v2] " Dhinakaran Pandiyan
2016-11-08 11:04       ` Ville Syrjälä
2016-11-11 20:43         ` Pandiyan, Dhinakaran
2016-11-11 21:05           ` Ville Syrjälä
2016-11-17  1:43             ` Pandiyan, Dhinakaran
2016-11-11 17:28       ` Ville Syrjälä
2016-11-11 21:21       ` Daniel Vetter
2016-11-13 10:39         ` Daniel Vetter
2016-11-17  1:53           ` Pandiyan, Dhinakaran
2016-11-17  7:53             ` Daniel Vetter
2016-11-17  9:12               ` Pandiyan, Dhinakaran
2016-11-04  4:16 ` ✗ Fi.CI.BAT: warning for drm/i915/dp: Update connector status for DP MST hotplugs (rev2) Patchwork
2016-11-04 10:26   ` Saarinen, Jani
2016-11-04  4:42 ` [PATCH] drm/i915/dp: Update connector status for DP MST hotplugs kbuild test robot
2016-11-08  0:45 ` ✓ Fi.CI.BAT: success for drm/i915/dp: Update connector status for DP MST hotplugs (rev3) Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.