Commit c7e65cab authored by Wayne Lin's avatar Wayne Lin Committed by Greg Kroah-Hartman
Browse files

drm/amd/display: Don't refer to dc_sink in is_dsc_need_re_compute



[ Upstream commit fcf6a49d ]

[Why]
When unplug one of monitors connected after mst hub, encounter null pointer dereference.

It's due to dc_sink get released immediately in early_unregister() or detect_ctx(). When
commit new state which directly referring to info stored in dc_sink will cause null pointer
dereference.

[how]
Remove redundant checking condition. Relevant condition should already be covered by checking
if dsc_aux is null or not. Also reset dsc_aux to NULL when the connector is disconnected.

Reviewed-by: default avatarJerry Zuo <jerry.zuo@amd.com>
Acked-by: default avatarZaeem Mohamed <zaeem.mohamed@amd.com>
Signed-off-by: default avatarWayne Lin <wayne.lin@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
[ Resolve minor conflicts ]
Signed-off-by: default avatarBin Lan <bin.lan.cn@windriver.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent c3a3b6d9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment