Commit 8b0878a0 authored by Pandiyan, Dhinakaran's avatar Pandiyan, Dhinakaran Committed by Rodrigo Vivi

drm/i915/dp: Add debug messages to print DP link training pattern

Currently we do not print the training pattern used in any of the DP link
training stages. Including this piece of information in debug messages will
help debugging.

Also, use the wrapper intel_dp_program_link_training_pattern() in
intel_dp_enable_port() instead of implementing it.

v2: Downgraded log level from error to debug (Chris)
Signed-off-by: default avatarDhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1470343716-5574-2-git-send-email-dhinakaran.pandiyan@intel.com
parent d1a3a036
...@@ -2551,6 +2551,10 @@ _intel_dp_set_link_train(struct intel_dp *intel_dp, ...@@ -2551,6 +2551,10 @@ _intel_dp_set_link_train(struct intel_dp *intel_dp,
struct drm_i915_private *dev_priv = to_i915(dev); struct drm_i915_private *dev_priv = to_i915(dev);
enum port port = intel_dig_port->port; enum port port = intel_dig_port->port;
if (dp_train_pat & DP_TRAINING_PATTERN_MASK)
DRM_DEBUG_KMS("Using DP training pattern TPS%d\n",
dp_train_pat & DP_TRAINING_PATTERN_MASK);
if (HAS_DDI(dev)) { if (HAS_DDI(dev)) {
uint32_t temp = I915_READ(DP_TP_CTL(port)); uint32_t temp = I915_READ(DP_TP_CTL(port));
...@@ -2592,7 +2596,7 @@ _intel_dp_set_link_train(struct intel_dp *intel_dp, ...@@ -2592,7 +2596,7 @@ _intel_dp_set_link_train(struct intel_dp *intel_dp,
*DP |= DP_LINK_TRAIN_PAT_2_CPT; *DP |= DP_LINK_TRAIN_PAT_2_CPT;
break; break;
case DP_TRAINING_PATTERN_3: case DP_TRAINING_PATTERN_3:
DRM_ERROR("DP training pattern 3 not supported\n"); DRM_DEBUG_KMS("TPS3 not supported, using TPS2 instead\n");
*DP |= DP_LINK_TRAIN_PAT_2_CPT; *DP |= DP_LINK_TRAIN_PAT_2_CPT;
break; break;
} }
...@@ -2617,7 +2621,7 @@ _intel_dp_set_link_train(struct intel_dp *intel_dp, ...@@ -2617,7 +2621,7 @@ _intel_dp_set_link_train(struct intel_dp *intel_dp,
if (IS_CHERRYVIEW(dev)) { if (IS_CHERRYVIEW(dev)) {
*DP |= DP_LINK_TRAIN_PAT_3_CHV; *DP |= DP_LINK_TRAIN_PAT_3_CHV;
} else { } else {
DRM_ERROR("DP training pattern 3 not supported\n"); DRM_DEBUG_KMS("TPS3 not supported, using TPS2 instead\n");
*DP |= DP_LINK_TRAIN_PAT_2; *DP |= DP_LINK_TRAIN_PAT_2;
} }
break; break;
...@@ -2632,11 +2636,8 @@ static void intel_dp_enable_port(struct intel_dp *intel_dp, ...@@ -2632,11 +2636,8 @@ static void intel_dp_enable_port(struct intel_dp *intel_dp,
struct drm_i915_private *dev_priv = to_i915(dev); struct drm_i915_private *dev_priv = to_i915(dev);
/* enable with pattern 1 (as per spec) */ /* enable with pattern 1 (as per spec) */
_intel_dp_set_link_train(intel_dp, &intel_dp->DP,
DP_TRAINING_PATTERN_1);
I915_WRITE(intel_dp->output_reg, intel_dp->DP); intel_dp_program_link_training_pattern(intel_dp, DP_TRAINING_PATTERN_1);
POSTING_READ(intel_dp->output_reg);
/* /*
* Magic for VLV/CHV. We _must_ first set up the register * Magic for VLV/CHV. We _must_ first set up the register
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment