]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd/display: Don't refer to dc_sink in is_dsc_need_re_compute
authorWayne Lin <wayne.lin@amd.com>
Tue, 21 May 2024 03:54:26 +0000 (11:54 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Aug 2024 13:34:15 +0000 (15:34 +0200)
commit39b217193729aa45eded8de24d9245468a0c0263
tree09e76fcafbce6fd37fbf3c1af54abbd452b90a83
parent150f56fffe2cc54eee671e1982f425130f88bb31
drm/amd/display: Don't refer to dc_sink in is_dsc_need_re_compute

[ Upstream commit fcf6a49d79923a234844b8efe830a61f3f0584e4 ]

[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: Jerry Zuo <jerry.zuo@amd.com>
Acked-by: Zaeem Mohamed <zaeem.mohamed@amd.com>
Signed-off-by: Wayne Lin <wayne.lin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c