drm/amd/display: support proper mst payload removal when link is not in mst mode...
authorWenjing Liu <wenjing.liu@amd.com>
Wed, 31 Aug 2022 19:22:56 +0000 (15:22 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 19 Sep 2022 19:12:16 +0000 (15:12 -0400)
commitcc67aae1e3a330e18ead512b525b8721a3b05a6c
treeecd9bd211f60e0e38e7672d9361295796abc08a9
parent9c75891feef0f9f67cf1c8f8038371006e25d23f
drm/amd/display: support proper mst payload removal when link is not in mst mode in dc

[why]
When user unplugs mst hubs, the current code will forcefully zero
entire mst payload allocation table structure stored in link before we
deallocate actual payload when disabling stream.

During the first disable stream sequence, we will use current mst
payload allocation table to determine if link should be turned off.
Because we zero out it before we are disabling stream, the payload
allocation table stored in link doesn't represent the actual allocation status,
so we turn off link at the first disable stream without waiting until all
streams' payloads have been deallocated. This avoilates the designed
deallocation sequence and caused system hang in DP2 scenario.

[how]
Remove payload during deallocation and never zero payload allocation structure
without actually deallocating payload.

Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: Wenjing Liu <wenjing.liu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link.c