[PATCH 2/2] drm/i915/mst: Reset MST after resume when necessary

Lyude cpaul at redhat.com
Thu May 19 14:19:56 UTC 2016


A follow-up to the previous commit, we skip checking the status of the
MST device and completely reprobe it if drm_dp_mst_topology_mgr_resume()
returns -EINVAL.

Cc: stable at vger.kernel.org
Signed-off-by: Lyude <cpaul at redhat.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index db6a0fd..5b62f7e 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -6063,6 +6063,7 @@ void intel_dp_mst_suspend(struct drm_device *dev)
 void intel_dp_mst_resume(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
+	struct drm_dp_mst_topology_mgr *mgr;
 	int i;
 
 	for (i = 0; i < I915_MAX_PORTS; i++) {
@@ -6075,8 +6076,14 @@ void intel_dp_mst_resume(struct drm_device *dev)
 			if (!intel_dig_port->dp.can_mst)
 				continue;
 
-			ret = drm_dp_mst_topology_mgr_resume(&intel_dig_port->dp.mst_mgr);
-			if (ret != 0) {
+			mgr = &intel_dig_port->dp.mst_mgr;
+
+			ret = drm_dp_mst_topology_mgr_resume(mgr);
+			/* A full reset is required */
+			if (ret == -EINVAL) {
+				drm_dp_mst_topology_mgr_set_mst(mgr, false);
+				intel_dp_probe_mst(&intel_dig_port->dp);
+			} else if (ret != 0) {
 				intel_dp_check_mst_status(&intel_dig_port->dp);
 			}
 		}
-- 
2.5.5



More information about the dri-devel mailing list