drm/amd/display: Fix mst hub unplug warning
authorWayne Lin <Wayne.Lin@amd.com>
Thu, 5 Oct 2023 08:04:05 +0000 (16:04 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 5 Oct 2023 16:04:02 +0000 (12:04 -0400)
commit9031e0013f819ca697a65046e5b86cd1a21b86ea
treec1fb0d66fd1a5619d74854c66efb8f38736e49d0
parenteba90a7aa2258cae4caeaa8f748506c315c30bd1
drm/amd/display: Fix mst hub unplug warning

[Why]
Unplug mst hub will cause warning. That's because
dm_helpers_construct_old_payload() is changed to be called after
payload removement from dc link.

In dm_helpers_construct_old_payload(), We refer to the vcpi in
payload allocation table of dc link to construct the old payload
and payload is no longer in the table when we call the function
now.

[How]
Refer to the mst_state to construct the number of time slot for old
payload now. Note that dm_helpers_construct_old_payload() is just
a quick workaround before and we are going to abandon it soon.

Fixes: 5aa1dfcdf0a4 ("drm/mst: Refactor the flow for payload allocation/removement")
Reviewed-by: Jerry Zuo <jerry.zuo@amd.com>
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231005080405.169841-1-Wayne.Lin@amd.com
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c