Skip to contentSkip to conversation

drm/i915: implement WADPOClockGatingDisable for LPT

PATCH In review Paulo Zanoni 3 participants 8 messages Apr 17, 2013 – May 10, 2013

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

PATCH 1/1 drm/i915: implement WADPOClockGatingDisable for LPT

From: Paulo Zanoni <[email protected]>

This should prevent mode set failures on LPT.

---
 drivers/gpu/drm/i915/intel_pm.c |    5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/i915/intel_pm.c +5 -0
index 413877d..15ff0ac 100644
@@ -3758,6 +3758,11 @@ static void lpt_init_clock_gating(struct drm_device *dev)
 		I915_WRITE(SOUTH_DSPCLK_GATE_D,
 			   I915_READ(SOUTH_DSPCLK_GATE_D) |
 			   PCH_LP_PARTITION_LEVEL_DISABLE);
+
+	/* WADPOClockGatingDisable */
+	I915_WRITE(_TRANSA_CHICKEN1,
+		   I915_READ(_TRANSA_CHICKEN1) |
+		   TRANS_CHICKEN1_DP0UNIT_GC_DISABLE);
 }
 
 static void haswell_init_clock_gating(struct drm_device *dev)
Signature · 1 line
1.7.10.4
#1 lore raw

2013/4/17 Paulo Zanoni <[email protected]>:

Quoted 4 lines

From: Paulo Zanoni <[email protected]>

This should prevent mode set failures on LPT.

Ping?

Quoted 24 lines
---
 drivers/gpu/drm/i915/intel_pm.c |    5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/i915/intel_pm.c +5 -1
index 413877d..15ff0ac 100644
@@ -3758,6 +3758,11 @@ static void lpt_init_clock_gating(struct drm_device *dev)
                I915_WRITE(SOUTH_DSPCLK_GATE_D,
                           I915_READ(SOUTH_DSPCLK_GATE_D) |
                           PCH_LP_PARTITION_LEVEL_DISABLE);
+
+       /* WADPOClockGatingDisable */
+       I915_WRITE(_TRANSA_CHICKEN1,
+                  I915_READ(_TRANSA_CHICKEN1) |
+                  TRANS_CHICKEN1_DP0UNIT_GC_DISABLE);
 }
 
 static void haswell_init_clock_gating(struct drm_device *dev)
--

1.7.10.4

Signature · 1 line
Paulo Zanoni
#2 lore raw
In reply to Paulo Zanoni
Quoted 14 lines · Paulo Zanoni

From: Paulo Zanoni <[email protected]>

This should prevent mode set failures on LPT.

---
 drivers/gpu/drm/i915/intel_pm.c |    5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/i915/intel_pm.c +0 -0
index 413877d..15ff0ac 100644

drivers/gpu/drm/i915/intel_pm.c static void lpt_init_clock_gating(struct drm_device *dev) · line 3765

Quoted 8 lines
drivers/gpu/drm/i915/intel_pm.c +5 -0
@@ -3758,6 +3758,11 @@ static void lpt_init_clock_gating(struct drm_device *dev)
 		I915_WRITE(SOUTH_DSPCLK_GATE_D,
 			   I915_READ(SOUTH_DSPCLK_GATE_D) |
 			   PCH_LP_PARTITION_LEVEL_DISABLE);
+
+	/* WADPOClockGatingDisable */
+	I915_WRITE(_TRANSA_CHICKEN1,
+		   I915_READ(_TRANSA_CHICKEN1) |
+		   TRANS_CHICKEN1_DP0UNIT_GC_DISABLE);

Don't you need to do that for each pipe? (like the cpt_ version does)?

Signature · 1 line
Damien
#3 lore raw
Quoted 10 lines · Damien Lespiau
Quoted 9 lines · Paulo Zanoni

From: Paulo Zanoni <[email protected]>

This should prevent mode set failures on LPT.

---
 drivers/gpu/drm/i915/intel_pm.c |    5 +++++
 1 file changed, 5 insertions(+)
Quoted 15 lines

drivers/gpu/drm/i915/intel_pm.c static void lpt_init_clock_gating(struct drm_device *dev) · line 3765

Quoted 13 lines
drivers/gpu/drm/i915/intel_pm.c +5 -0
index 413877d..15ff0ac 100644
@@ -3758,6 +3758,11 @@ static void lpt_init_clock_gating(struct drm_device *dev)
 		I915_WRITE(SOUTH_DSPCLK_GATE_D,
 			   I915_READ(SOUTH_DSPCLK_GATE_D) |
 			   PCH_LP_PARTITION_LEVEL_DISABLE);
+
+	/* WADPOClockGatingDisable */
+	I915_WRITE(_TRANSA_CHICKEN1,
+		   I915_READ(_TRANSA_CHICKEN1) |
+		   TRANS_CHICKEN1_DP0UNIT_GC_DISABLE);

Don't you need to do that for each pipe? (like the cpt_ version does)?

Also it's DP0 (zero), not DPO.

Signature · 1 line
Damien
#4 lore raw

2013/5/7 Damien Lespiau <[email protected]>:

Quoted 11 lines · Damien Lespiau
Quoted 10 lines · Paulo Zanoni
Quoted 9 lines

From: Paulo Zanoni <[email protected]>

This should prevent mode set failures on LPT.

---
 drivers/gpu/drm/i915/intel_pm.c |    5 +++++
 1 file changed, 5 insertions(+)
Quoted 15 lines
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/i915/intel_pm.c +0 -0
index 413877d..15ff0ac 100644
@@ -3758,6 +3758,11 @@ static void lpt_init_clock_gating(struct drm_device *dev)
            I915_WRITE(SOUTH_DSPCLK_GATE_D,
                       I915_READ(SOUTH_DSPCLK_GATE_D) |
Quoted 8 lines

drivers/gpu/drm/i915/intel_pm.c static void lpt_init_clock_gating(struct drm_device *dev) · line 3765

Quoted 6 lines
drivers/gpu/drm/i915/intel_pm.c +5 -0
                       PCH_LP_PARTITION_LEVEL_DISABLE);
+
+   /* WADPOClockGatingDisable */
+   I915_WRITE(_TRANSA_CHICKEN1,
+              I915_READ(_TRANSA_CHICKEN1) |
+              TRANS_CHICKEN1_DP0UNIT_GC_DISABLE);

Don't you need to do that for each pipe? (like the cpt_ version does)?

It's once per PCH transcoder, but there's just one PCH transcoder on LPT, so we do it once.

Quoted 2 lines

Also it's DP0 (zero), not DPO.

Our documentation is a little inconsistent regarding this, but I guess the correct name probably has the letter O instead of Zero. The description inside the LPT TRANS_CHICKEN1 register uses WADPOClockGatingDisable and the register bit is called "dpounit Gating Disable". The "BUN" email I got consistently says DPO instead of DP0. On the CPT/PPT documentation you'll see WADP0ClockGatingDisable but even the register bit is called "dpounit" and not "dp0unit". So the only place where I see Zero is on the WA name written inside the CPT documentation, all the other places use the letter O.

Quoted 3 lines

--
Damien

Signature · 1 line
Paulo Zanoni
Reviewed-by
#5 lore raw
Quoted 28 lines · Paulo Zanoni

2013/5/7 Damien Lespiau <[email protected]>:

Quoted 11 lines · Damien Lespiau
Quoted 10 lines · Paulo Zanoni
Quoted 9 lines

From: Paulo Zanoni <[email protected]>

This should prevent mode set failures on LPT.

---
 drivers/gpu/drm/i915/intel_pm.c |    5 +++++
 1 file changed, 5 insertions(+)
Quoted 15 lines
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/i915/intel_pm.c +0 -0
index 413877d..15ff0ac 100644
@@ -3758,6 +3758,11 @@ static void lpt_init_clock_gating(struct drm_device *dev)
            I915_WRITE(SOUTH_DSPCLK_GATE_D,
                       I915_READ(SOUTH_DSPCLK_GATE_D) |
Quoted 8 lines

drivers/gpu/drm/i915/intel_pm.c static void lpt_init_clock_gating(struct drm_device *dev) · line 3765

Quoted 6 lines
drivers/gpu/drm/i915/intel_pm.c +5 -0
                       PCH_LP_PARTITION_LEVEL_DISABLE);
+
+   /* WADPOClockGatingDisable */
+   I915_WRITE(_TRANSA_CHICKEN1,
+              I915_READ(_TRANSA_CHICKEN1) |
+              TRANS_CHICKEN1_DP0UNIT_GC_DISABLE);

Don't you need to do that for each pipe? (like the cpt_ version does)?

Quoted 2 lines

It's once per PCH transcoder, but there's just one PCH transcoder on LPT, so we do it once.

Of course, I was looking at the wrong doc.

Quoted 4 lines
Quoted 3 lines

Also it's DP0 (zero), not DPO.

Quoted 9 lines

Our documentation is a little inconsistent regarding this, but I guess the correct name probably has the letter O instead of Zero. The description inside the LPT TRANS_CHICKEN1 register uses WADPOClockGatingDisable and the register bit is called "dpounit Gating Disable". The "BUN" email I got consistently says DPO instead of DP0. On the CPT/PPT documentation you'll see WADP0ClockGatingDisable but even the register bit is called "dpounit" and not "dp0unit". So the only place where I see Zero is on the WA name written inside the CPT documentation, all the other places use the letter O.

Conviced (but then we should rename the cpt_ comment for consistency)

Signature · 1 line
Damien
#6 lore raw
Quoted 13 lines · Damien Lespiau
Quoted 12 lines · Paulo Zanoni

2013/5/7 Damien Lespiau <[email protected]>:

Quoted 11 lines · Damien Lespiau
Quoted 10 lines · Paulo Zanoni
Quoted 9 lines

From: Paulo Zanoni <[email protected]>

This should prevent mode set failures on LPT.

---
 drivers/gpu/drm/i915/intel_pm.c |    5 +++++
 1 file changed, 5 insertions(+)
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/i915/intel_pm.c +0 -0
index 413877d..15ff0ac 100644
@@ -3758,6 +3758,11 @@ static void lpt_init_clock_gating(struct drm_device *dev)
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/i915/intel_pm.c static void lpt_init_clock_gating(struct drm_device *dev) · line 3765

Quoted 8 lines
drivers/gpu/drm/i915/intel_pm.c +5 -0
            I915_WRITE(SOUTH_DSPCLK_GATE_D,
                       I915_READ(SOUTH_DSPCLK_GATE_D) |
                       PCH_LP_PARTITION_LEVEL_DISABLE);
+
+   /* WADPOClockGatingDisable */
+   I915_WRITE(_TRANSA_CHICKEN1,
+              I915_READ(_TRANSA_CHICKEN1) |
+              TRANS_CHICKEN1_DP0UNIT_GC_DISABLE);

Of course, It'd be good to add the :hsw at the end of WADPOClockGatingDisable (ammending the patch when applying?) now that the workaround documentation has been pushed.

(Still Reviewed-by: Damien Lespiau <[email protected]> of course)

Signature · 1 line
Damien
#7 lore raw
Quoted 24 lines · Damien Lespiau
Quoted 23 lines · Damien Lespiau
Quoted 22 lines · Paulo Zanoni

2013/5/7 Damien Lespiau <[email protected]>:

Quoted 21 lines · Damien Lespiau
Quoted 20 lines · Paulo Zanoni
Quoted 19 lines

From: Paulo Zanoni <[email protected]>

This should prevent mode set failures on LPT.

---
 drivers/gpu/drm/i915/intel_pm.c |    5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/i915/intel_pm.c +2 -0
index 413877d..15ff0ac 100644
@@ -3758,6 +3758,11 @@ static void lpt_init_clock_gating(struct drm_device *dev)
            I915_WRITE(SOUTH_DSPCLK_GATE_D,
                       I915_READ(SOUTH_DSPCLK_GATE_D) |
                       PCH_LP_PARTITION_LEVEL_DISABLE);
+
+   /* WADPOClockGatingDisable */
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/i915/intel_pm.c static void lpt_init_clock_gating(struct drm_device *dev) · line 3765

Quoted 3 lines
drivers/gpu/drm/i915/intel_pm.c +3 -0
+   I915_WRITE(_TRANSA_CHICKEN1,
+              I915_READ(_TRANSA_CHICKEN1) |
+              TRANS_CHICKEN1_DP0UNIT_GC_DISABLE);

Of course, It'd be good to add the :hsw at the end of WADPOClockGatingDisable (ammending the patch when applying?) now that the workaround documentation has been pushed.

Done and queued for -next, thanks for the patch.
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch