@@ -3852,7 +3852,7 @@ intel_dp_link_down(struct intel_dp *intel_dp)
intel_dp->DP = DP;
}
-static bool
+bool
intel_dp_get_dpcd(struct intel_dp *intel_dp)
{
struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
@@ -85,6 +85,25 @@ static bool
intel_dp_reset_link_train(struct intel_dp *intel_dp,
uint8_t dp_train_pat)
{
+ bool has_dpcd;
+ bool no_aux_handshake = false;
+
+ has_dpcd = intel_dp_get_dpcd(intel_dp);
+
+ /*
+ * Source device can try to use drive current and pre-emphasis
+ * parameters computed by the last "full" link training if the
+ * DP_NO_AUX_HANDSHAKE_LINK_TRAINING bit is set to 1.
+ */
+ if (has_dpcd) {
+ if (intel_dp->dpcd[DP_DPCD_REV] >= 0x11) {
+ no_aux_handshake = (intel_dp->dpcd[DP_MAX_DOWNSPREAD] &
+ DP_NO_AUX_HANDSHAKE_LINK_TRAINING);
+ }
+ }
+
+ intel_dp->train_set_valid &= no_aux_handshake;
+
DRM_DEBUG_KMS("link training optimization: %s\n",
intel_dp->train_set_valid ? "true" : "false");
@@ -1250,6 +1250,7 @@ int intel_dp_sink_crc(struct intel_dp *intel_dp, u8 *crc);
bool intel_dp_compute_config(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config);
bool intel_dp_is_edp(struct drm_device *dev, enum port port);
+bool intel_dp_get_dpcd(struct intel_dp *intel_dp);
enum irqreturn intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port,
bool long_hpd);
void intel_edp_backlight_on(struct intel_dp *intel_dp);
Check if no AUX transactions are required on DP link training. If this bit is set, we can reuse the known good drive current and pre-emphasis level from the last "full" link training. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91393 Signed-off-by: Mika Kahola <mika.kahola@intel.com> --- drivers/gpu/drm/i915/intel_dp.c | 2 +- drivers/gpu/drm/i915/intel_dp_link_training.c | 19 +++++++++++++++++++ drivers/gpu/drm/i915/intel_drv.h | 1 + 3 files changed, 21 insertions(+), 1 deletion(-)