intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/dp: Power cycle display if LINK_ADDRESS fails.
@ 2017-12-21  6:36 Dhinakaran Pandiyan
  2017-12-21  6:53 ` Jani Nikula
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Dhinakaran Pandiyan @ 2017-12-21  6:36 UTC (permalink / raw)
  To: intel-gfx; +Cc: Jani Nikula, Dave Airlie, Dhinakaran Pandiyan, dri-devel

Occasionally there are LINK_ADDRESS sideband messages timing out with the
Lenovo MST dock + Dell MST monitor(w/ in-built branch) setup I have. These
failures lead to the display not coming up on boot. Power cycling the port
corresponding to the MST monitor's branch device and resending the message
fixes the issue. I am not entirely sure if this is specific to my setup.
However, as the power state is toggled conditionally on LINK_ADDRESS
timeouts, this should not affect the working cases.

Cc: Lyude <lyude@redhat.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
---
 drivers/gpu/drm/drm_dp_mst_topology.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
index 70dcfa58d3c2..e06defcdcf18 100644
--- a/drivers/gpu/drm/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/drm_dp_mst_topology.c
@@ -1596,8 +1596,9 @@ static void drm_dp_send_link_address(struct drm_dp_mst_topology_mgr *mgr,
 	int len;
 	struct drm_dp_sideband_msg_tx *txmsg;
 	int ret;
+	int attempts = 5;
 
-	txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL);
+retry:	txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL);
 	if (!txmsg)
 		return;
 
@@ -1635,9 +1636,17 @@ static void drm_dp_send_link_address(struct drm_dp_mst_topology_mgr *mgr,
 			}
 			(*mgr->cbs->hotplug)(mgr);
 		}
+	} else if (attempts--) {
+		kfree(txmsg);
+		drm_dp_send_power_updown_phy(mstb->mgr, mstb->port_parent,
+					     false);
+		drm_dp_send_power_updown_phy(mstb->mgr, mstb->port_parent,
+					     true);
+		DRM_DEBUG_KMS("link address failed %d, retrying\n", ret);
+		goto retry;
 	} else {
 		mstb->link_address_sent = false;
-		DRM_DEBUG_KMS("link address failed %d\n", ret);
+		DRM_DEBUG_KMS("link address failed %d, giving up\n", ret);
 	}
 
 	kfree(txmsg);
-- 
2.11.0

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

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

end of thread, other threads:[~2018-01-05  0:44 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-21  6:36 [PATCH] drm/dp: Power cycle display if LINK_ADDRESS fails Dhinakaran Pandiyan
2017-12-21  6:53 ` Jani Nikula
2017-12-22  0:48   ` [Intel-gfx] " Pandiyan, Dhinakaran
2017-12-22  6:24     ` Pandiyan, Dhinakaran
2017-12-21  7:18 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-12-21  8:31 ` ✓ Fi.CI.IGT: " Patchwork
2017-12-21 18:52 ` [PATCH] " Manasi Navare
2017-12-22  1:06   ` Pandiyan, Dhinakaran
2017-12-22  1:32     ` Manasi Navare
2017-12-22  1:37       ` Manasi Navare
2018-01-04 23:21 ` Lyude Paul
2018-01-04 23:46   ` Pandiyan, Dhinakaran
2018-01-05  0:44     ` [Intel-gfx] " Pandiyan, Dhinakaran

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).