OSDN Git Service

drm/i915: Fix DP clock recovery "voltage_tries" handling
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 1 Oct 2021 16:08:26 +0000 (19:08 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 4 Oct 2021 09:41:48 +0000 (12:41 +0300)
commitf6e3be98654ed1895b105ed0ddf67665ed83dda4
tree05e4a95d43ba70b182996f95e98b66ebc5a6ab90
parent7d4fed884484d6631fba759905f0dce308ddb8a4
drm/i915: Fix DP clock recovery "voltage_tries" handling

The DP spec says:
"If the receiver keeps the same value in the ADJUST_REQUEST_LANEx_y
 register(s) while the LANEx_CR_DONE bits remain unset, the transmitter
 must loop four times with the same voltage swing. On the fifth time,
 the transmitter must down-shift to the lower bit rate and must repeat
 the CR-lock training sequence as described below."

Lets fix the code to follow that instead of terminating after five
times of transmitting the same signal levels. The text in spec feels
a little bit ambiguous still, but this is my best guess at its meaning.

As a bonus this also gets rid of the train_set[0] stuff which
would not work for per-lane drive settings anyway.

Cc: Imre Deak <imre.deak@intel.com>
CC: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211001160826.17080-1-ville.syrjala@linux.intel.com
Reviewed-by: Imre Deak <imre.deak@intel.com>
drivers/gpu/drm/i915/display/intel_dp_link_training.c