OSDN Git Service

drm/amd/display: Retry when fail reading lane status during LT
authorWayne Lin <Wayne.Lin@amd.com>
Thu, 10 Mar 2022 22:20:40 +0000 (17:20 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Mar 2022 18:41:42 +0000 (14:41 -0400)
commit3a0625813bacf12bf188f8242b42b508af28baa0
treef69a444fcde9e1b95244f41a263b7154ba775d2d
parent906fbba2c9d48678fd182d0de4dd193d9dd0cc9c
drm/amd/display: Retry when fail reading lane status during LT

[Why]
In dp_get_lane_status_and_lane_adjust(), we call core_link_read_dpcd()
to get lane status but we ignore the return value of the function. If
there is problem with AUX and we eventually can only get partial data
from monitor, we might misuse the data to jude the link training result.
Which could have us trapped in the dc_link_dp_perform_link_training()
since we thought that we can still give a try on another link setting.

[How]
In dp_get_lane_status_and_lane_adjust(), take return value of
core_link_read_dpcd() into account. If we fail to read all requested
data, we treat lanes status as previous one and repeat LT steps again.

Reviewed-by: Wenjing Liu <Wenjing.Liu@amd.com>
Acked-by: Agustin Gutierrez <agustin.gutierrez@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>
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c