drm/amd/display: Reduce delay when sink device not able to ACK 00340h write
authorZhan Liu <zhan.liu@amd.com>
Tue, 29 Jun 2021 01:20:18 +0000 (21:20 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 23 Jul 2021 14:07:57 +0000 (10:07 -0400)
commit5948190a0ec836e03c0ca71dffaf907b7ec87194
treec38b33fa98ca3fa45ece9bdd831fa4dbce5a2c6e
parent2be7f77f6c36128b216bee381d3f5359e8eb3352
drm/amd/display: Reduce delay when sink device not able to ACK 00340h write

[Why]
Theoretically, per DP 1.4a spec, sink device needs to AUX_ACK 00340h
write. However, due to hardware limitation, some sink devices have no
00340h dpcd address at all. This results in sink side fails to reply
ACK, and consequently cause source side keep retrying DPCD write on DPCD
00340h. This results in significant delay when DPCD 00340h write is
triggered (e.g. at S3 resume).

[How]
Check whether sink device could ACK on DPCD 00340h write on boot. If
sink device fails to ACK, then remember that, so we won't write to DPCD
00340h later on.

There will be a drm.debug KMS level message to inform user once a 00340h
DPCD write is skipped on purpose.

Reviewed-by: Nikola Cornij <Nikola.Cornij@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Zhan Liu <zhan.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link.c
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
drivers/gpu/drm/amd/display/dc/dc_dp_types.h