drm/amd/display: Add link enc null ptr check for cable ID (#2597)
authorShen, George <George.Shen@amd.com>
Fri, 28 Jan 2022 14:03:55 +0000 (22:03 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 2 Feb 2022 23:26:31 +0000 (18:26 -0500)
commit241a074fc1342b8f6a88af4b7bdc014692ebcde7
tree29a4cf8935b90f5855b126f23df184d920753342
parent274b924c3ed18f7d46d237810dd59d3bc89cb4b4
drm/amd/display: Add link enc null ptr check for cable ID (#2597)

[Why]
Certain configurations will result in link encoder
to not be assigned to the link at the time we apply
cable ID logic. We should skip it in those cases.

[How]
Check if link_enc is not null before applying
cable ID.

Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Reviewed-by: Wenjing Liu <Wenjing.Liu@amd.com>
Acked-by: Stylon Wang <stylon.wang@amd.com>
Signed-off-by: George Shen <george.shen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c