drm/amd/display: Add affected crtcs to atomic state for dsc mst unplug
authorRoman Li <Roman.Li@amd.com>
Thu, 23 Dec 2021 22:39:57 +0000 (17:39 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 16 Feb 2022 22:05:55 +0000 (17:05 -0500)
commit128f8ed5902a287a6bb4afe0ffdae8a80b2a64ec
tree9d14a9e85434afadabedd4c4b29237d07001eeff
parentd9f2303004581f767f3f4acfa3faba205c9991d9
drm/amd/display: Add affected crtcs to atomic state for dsc mst unplug

[Why]
When display topology changed on DSC hub we add all crtcs with dsc support to
atomic state.
Refer to patch:"drm/amd/display: Trigger modesets on MST DSC connectors"
However the original implementation may skip crtc if the topology change
caused by unplug.
That potentially could lead to no-lightup or corruption on DSC hub after
unplug event on one of the connectors.

[How]
Update add_affected_mst_dsc_crtcs() to use old connector state
if new connector state has no crtc (undergoes modeset due to unplug)

Fixes: 44be939ff7ac58 ("drm/amd/display: Trigger modesets on MST DSC connectors")

Reviewed-by: Hersen Wu <hersenwu@amd.com>
Acked-by: Jasdeep Dhillon <jdhillon@amd.com>
Signed-off-by: Roman Li <Roman.Li@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c