Skip to content

Commit f85c5e2

Browse files
Wayne Linalexdeucher
authored andcommitted
drm/amdgpu/display/mst: update mst_mgr relevant variable when long HPD
[Why & How] Now the vc_start_slot is controlled at drm side. When we service a long HPD, we still need to run dm_helpers_dp_mst_write_payload_allocation_table() to update drm mst_mgr's relevant variable. Otherwise, on the next plug-in, payload will get assigned with a wrong start slot. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2171 Signed-off-by: Wayne Lin <[email protected]> Signed-off-by: Harry Wentland <[email protected]> Fixes: 4d07b0b ("drm/display/dp_mst: Move all payload info into the atomic state") Cc: [email protected] # 6.1 Acked-by: Harry Wentland <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Tested-by: Didier Raboud <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent cb1e0b0 commit f85c5e2

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

drivers/gpu/drm/amd/display/dc/core/dc_link.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3995,10 +3995,13 @@ static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx)
39953995
struct fixed31_32 avg_time_slots_per_mtp = dc_fixpt_from_int(0);
39963996
int i;
39973997
bool mst_mode = (link->type == dc_connection_mst_branch);
3998+
/* adjust for drm changes*/
3999+
bool update_drm_mst_state = true;
39984000
const struct link_hwss *link_hwss = get_link_hwss(link, &pipe_ctx->link_res);
39994001
const struct dc_link_settings empty_link_settings = {0};
40004002
DC_LOGGER_INIT(link->ctx->logger);
40014003

4004+
40024005
/* deallocate_mst_payload is called before disable link. When mode or
40034006
* disable/enable monitor, new stream is created which is not in link
40044007
* 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)
40144017
&empty_link_settings,
40154018
avg_time_slots_per_mtp);
40164019

4017-
if (mst_mode) {
4020+
if (mst_mode || update_drm_mst_state) {
40184021
/* when link is in mst mode, reply on mst manager to remove
40194022
* payload
40204023
*/
@@ -4077,11 +4080,18 @@ static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx)
40774080
stream->ctx,
40784081
stream);
40794082

4083+
if (!update_drm_mst_state)
4084+
dm_helpers_dp_mst_send_payload_allocation(
4085+
stream->ctx,
4086+
stream,
4087+
false);
4088+
}
4089+
4090+
if (update_drm_mst_state)
40804091
dm_helpers_dp_mst_send_payload_allocation(
40814092
stream->ctx,
40824093
stream,
40834094
false);
4084-
}
40854095

40864096
return DC_OK;
40874097
}

0 commit comments

Comments
 (0)