public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 6.1.y] drm/amd/display: skip CLEAR_PAYLOAD_ID_TABLE if device mst_en is 0
@ 2023-08-07 15:16 Mario Limonciello
  2023-08-09  9:05 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Mario Limonciello @ 2023-08-07 15:16 UTC (permalink / raw)
  To: stable; +Cc: Peichen Huang, Mario Limonciello

From: Peichen Huang <PeiChen.Huang@amd.com>

[Why]
Some dock and mst monitor don't like to receive CLEAR_PAYLOAD_ID_TABLE
when mst_en is set to 0. It doesn't make sense to do so in source
side, either.

[How]
Don't send CLEAR_PAYLOAD_ID_TABLE if mst_en is 0

Reviewed-by: George Shen <George.Shen@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Peichen Huang <PeiChen.Huang@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit a1c9a1e27022d13c70a14c4faeab6ce293ad043b)
6.1.y doesn't have the file rename from
54618888d1ea7 ("drm/amd/display: break down dc_link.c")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc_link.c | 5 ++++-
 1 file changed, 4 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 63daf6ecbda7..bbaeb6c567d0 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -2097,6 +2097,7 @@ static enum dc_status enable_link_dp_mst(
 		struct pipe_ctx *pipe_ctx)
 {
 	struct dc_link *link = pipe_ctx->stream->link;
+	unsigned char mstm_cntl;
 
 	/* sink signal type after MST branch is MST. Multiple MST sinks
 	 * share one link. Link DP PHY is enable or training only once.
@@ -2105,7 +2106,9 @@ static enum dc_status enable_link_dp_mst(
 		return DC_OK;
 
 	/* clear payload table */
-	dm_helpers_dp_mst_clear_payload_allocation_table(link->ctx, link);
+	core_link_read_dpcd(link, DP_MSTM_CTRL, &mstm_cntl, 1);
+	if (mstm_cntl & DP_MST_EN)
+		dm_helpers_dp_mst_clear_payload_allocation_table(link->ctx, link);
 
 	/* to make sure the pending down rep can be processed
 	 * before enabling the link
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 6.1.y] drm/amd/display: skip CLEAR_PAYLOAD_ID_TABLE if device mst_en is 0
  2023-08-07 15:16 [PATCH 6.1.y] drm/amd/display: skip CLEAR_PAYLOAD_ID_TABLE if device mst_en is 0 Mario Limonciello
@ 2023-08-09  9:05 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2023-08-09  9:05 UTC (permalink / raw)
  To: Mario Limonciello; +Cc: stable, Peichen Huang

On Mon, Aug 07, 2023 at 10:16:56AM -0500, Mario Limonciello wrote:
> From: Peichen Huang <PeiChen.Huang@amd.com>
> 
> [Why]
> Some dock and mst monitor don't like to receive CLEAR_PAYLOAD_ID_TABLE
> when mst_en is set to 0. It doesn't make sense to do so in source
> side, either.
> 
> [How]
> Don't send CLEAR_PAYLOAD_ID_TABLE if mst_en is 0
> 
> Reviewed-by: George Shen <George.Shen@amd.com>
> Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
> Signed-off-by: Peichen Huang <PeiChen.Huang@amd.com>
> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> (cherry picked from commit a1c9a1e27022d13c70a14c4faeab6ce293ad043b)
> 6.1.y doesn't have the file rename from
> 54618888d1ea7 ("drm/amd/display: break down dc_link.c")
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
>  drivers/gpu/drm/amd/display/dc/core/dc_link.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Now queued up, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-09  9:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-07 15:16 [PATCH 6.1.y] drm/amd/display: skip CLEAR_PAYLOAD_ID_TABLE if device mst_en is 0 Mario Limonciello
2023-08-09  9:05 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox