提交 7d58e721 编写于 作者: M Martin Tsai 提交者: Alex Deucher

drm/amd/display: To prevent detecting new sink from spurious HPD

Signed-off-by: NMartin Tsai <martin.tsai@amd.com>
Reviewed-by: NTony Cheng <Tony.Cheng@amd.com>
Acked-by: NHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 e008b0bc
...@@ -649,27 +649,34 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason) ...@@ -649,27 +649,34 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason)
sink_init_data.link = link; sink_init_data.link = link;
sink_init_data.sink_signal = sink_caps.signal; sink_init_data.sink_signal = sink_caps.signal;
if (link->local_sink) { sink = dc_sink_create(&sink_init_data);
sink = link->local_sink; if (!sink) {
} else { DC_ERROR("Failed to create sink!\n");
sink_init_data.link = link; return false;
sink_init_data.sink_signal = sink_caps.signal; }
sink = dc_sink_create(&sink_init_data); if (link->local_sink) {
if (!sink) { edid_status = dm_helpers_read_local_edid(
DC_ERROR("Failed to create sink!\n"); link->ctx,
return false; link,
sink);
if (edid_status == EDID_OK) {
// Edid is not the same, to update the local sink with new sink.
sink->dongle_max_pix_clk = sink_caps.max_hdmi_pixel_clock;
sink->converter_disable_audio = converter_disable_audio;
link->local_sink = sink;
} }
} else {
sink->dongle_max_pix_clk = sink_caps.max_hdmi_pixel_clock; sink->dongle_max_pix_clk = sink_caps.max_hdmi_pixel_clock;
sink->converter_disable_audio = converter_disable_audio; sink->converter_disable_audio = converter_disable_audio;
link->local_sink = sink; link->local_sink = sink;
}
edid_status = dm_helpers_read_local_edid( edid_status = dm_helpers_read_local_edid(
link->ctx, link->ctx,
link, link,
sink); sink);
}
switch (edid_status) { switch (edid_status) {
case EDID_BAD_CHECKSUM: case EDID_BAD_CHECKSUM:
...@@ -762,7 +769,7 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason) ...@@ -762,7 +769,7 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason)
link->ctx, link->ctx,
link, link,
sink); sink);
if (edid_status != EDID_OK) { if (edid_status != EDID_OK && edid_status != EDID_THE_SAME) {
link_disconnect_sink(link); link_disconnect_sink(link);
link->type = dc_connection_none; link->type = dc_connection_none;
sink_caps.signal = SIGNAL_TYPE_NONE; sink_caps.signal = SIGNAL_TYPE_NONE;
......
...@@ -151,6 +151,7 @@ enum dc_edid_status { ...@@ -151,6 +151,7 @@ enum dc_edid_status {
EDID_BAD_INPUT, EDID_BAD_INPUT,
EDID_NO_RESPONSE, EDID_NO_RESPONSE,
EDID_BAD_CHECKSUM, EDID_BAD_CHECKSUM,
EDID_THE_SAME,
}; };
/* audio capability from EDID*/ /* audio capability from EDID*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册