From d906352dfc34ffcd1459b21b6f1f2de61c5ac85d Mon Sep 17 00:00:00 2001 From: Mykola Lysenko Date: Wed, 9 Dec 2015 19:57:21 +0800 Subject: [PATCH 0595/1110] drm/amd/dal: do not remove MST sinks in DC They will be removed by appropriate code in DM, as they were created in DM Signed-off-by: Harry Wentland Acked-by: Harry Wentland --- drivers/gpu/drm/amd/dal/dc/core/dc_link.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/dal/dc/core/dc_link.c b/drivers/gpu/drm/amd/dal/dc/core/dc_link.c index fe36786..2f2800f 100644 --- a/drivers/gpu/drm/amd/dal/dc/core/dc_link.c +++ b/drivers/gpu/drm/amd/dal/dc/core/dc_link.c @@ -639,11 +639,27 @@ void dc_link_detect(const struct dc_link *dc_link) switch (link->public.connector_signal) { case SIGNAL_TYPE_DISPLAY_PORT: dc_helpers_dp_mst_stop_top_mgr(link->ctx, &link->public); + /* + * in this case sinks would be removed in outer level + */ + + /* + * TODO: this is the only way to understand that link + * was in mst mode. Proposal for future to add + * additional field to link that will show actual state. + * + * For the change: for mst we create sink outside, and + * should remove them in the same place + */ + if (link->public.sink_count == 1 && + link->public.sink[0]->sink_signal != + SIGNAL_TYPE_DISPLAY_PORT_MST) + link_disconnect_all_sinks(link); break; default: + link_disconnect_all_sinks(link); break; } - link_disconnect_all_sinks(link); } LINK_INFO("link=%d, dc_sink_in=%p is now %s\n", -- 2.7.4