Commit dcf298c3 authored by Wenjing Liu's avatar Wenjing Liu Committed by Alex Deucher

drm/amd/display: disconnect on HPD low even if edid is the same

[Description]
There are many occasions we need to retrieve sink capability and
notify connectivity change to os even if edid is not changed
on a HPD toggle.
(HDMI2.0 display needs re-enable link on every hpd,
display changes other capability outside from edid
 need to be queried again and possibly reset the mode, etc.)

In these cases we cannot keep the same sink without letting DM know.
Signed-off-by: default avatarWenjing Liu <Wenjing.Liu@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 6512387a
...@@ -566,6 +566,8 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason) ...@@ -566,6 +566,8 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason)
link->local_sink) link->local_sink)
return true; return true;
link_disconnect_sink(link);
if (new_connection_type != dc_connection_none) { if (new_connection_type != dc_connection_none) {
link->type = new_connection_type; link->type = new_connection_type;
...@@ -656,28 +658,15 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason) ...@@ -656,28 +658,15 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason)
return false; return false;
} }
if (link->local_sink) {
edid_status = dm_helpers_read_local_edid(
link->ctx,
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:
...@@ -758,29 +747,16 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason) ...@@ -758,29 +747,16 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason)
if (link->type == dc_connection_mst_branch) { if (link->type == dc_connection_mst_branch) {
LINK_INFO("link=%d, mst branch is now Disconnected\n", LINK_INFO("link=%d, mst branch is now Disconnected\n",
link->link_index); link->link_index);
dm_helpers_dp_mst_stop_top_mgr(link->ctx, link); dm_helpers_dp_mst_stop_top_mgr(link->ctx, link);
link->mst_stream_alloc_table.stream_count = 0; link->mst_stream_alloc_table.stream_count = 0;
memset(link->mst_stream_alloc_table.stream_allocations, 0, sizeof(link->mst_stream_alloc_table.stream_allocations)); memset(link->mst_stream_alloc_table.stream_allocations, 0, sizeof(link->mst_stream_alloc_table.stream_allocations));
} }
if (link->local_sink) {
sink = link->local_sink;
edid_status = dm_helpers_read_local_edid(
link->ctx,
link,
sink);
if (edid_status != EDID_OK && edid_status != EDID_THE_SAME) {
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;
} }
} else {
link_disconnect_sink(link);
link->type = dc_connection_none;
sink_caps.signal = SIGNAL_TYPE_NONE;
}
}
LINK_INFO("link=%d, dc_sink_in=%p is now %s\n", LINK_INFO("link=%d, dc_sink_in=%p is now %s\n",
link->link_index, sink, link->link_index, sink,
......
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