drm/amd/display: handle null link encoder
authorMartin Tsai <martin.tsai@amd.com>
Thu, 27 Jan 2022 04:48:39 +0000 (12:48 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 7 Feb 2022 23:03:50 +0000 (18:03 -0500)
commit66d58bf73ba17ac45fca79f2e5e26870cc224ee3
treedc2b2bdf6ed257cbbe33f0c0a689f2f5ed34d00c
parented3a56f9c638a4ee42031eac748664c834fe245d
drm/amd/display: handle null link encoder

[Why]
The link encoder mapping could return a null one and causes system crash.

[How]
Let the mapping can get an available link encoder without endpoint
identification check.

Reviewed-by: Wenjing Liu <Wenjing.Liu@amd.com>
Acked-by: Jasdeep Dhillon <jdhillon@amd.com>
Signed-off-by: Martin Tsai <martin.tsai@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/core/dc_link.c
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c