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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
Signed-off-by: Lyude <cpaul@xxxxxxxxxx>
---
 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

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux