]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Add aconnector condition check for dpcd read
authorZhan Liu <zhan.liu@amd.com>
Fri, 21 Feb 2020 22:25:47 +0000 (17:25 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 25 Feb 2020 16:02:14 +0000 (11:02 -0500)
commit8fe5c36d47ad6bf30c83b6c184afbbe28ae057fa
treec3d943b4dd20ea3ff26b108e90d8055b7ce74bf7
parent8531303cc5f966ad27e79bd2c061cf7d4ae379ad
drm/amd/display: Add aconnector condition check for dpcd read

[Why]
core_link_read_dpcd() will invoke dm_helpers_dp_read_dpcd(),
which needs to read dpcd info with the help of aconnector.
If aconnector (dc->links[i]->prev) is NULL, then dpcd status
 cannot be read.

As a result, dpcd read fails and a line of error will be
printed out in dmesg.log as:
"*ERROR* Failed to found connector for link!"

[How]
Make sure that aconnector (dc->links[i]->prev) is not NULL,
then read dpcd status.

Signed-off-by: Zhan Liu <zhan.liu@amd.com>
Reviewed-by: Joseph Gravenor <Joseph.Gravenor@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c