[Intel-gfx] [PATCH 16/36] drm/i915: try each voltage twice at hsw_fdi_link_train

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


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

>From the mode set sequence document: "Each setting should be tried at
least twice before failing mode set".

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

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index f8ca3c4..94c6b76 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -179,7 +179,7 @@ void hsw_fdi_link_train(struct drm_crtc *crtc)
 	I915_WRITE(PORT_CLK_SEL(PORT_E), intel_crtc->ddi_pll_sel);
 
 	/* Start the training iterating through available voltages and emphasis */
-	for (i=0; i < ARRAY_SIZE(hsw_ddi_buf_ctl_values); i++) {
+	for (i = 0; i < ARRAY_SIZE(hsw_ddi_buf_ctl_values) * 2; i++) {
 		/* Configure DP_TP_CTL with auto-training */
 		I915_WRITE(DP_TP_CTL(PORT_E),
 					DP_TP_CTL_FDI_AUTOTRAIN |
@@ -191,7 +191,7 @@ void hsw_fdi_link_train(struct drm_crtc *crtc)
 		I915_WRITE(DDI_BUF_CTL(PORT_E),
 			   DDI_BUF_CTL_ENABLE |
 			   ((intel_crtc->fdi_lanes - 1) << 1) |
-			   hsw_ddi_buf_ctl_values[i]);
+			   hsw_ddi_buf_ctl_values[i >> 1]);
 		POSTING_READ(DDI_BUF_CTL(PORT_E));
 
 		udelay(600);
-- 
1.7.11.4




More information about the Intel-gfx mailing list