drm/amd/display: retry 3 times before successfully reading
authorXiaodong Yan <Xiaodong.Yan@amd.com>
Tue, 23 Oct 2018 18:08:53 +0000 (02:08 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 19 Nov 2018 20:27:40 +0000 (15:27 -0500)
commit818832bf2bc0d86d2a114d3baadfae12a40f7f36
treec6b2da3e4e15ee2f589ec1874e363e51b217525c
parenta7513419610b118eeabda6e85de187030fea57ae
drm/amd/display: retry 3 times before successfully reading

DPCD Extended Receiver Capability Field

[Why]
1.dpcd extended receiver capability sometimes read fail,
  and corrupted data leads to sink caps is not correct.
2.sometimes sink reply ack with fewer data

[How]
  check the return value of core_link_read_dpcd,
  try to read again when failure happens

Signed-off-by: Xiaodong Yan <Xiaodong.Yan@amd.com>
Reviewed-by: Wenjing Liu <Wenjing.Liu@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Acked-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c