[PATCH 05/11] drm/amd/display: Check link_active instead of lane_settings != unknown
Aurabindo Pillai
aurabindo.pillai at amd.com
Fri Nov 27 14:11:01 UTC 2020
From: Joshua Aberback <joshua.aberback at amd.com>
[Why]
enable_link_dp_mst checks that cur_link_settings != unknown to determine
that the link is already enabled, to skip redundant enablement calls for
multiple streams on the same link. During dc_reinitialize_hardware,
cur_link_settings on previously-active links is not cleared, which blocks
MST links from being re-enabled after a reinitialization.
[How]
- check for link_status->link_active instead, as it's the real intent
- clear cur_link_settings when we clear link_active
Signed-off-by: Joshua Aberback <joshua.aberback at amd.com>
Reviewed-by: Wenjing Liu <Wenjing.Liu at amd.com>
Acked-by: Aurabindo Pillai <aurabindo.pillai at amd.com>
---
drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +-
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
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 4a897c326aab..a9c52657eb4b 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -1738,7 +1738,7 @@ static enum dc_status enable_link_dp_mst(
/* sink signal type after MST branch is MST. Multiple MST sinks
* share one link. Link DP PHY is enable or training only once.
*/
- if (link->cur_link_settings.lane_count != LANE_COUNT_UNKNOWN)
+ if (link->link_status.link_active)
return DC_OK;
/* clear payload table */
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
index 90c85b3e859b..4c230f1de9a3 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
@@ -1530,6 +1530,8 @@ static void power_down_encoders(struct dc *dc)
dc->links[i]->link_enc, signal);
dc->links[i]->link_status.link_active = false;
+ memset(&dc->links[i]->cur_link_settings, 0,
+ sizeof(dc->links[i]->cur_link_settings));
}
}
--
2.25.1
More information about the amd-gfx
mailing list