* [PATCH 6.2.y/6.1.y 0/1] Fixed stable backport for USB4 CM issue
@ 2023-03-22 22:08 Mario Limonciello
2023-03-22 22:08 ` [PATCH 6.2.y/6.1.y 1/1] drm/amd/display: Fix DP MST sinks removal issue Mario Limonciello
0 siblings, 1 reply; 3+ messages in thread
From: Mario Limonciello @ 2023-03-22 22:08 UTC (permalink / raw)
To: stable; +Cc: Mario Limonciello
Hi,
This commit that landed in 6.3 was marked to got to stable, but it failed
to apply to both 6.2.y and 6.1.y.
cbd6c1b17d3b ("drm/amd/display: Fix DP MST sinks removal issue")
The code is needed for some timing issues with USB4 CM teardown.
It failed to apply because the code it fixed was moved to a new file in
6.3. The code is otherwise unchanged in the old file, so this has been
manually fixed up.
Please apply for both 6.2.y and 6.1.y.
Thanks!
Cruise Hung (1):
drm/amd/display: Fix DP MST sinks removal issue
drivers/gpu/drm/amd/display/dc/core/dc_link.c | 9 +++++++++
1 file changed, 9 insertions(+)
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 6.2.y/6.1.y 1/1] drm/amd/display: Fix DP MST sinks removal issue
2023-03-22 22:08 [PATCH 6.2.y/6.1.y 0/1] Fixed stable backport for USB4 CM issue Mario Limonciello
@ 2023-03-22 22:08 ` Mario Limonciello
2023-03-25 0:43 ` Sasha Levin
0 siblings, 1 reply; 3+ messages in thread
From: Mario Limonciello @ 2023-03-22 22:08 UTC (permalink / raw)
To: stable
Cc: Cruise Hung, Mario Limonciello, Wenjing Liu, Qingqing Zhuo,
Daniel Wheeler, Alex Deucher
From: Cruise Hung <Cruise.Hung@amd.com>
[Why]
In USB4 DP tunneling, it's possible to have this scenario that
the path becomes unavailable and CM tears down the path a little bit late.
So, in this case, the HPD is high but fails to read any DPCD register.
That causes the link connection type to be set to sst.
And not all sinks are removed behind the MST branch.
[How]
Restore the link connection type if it fails to read DPCD register.
Cc: stable@vger.kernel.org
Cc: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Wenjing Liu <Wenjing.Liu@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Cruise Hung <Cruise.Hung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit cbd6c1b17d3b42b7935526a86ad5f66838767d03)
Modified for stable backport as a lot of the code in this file was moved
in 6.3 to drivers/gpu/drm/amd/display/dc/link/link_detection.c.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
drivers/gpu/drm/amd/display/dc/core/dc_link.c | 9 +++++++++
1 file changed, 9 insertions(+)
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 754fc8634149..54656fcaa646 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -1016,6 +1016,7 @@ static bool detect_link_and_local_sink(struct dc_link *link,
struct dc_sink *prev_sink = NULL;
struct dpcd_caps prev_dpcd_caps;
enum dc_connection_type new_connection_type = dc_connection_none;
+ enum dc_connection_type pre_connection_type = link->type;
const uint32_t post_oui_delay = 30; // 30ms
DC_LOGGER_INIT(link->ctx->logger);
@@ -1118,6 +1119,8 @@ static bool detect_link_and_local_sink(struct dc_link *link,
}
if (!detect_dp(link, &sink_caps, reason)) {
+ link->type = pre_connection_type;
+
if (prev_sink)
dc_sink_release(prev_sink);
return false;
@@ -1349,6 +1352,8 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason)
bool is_delegated_to_mst_top_mgr = false;
enum dc_connection_type pre_link_type = link->type;
+ DC_LOGGER_INIT(link->ctx->logger);
+
is_local_sink_detect_success = detect_link_and_local_sink(link, reason);
if (is_local_sink_detect_success && link->local_sink)
@@ -1359,6 +1364,10 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason)
link->dpcd_caps.is_mst_capable)
is_delegated_to_mst_top_mgr = discover_dp_mst_topology(link, reason);
+ DC_LOG_DC("%s: link_index=%d is_local_sink_detect_success=%d pre_link_type=%d link_type=%d\n", __func__,
+ link->link_index, is_local_sink_detect_success, pre_link_type, link->type);
+
+
if (is_local_sink_detect_success &&
pre_link_type == dc_connection_mst_branch &&
link->type != dc_connection_mst_branch)
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 6.2.y/6.1.y 1/1] drm/amd/display: Fix DP MST sinks removal issue
2023-03-22 22:08 ` [PATCH 6.2.y/6.1.y 1/1] drm/amd/display: Fix DP MST sinks removal issue Mario Limonciello
@ 2023-03-25 0:43 ` Sasha Levin
0 siblings, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2023-03-25 0:43 UTC (permalink / raw)
To: Mario Limonciello
Cc: stable, Cruise Hung, Wenjing Liu, Qingqing Zhuo, Daniel Wheeler,
Alex Deucher
On Wed, Mar 22, 2023 at 05:08:41PM -0500, Mario Limonciello wrote:
>From: Cruise Hung <Cruise.Hung@amd.com>
>
>[Why]
>In USB4 DP tunneling, it's possible to have this scenario that
>the path becomes unavailable and CM tears down the path a little bit late.
>So, in this case, the HPD is high but fails to read any DPCD register.
>That causes the link connection type to be set to sst.
>And not all sinks are removed behind the MST branch.
>
>[How]
>Restore the link connection type if it fails to read DPCD register.
>
>Cc: stable@vger.kernel.org
>Cc: Mario Limonciello <mario.limonciello@amd.com>
>Reviewed-by: Wenjing Liu <Wenjing.Liu@amd.com>
>Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
>Signed-off-by: Cruise Hung <Cruise.Hung@amd.com>
>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>(cherry picked from commit cbd6c1b17d3b42b7935526a86ad5f66838767d03)
>Modified for stable backport as a lot of the code in this file was moved
>in 6.3 to drivers/gpu/drm/amd/display/dc/link/link_detection.c.
>Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Queued up, thanks!
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-25 0:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-22 22:08 [PATCH 6.2.y/6.1.y 0/1] Fixed stable backport for USB4 CM issue Mario Limonciello
2023-03-22 22:08 ` [PATCH 6.2.y/6.1.y 1/1] drm/amd/display: Fix DP MST sinks removal issue Mario Limonciello
2023-03-25 0:43 ` Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox