summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2023-02-02 04:16:37 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2023-02-02 04:16:37 +0000
commit00854cf2e91cda1466248ff46d2f6568a2ed7c1f (patch)
treec7b64fc3bcd2b441b0272f15ff5b5fb4c5049ebb /sys/dev/pci/drm
parent04c50ec0f43b33ba858ce885c8f67a029766533d (diff)
drm/amdgpu/display/mst: update mst_mgr relevant variable when long HPD
From Wayne Lin af8e87f72f9ea4c6915506098e506c4e08d3d49c in linux-6.1.y/6.1.9 f85c5e25fd28fe0bf6d6d0563cf83758a4e05c8f in mainline linux
Diffstat (limited to 'sys/dev/pci/drm')
-rw-r--r--sys/dev/pci/drm/amd/display/dc/core/dc_link.c14
1 files changed, 12 insertions, 2 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 407297c5f0b..ffe04adb3ff 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
@@ -3995,10 +3995,13 @@ static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx)
struct fixed31_32 avg_time_slots_per_mtp = dc_fixpt_from_int(0);
int i;
bool mst_mode = (link->type == dc_connection_mst_branch);
+ /* adjust for drm changes*/
+ bool update_drm_mst_state = true;
const struct link_hwss *link_hwss = get_link_hwss(link, &pipe_ctx->link_res);
const struct dc_link_settings empty_link_settings = {0};
DC_LOGGER_INIT(link->ctx->logger);
+
/* deallocate_mst_payload is called before disable link. When mode or
* disable/enable monitor, new stream is created which is not in link
* stream[] yet. For this, payload is not allocated yet, so de-alloc
@@ -4014,7 +4017,7 @@ static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx)
&empty_link_settings,
avg_time_slots_per_mtp);
- if (mst_mode) {
+ if (mst_mode || update_drm_mst_state) {
/* when link is in mst mode, reply on mst manager to remove
* payload
*/
@@ -4077,11 +4080,18 @@ static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx)
stream->ctx,
stream);
+ if (!update_drm_mst_state)
+ dm_helpers_dp_mst_send_payload_allocation(
+ stream->ctx,
+ stream,
+ false);
+ }
+
+ if (update_drm_mst_state)
dm_helpers_dp_mst_send_payload_allocation(
stream->ctx,
stream,
false);
- }
return DC_OK;
}