[PATCH 107/120] drm/amd/display: Move verify link cap after read edid

Harry Wentland harry.wentland at amd.com
Wed Aug 9 15:02:33 UTC 2017


From: Wenjing Liu <Wenjing.Liu at amd.com>

[Description]
DP link layer test 400.1.1 fails intermittently.
The test device will pull hpd low immediately
after verify link cap.
Driver reads edid when hpd low that causes the test to fail.

[Solution]
Move read edid before verify link cap, so driver will
read edid before starting link training

Change-Id: I3d35fb06d433970660c18aa0697f570158c13001
Signed-off-by: Wenjing Liu <Wenjing.Liu at amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng at amd.com>
Acked-by: Harry Wentland <Harry.Wentland at amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc_link.c    | 16 ++++++++++++++++
 drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c |  7 -------
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
index 1279eb1dfc2e..72eb6af62f45 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -666,6 +666,22 @@ bool dc_link_detect(struct dc_link *link, bool boot)
 			break;
 		}
 
+		if (link->connector_signal == SIGNAL_TYPE_DISPLAY_PORT &&
+			sink_caps.transaction_type ==
+			DDC_TRANSACTION_TYPE_I2C_OVER_AUX) {
+			/*
+			 * TODO debug why Dell 2413 doesn't like
+			 *  two link trainings
+			 */
+			if (is_mst_supported(link)) {
+				link->verified_link_cap =
+						link->reported_link_cap;
+			} else {
+				dp_hbr_verify_link_cap(link,
+				    &link->reported_link_cap);
+			}
+		}
+
 		/* HDMI-DVI Dongle */
 		if (sink->sink_signal == SIGNAL_TYPE_HDMI_TYPE_A &&
 				!sink->edid_caps.edid_hdmi)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
index 3d296b1d118f..9d5fe658d14c 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
@@ -2283,13 +2283,6 @@ void detect_dp_sink_caps(struct dc_link *link)
 	 * DP, hw_init may need check signal or power up
 	 * encoder here.
 	 */
-
-	if (is_mst_supported(link)) {
-		link->verified_link_cap = link->reported_link_cap;
-	} else {
-		dp_hbr_verify_link_cap(link,
-			&link->reported_link_cap);
-	}
 	/* TODO save sink caps in link->sink */
 }
 
-- 
2.11.0



More information about the amd-gfx mailing list