summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2023-08-13 10:27:33 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2023-08-13 10:27:33 +0000
commit262543e5dfc1effb50d4e0846eac4d5f53a3fca1 (patch)
tree817ba339cc67510db75d5046c78e3f0dab6578d4
parentcee7ed64fe06b88c604ba9de295064cfba2db741 (diff)
drm/amd/display: skip CLEAR_PAYLOAD_ID_TABLE if device mst_en is 0
From Peichen Huang 56562676102e135e7aebada26c2aea146a5b5ad0 in linux-6.1.y/6.1.45 a1c9a1e27022d13c70a14c4faeab6ce293ad043b in mainline linux
-rw-r--r--sys/dev/pci/drm/amd/display/dc/core/dc_link.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/amd/display/dc/core/dc_link.c b/sys/dev/pci/drm/amd/display/dc/core/dc_link.c
index 13598a2afb6..bba7e063530 100644
--- a/sys/dev/pci/drm/amd/display/dc/core/dc_link.c
+++ b/sys/dev/pci/drm/amd/display/dc/core/dc_link.c
@@ -2092,6 +2092,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.
@@ -2100,7 +2101,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