]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitadedbe02557593e637b3e18e26d4a5569e98d07c
treef69a444fcde9e1b95244f41a263b7154ba775d2d
parentd3c5b7e0beacdfbee05361e61900b7e1588dadeb
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