diff mbox series

[RESEND,v2,2/2] drm/i915/mst: Reset MST after resume when necessary

Message ID 20181024021925.27026-3-juston.li@intel.com (mailing list archive)
State New, archived
Headers show
Series Check MST topology change on resume | expand

Commit Message

Juston Li Oct. 24, 2018, 2:19 a.m. UTC
From: Lyude <cpaul@redhat.com>

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@vger.kernel.org
Signed-off-by: Lyude <cpaul@redhat.com>
Signed-off-by: Juston Li <juston.li@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 8c38efef77a1..cb5ffec73094 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -6793,7 +6793,12 @@  void intel_dp_mst_resume(struct drm_i915_private *dev_priv)
 			continue;
 
 		ret = drm_dp_mst_topology_mgr_resume(&intel_dp->mst_mgr);
-		if (ret)
+		/* A full reset is required */
+		if (ret == -EINVAL) {
+			drm_dp_mst_topology_mgr_set_mst(&intel_dp->mst_mgr, false);
+			intel_dp_configure_mst(intel_dp);
+		} else if (ret != 0) {
 			intel_dp_check_mst_status(intel_dp);
+		}
 	}
 }