[Intel-gfx] [PATCH 15/36] drm/i915: change Haswell FDI link training error messages

Paulo Zanoni przanoni at gmail.com
Wed Oct 31 21:12:34 CET 2012


From: Paulo Zanoni <paulo.r.zanoni at intel.com>

We shouldn't call DRM_ERROR when still looping through voltage levels
since this is expected and not really a failure. So in this commit we
adjust the error path to only DRM_ERROR when we really fail after
trying everything.

While at it, replace DRM_DEBUG_DRIVER with DRM_DEBUG_KMS since it's
what we use everywhere.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
---
 drivers/gpu/drm/i915/intel_ddi.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index c21e71c..f8ca3c4 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -218,7 +218,7 @@ void hsw_fdi_link_train(struct drm_crtc *crtc)
 
 		temp = I915_READ(DP_TP_STATUS(PORT_E));
 		if (temp & DP_TP_STATUS_AUTOTRAIN_DONE) {
-			DRM_DEBUG_DRIVER("BUF_CTL training done on %d step\n", i);
+			DRM_DEBUG_KMS("FDI link training done on step %d\n", i);
 
 			/* Enable normal pixel sending for FDI */
 			I915_WRITE(DP_TP_CTL(PORT_E),
@@ -227,11 +227,9 @@ void hsw_fdi_link_train(struct drm_crtc *crtc)
 						DP_TP_CTL_ENHANCED_FRAME_ENABLE |
 						DP_TP_CTL_ENABLE);
 
-			break;
+			return;
 		}
 
-		DRM_ERROR("Error training BUF_CTL %d\n", i);
-
 		/* Disable DP_TP_CTL and FDI_RX_CTL) and retry */
 		I915_WRITE(DP_TP_CTL(PORT_E),
 			   I915_READ(DP_TP_CTL(PORT_E)) & ~DP_TP_CTL_ENABLE);
@@ -245,7 +243,7 @@ void hsw_fdi_link_train(struct drm_crtc *crtc)
 		I915_WRITE(_FDI_RXA_MISC, temp);
 	}
 
-	DRM_DEBUG_KMS("FDI train done.\n");
+	DRM_ERROR("FDI link training failed!\n");
 }
 
 /* WRPLL clock dividers */
-- 
1.7.11.4




More information about the Intel-gfx mailing list