drm/amd/display: Screen corruption on dual displays (DP+USB-C)
authorQingqing Zhuo <qingqing.zhuo@amd.com>
Thu, 30 Jul 2020 19:35:41 +0000 (15:35 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:08:29 +0000 (10:08 +0100)
commitb6dead6f20e9f66dd7e5e0a4c9f4b7322698fde8
tree14a3b7f46598753175aa1dc3d4598fdd0f139515
parent0666c173a061cd9a34596112b2ff8c865bc2dbe8
drm/amd/display: Screen corruption on dual displays (DP+USB-C)

[ Upstream commit ce271b40a91f781af3dee985c39e841ac5148766 ]

[why]
Current pipe merge and split logic only supports cases where new
dc_state is allocated and relies on dc->current_state to gather
information from previous dc_state.

Calls to validate_bandwidth on UPDATE_TYPE_MED would cause an issue
because there is no new dc_state allocated, and data in
dc->current_state would be overwritten during pipe merge.

[how]
Only allow validate_bandwidth when new dc_state space is created.

Signed-off-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/dc/core/dc.c
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c