From: jsg Date: Sun, 13 Aug 2023 10:27:32 +0000 (+0000) Subject: drm/amd/display: skip CLEAR_PAYLOAD_ID_TABLE if device mst_en is 0 X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=25f0e36e50202526c7a4811ea67d4082f0115dd1;p=openbsd 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 --- 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