Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Mario Limonciello <mario.limonciello@amd.com>
To: <stable@vger.kernel.org>
Cc: <tsung-hua.lin@amd.com>, <richard.gong@amd.com>,
	Jerry Zuo <Jerry.Zuo@amd.com>,
	Qingqing Zhuo <qingqing.zhuo@amd.com>,
	Daniel Wheeler <daniel.wheeler@amd.com>,
	Alex Deucher <alexander.deucher@amd.com>,
	"Mario Limonciello" <mario.limonciello@amd.com>
Subject: [PATCH 6.1.y / PATCH 6.2.y 1/1] drm/amd/display: Ext displays with dock can't recognized after resume
Date: Tue, 9 May 2023 11:01:20 -0500	[thread overview]
Message-ID: <20230509160120.1033-2-mario.limonciello@amd.com> (raw)
In-Reply-To: <20230509160120.1033-1-mario.limonciello@amd.com>

From: Ryan Lin <tsung-hua.lin@amd.com>

[Why]
Needs to set the default value of the LTTPR timeout after resume.

[How]
Set the default (3.2ms) timeout at resuming if the sink supports
LTTPR

Reviewed-by: Jerry Zuo <Jerry.Zuo@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Ryan Lin <tsung-hua.lin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 01a18aa309aec12461fb5e6aecb76f8b33810658)
Hand modified for missing changes in older kernels including rename
of dc_link_aux_try_to_configure_timeout()
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
(cherry picked from commit 5895ee73fc6b3d507b8ce42763df086acf43d26b)
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 6c5ea99223ba..c5ee63862b01 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -39,6 +39,7 @@
 #include "dc/dc_edid_parser.h"
 #include "dc/dc_stat.h"
 #include "amdgpu_dm_trace.h"
+#include "dc/inc/dc_link_ddc.h"
 
 #include "vid.h"
 #include "amdgpu.h"
@@ -2253,6 +2254,14 @@ static void s3_handle_mst(struct drm_device *dev, bool suspend)
 		if (suspend) {
 			drm_dp_mst_topology_mgr_suspend(mgr);
 		} else {
+			/* if extended timeout is supported in hardware,
+			 * default to LTTPR timeout (3.2ms) first as a W/A for DP link layer
+			 * CTS 4.2.1.1 regression introduced by CTS specs requirement update.
+			 */
+			dc_link_aux_try_to_configure_timeout(aconnector->dc_link->ddc, LINK_AUX_DEFAULT_LTTPR_TIMEOUT_PERIOD);
+			if (!dp_is_lttpr_present(aconnector->dc_link))
+				dc_link_aux_try_to_configure_timeout(aconnector->dc_link->ddc, LINK_AUX_DEFAULT_TIMEOUT_PERIOD);
+
 			ret = drm_dp_mst_topology_mgr_resume(mgr, true);
 			if (ret < 0) {
 				dm_helpers_dp_mst_stop_top_mgr(aconnector->dc_link->ctx,
-- 
2.34.1


  reply	other threads:[~2023-05-09 16:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-09 16:01 [PATCH 6.1.y / PATCH 6.2.y 0/1] Fix a resume timing issue with MST hubs Mario Limonciello
2023-05-09 16:01 ` Mario Limonciello [this message]
2023-05-12  0:15   ` [PATCH 6.1.y / PATCH 6.2.y 1/1] drm/amd/display: Ext displays with dock can't recognized after resume Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230509160120.1033-2-mario.limonciello@amd.com \
    --to=mario.limonciello@amd.com \
    --cc=Jerry.Zuo@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=daniel.wheeler@amd.com \
    --cc=qingqing.zhuo@amd.com \
    --cc=richard.gong@amd.com \
    --cc=stable@vger.kernel.org \
    --cc=tsung-hua.lin@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox