Skip to contentSkip to conversation

drm/i915/dp: Tweak auxch clock divider for PCH

PATCH In review Adam Jackson 3 participants 6 messages Jul 26, 2011 – Jan 17, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 drm/i915/dp: Tweak auxch clock divider for PCH

Matches the advice in the Sandybridge documentation.

---
 drivers/gpu/drm/i915/intel_dp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +1 -1
index dcc7ae6..3ad90f6 100644
@@ -305,7 +305,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
 		else
 			aux_clock_divider = 225; /* eDP input clock at 450Mhz */
 	} else if (HAS_PCH_SPLIT(dev))
-		aux_clock_divider = 62; /* IRL input clock fixed at 125Mhz */
+		aux_clock_divider = 63; /* IRL input clock fixed at 125Mhz */
 	else
 		aux_clock_divider = intel_hrawclk(dev) / 2;
 
Signature · 1 line
1.7.6
#1 lore raw

PATCH 2/3 drm/i915/dp: Use auxch precharge value of 5 everywhere

The default in the Sandybridge docs is 5, as on Ironlake, and I have no reason to believe 3 would work any better.

---
 drivers/gpu/drm/i915/intel_dp.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +1 -6
index 3ad90f6..875da4e 100644
@@ -290,7 +290,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
 	int recv_bytes;
 	uint32_t status;
 	uint32_t aux_clock_divider;
-	int try, precharge;
+	int try, precharge = 5;
 
 	/* The clock divider is based off the hrawclk,
 	 * and would like to run at 2MHz. So, take the
@@ -309,11 +309,6 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
 	else
 		aux_clock_divider = intel_hrawclk(dev) / 2;
 
-	if (IS_GEN6(dev))
-		precharge = 3;
-	else
-		precharge = 5;
-
 	if (I915_READ(ch_ctl) & DP_AUX_CH_CTL_SEND_BUSY) {
 		DRM_ERROR("dp_aux_ch not started status 0x%08x\n",
 			  I915_READ(ch_ctl));
Signature · 1 line
1.7.6
#2 lore raw

PATCH 3/3 drm/i915/dp: Check for AUXCH error before checking for success

In reply to Adam Jackson

This is paranoid, but I am entirely willing to believe the hardware could come up with a condition where I get a status with both the 'done' and 'receive error' bits set.

---
 drivers/gpu/drm/i915/intel_dp.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +4 -0
index 875da4e..f086e5e 100644
@@ -345,6 +345,10 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
 			   DP_AUX_CH_CTL_DONE |
 			   DP_AUX_CH_CTL_TIME_OUT_ERROR |
 			   DP_AUX_CH_CTL_RECEIVE_ERROR);
+
+		if (status & (DP_AUX_CH_CTL_TIME_OUT_ERROR |
+			      DP_AUX_CH_CTL_RECEIVE_ERROR))
+			continue;
 		if (status & DP_AUX_CH_CTL_DONE)
 			break;
 	}
Signature · 1 line
1.7.6
#3 lore raw
In reply to Adam Jackson
Quoted 12 lines · On Tue, 26 Jul 2011 15:39:44 -0400 Adam Jackson <[email protected]> wrote:

Matches the advice in the Sandybridge documentation.

---
 drivers/gpu/drm/i915/intel_dp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +0 -0
index dcc7ae6..3ad90f6 100644

drivers/gpu/drm/i915/intel_dp.c intel_dp_aux_ch(struct intel_dp *intel_dp, · line 310

Quoted 7 lines
drivers/gpu/drm/i915/intel_dp.c +1 -1
@@ -305,7 +305,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
 		else
 			aux_clock_divider = 225; /* eDP input clock at 450Mhz */
 	} else if (HAS_PCH_SPLIT(dev))
-		aux_clock_divider = 62; /* IRL input clock fixed at 125Mhz */
+		aux_clock_divider = 63; /* IRL input clock fixed at 125Mhz */
 	else
 		aux_clock_divider = intel_hrawclk(dev) / 2;

I have no problem with this set; matching the docs is nice. However we'll need to get some good test coverage before I feel comfortable.

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw
Quoted 10 lines · Jesse Barnes
Quoted 7 lines · On Tue, 26 Jul 2011 15:39:44 -0400 Adam Jackson <[email protected]> wrote:

Matches the advice in the Sandybridge documentation.

---
 drivers/gpu/drm/i915/intel_dp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Quoted 15 lines

drivers/gpu/drm/i915/intel_dp.c intel_dp_aux_ch(struct intel_dp *intel_dp, · line 310

Quoted 12 lines
drivers/gpu/drm/i915/intel_dp.c +1 -1
index dcc7ae6..3ad90f6 100644
@@ -305,7 +305,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
 		else
 			aux_clock_divider = 225; /* eDP input clock at 450Mhz */
 	} else if (HAS_PCH_SPLIT(dev))
-		aux_clock_divider = 62; /* IRL input clock fixed at 125Mhz */
+		aux_clock_divider = 63; /* IRL input clock fixed at 125Mhz */
 	else
 		aux_clock_divider = intel_hrawclk(dev) / 2;

I have no problem with this set; matching the docs is nice. However we'll need to get some good test coverage before I feel comfortable.

Ok, Jesse upped these noises of approval into acked-bys on irc. Queued all 3 patches for -next.

Thanks, Daniel

Signature · 3 lines
Daniel Vetter
Mail: [email protected]
Mobile: +41 (0)79 365 57 48
Acked-by on v1 1/3
#5 lore raw
In reply to Adam Jackson
Quoted 12 lines · On Tue, 26 Jul 2011 15:39:44 -0400 Adam Jackson <[email protected]> wrote:

Matches the advice in the Sandybridge documentation.

---
 drivers/gpu/drm/i915/intel_dp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +0 -0
index dcc7ae6..3ad90f6 100644

drivers/gpu/drm/i915/intel_dp.c intel_dp_aux_ch(struct intel_dp *intel_dp, · line 310

Quoted 7 lines
drivers/gpu/drm/i915/intel_dp.c +1 -1
@@ -305,7 +305,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
 		else
 			aux_clock_divider = 225; /* eDP input clock at 450Mhz */
 	} else if (HAS_PCH_SPLIT(dev))
-		aux_clock_divider = 62; /* IRL input clock fixed at 125Mhz */
+		aux_clock_divider = 63; /* IRL input clock fixed at 125Mhz */
 	else
 		aux_clock_divider = intel_hrawclk(dev) / 2;

Sorry I meant:

for the series.

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx