Commit 0301ccba authored by abdoulaye berthe's avatar abdoulaye berthe Committed by Alex Deucher

drm/amd/display: DP Compliance 400.1.1 failure

[Why]
400.1.1 is failing because we are not performing link training when
we get an HPD pulse for the same display. This is breaking DP
compliance

[How]
Always perform link training after HPD pulse if the detection
reason is not  DETECT_REASON_HPDRX.
Signed-off-by: default avatarabdoulaye berthe <abdoulaye.berthe@amd.com>
Reviewed-by: default avatarWenjing Liu <Wenjing.Liu@amd.com>
Acked-by: default avatarBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent e11d4147
...@@ -764,15 +764,9 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason) ...@@ -764,15 +764,9 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason)
if ((prev_sink != NULL) && ((edid_status == EDID_THE_SAME) || (edid_status == EDID_OK))) if ((prev_sink != NULL) && ((edid_status == EDID_THE_SAME) || (edid_status == EDID_OK)))
same_edid = is_same_edid(&prev_sink->dc_edid, &sink->dc_edid); same_edid = is_same_edid(&prev_sink->dc_edid, &sink->dc_edid);
// If both edid and dpcd are the same, then discard new sink and revert back to original sink
if ((same_edid) && (same_dpcd)) {
link_disconnect_remap(prev_sink, link);
sink = prev_sink;
prev_sink = NULL;
} else {
if (link->connector_signal == SIGNAL_TYPE_DISPLAY_PORT && if (link->connector_signal == SIGNAL_TYPE_DISPLAY_PORT &&
sink_caps.transaction_type == sink_caps.transaction_type == DDC_TRANSACTION_TYPE_I2C_OVER_AUX &&
DDC_TRANSACTION_TYPE_I2C_OVER_AUX) { reason != DETECT_REASON_HPDRX) {
/* /*
* TODO debug why Dell 2413 doesn't like * TODO debug why Dell 2413 doesn't like
* two link trainings * two link trainings
...@@ -789,13 +783,21 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason) ...@@ -789,13 +783,21 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason)
if (fail_count == 0) if (fail_count == 0)
break; break;
} }
} else {
// If edid is the same, then discard new sink and revert back to original sink
if (same_edid) {
link_disconnect_remap(prev_sink, link);
sink = prev_sink;
prev_sink = NULL;
}
} }
/* HDMI-DVI Dongle */ /* HDMI-DVI Dongle */
if (sink->sink_signal == SIGNAL_TYPE_HDMI_TYPE_A && if (sink->sink_signal == SIGNAL_TYPE_HDMI_TYPE_A &&
!sink->edid_caps.edid_hdmi) !sink->edid_caps.edid_hdmi)
sink->sink_signal = SIGNAL_TYPE_DVI_SINGLE_LINK; sink->sink_signal = SIGNAL_TYPE_DVI_SINGLE_LINK;
}
/* Connectivity log: detection */ /* Connectivity log: detection */
for (i = 0; i < sink->dc_edid.length / EDID_BLOCK_SIZE; i++) { for (i = 0; i < sink->dc_edid.length / EDID_BLOCK_SIZE; i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment