OSDN Git Service

drm/amd/display: do not set RX back to SST mode for non 0 mst stream count
authorWenjing Liu <wenjing.liu@amd.com>
Mon, 30 Jan 2023 23:21:29 +0000 (18:21 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 14 Feb 2023 21:01:16 +0000 (16:01 -0500)
commitfbc0c790b1e274d2e1697df98e469cb982ada84e
treeccfd5d5730ac97b1b5c185842c566ac255c2ce5b
parent3a61570415690e9d5e7f10a288d25d49163f819d
drm/amd/display: do not set RX back to SST mode for non 0 mst stream count

[why]
a recent regression has caused us to mistakenly switch RX back to SST mode
when there are remaining mst stream enabled to the link. We are missing
a condition check for stream count before setting RX back to SST mode.

[how]
Add stream count check condition back and do some further refactor so the
logic is easier to understand to prevent future coding error in this sequence.

Reviewed-by: Samson Tam <Samson.Tam@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@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/link/link_dpms.c
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_phy.c
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_phy.h