drm/i915/tc: Abort DP AUX transfer on a disconnected TC port
authorImre Deak <imre.deak@intel.com>
Thu, 16 Mar 2023 13:17:11 +0000 (15:17 +0200)
committerImre Deak <imre.deak@intel.com>
Wed, 22 Mar 2023 18:26:03 +0000 (20:26 +0200)
commita972cd3f0eb50bde3823e8d1df8f6c1b0c673ecc
treee75912987b6e473632277552a2b891eb0e318601
parent41b4c7fe72b6105a4b49395eea9aa40cef94288d
drm/i915/tc: Abort DP AUX transfer on a disconnected TC port

On TC ports the 4ms AUX timeout combined with the 5 * 32 retry
attempts during DPCD accesses adds a 640ms delay to each access if the
sink is disconnected. This in turn slows down a modeset during which the
sink is disconnected (for instance a disabling modeset).

Prevent the above delay by aborting AUX transfers on a TC port with a
disconnected sink.

The DP 1.4a link CTS (4.2.1.5 Source Device Inactive HPD / Inactive AUX
Test") also requires not to initiate AUX transfers on disconnected DP
ports in general, however this patch doesn't change the behavior on
non-TC ports, leaving that for a follow-up.

Reported-and-tested-by: Chris Chiu <chris.chiu@canonical.com>
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8279
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230316131724.359612-2-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_dp_aux.c
drivers/gpu/drm/i915/display/intel_tc.c
drivers/gpu/drm/i915/display/intel_tc.h