Skip to contentSkip to conversation

drm/i915/chv: Use timeout mode for RC6 on chv

PATCH In review [email protected] 2 participants 4 messages Jul 16, 2014 – Jul 22, 2014

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

PATCH 1/1 drm/i915/chv: Use timeout mode for RC6 on chv

From: Deepak S <[email protected]>

Higher RC6 residency is observed using timeout mode instead of EI mode. It's Recommended to use TO Method for RC6.

---
 drivers/gpu/drm/i915/intel_pm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +2 -2
index 19c5c26..88bad36 100644
@@ -4037,7 +4037,7 @@ static void cherryview_enable_rps(struct drm_device *dev)
 		I915_WRITE(RING_MAX_IDLE(ring->mmio_base), 10);
 	I915_WRITE(GEN6_RC_SLEEP, 0);
 
-	I915_WRITE(GEN6_RC6_THRESHOLD, 50000); /* 50/125ms per EI */
+	I915_WRITE(GEN6_RC6_THRESHOLD, 0x557);
 
 	/* allows RC6 residency counter to work */
 	I915_WRITE(VLV_COUNTER_CONTROL,
@@ -4053,7 +4053,7 @@ static void cherryview_enable_rps(struct drm_device *dev)
 	/* 3: Enable RC6 */
 	if ((intel_enable_rc6(dev) & INTEL_RC6_ENABLE) &&
 						(pcbr >> VLV_PCBR_ADDR_SHIFT))
-		rc6_mode = GEN6_RC_CTL_EI_MODE(1);
+		rc6_mode = GEN7_RC_CTL_TO_MODE;
 
 	I915_WRITE(GEN6_RC_CONTROL, rc6_mode);
 
Signature · 1 line
1.9.1
author
#1 lore raw
Quoted 24 lines · On Thursday 17 July 2014 09:16 AM, [email protected] wrote:

From: Deepak S <[email protected]>

Higher RC6 residency is observed using timeout mode instead of EI mode. It's Recommended to use TO Method for RC6.

---
  drivers/gpu/drm/i915/intel_pm.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +1 -1
index 19c5c26..88bad36 100644
@@ -4037,7 +4037,7 @@ static void cherryview_enable_rps(struct drm_device *dev)
  		I915_WRITE(RING_MAX_IDLE(ring->mmio_base), 10);
  	I915_WRITE(GEN6_RC_SLEEP, 0);
 
-	I915_WRITE(GEN6_RC6_THRESHOLD, 50000); /* 50/125ms per EI */
+	I915_WRITE(GEN6_RC6_THRESHOLD, 0x557);
 
  	/* allows RC6 residency counter to work */
  	I915_WRITE(VLV_COUNTER_CONTROL,

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

Quoted 8 lines
drivers/gpu/drm/i915/intel_pm.c +1 -1
@@ -4053,7 +4053,7 @@ static void cherryview_enable_rps(struct drm_device *dev)
  	/* 3: Enable RC6 */
  	if ((intel_enable_rc6(dev) & INTEL_RC6_ENABLE) &&
  						(pcbr >> VLV_PCBR_ADDR_SHIFT))
-		rc6_mode = GEN6_RC_CTL_EI_MODE(1);
+		rc6_mode = GEN7_RC_CTL_TO_MODE;
 
  	I915_WRITE(GEN6_RC_CONTROL, rc6_mode);
 

Hi Ben,

Please review the patch

Thanks
Deepak

#2 lore raw
Quoted 33 lines · Deepak S
Quoted 22 lines · On Thursday 17 July 2014 09:16 AM, [email protected] wrote:

From: Deepak S <[email protected]>

Higher RC6 residency is observed using timeout mode instead of EI mode. It's Recommended to use TO Method for RC6.

---
 drivers/gpu/drm/i915/intel_pm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +1 -1
index 19c5c26..88bad36 100644
@@ -4037,7 +4037,7 @@ static void cherryview_enable_rps(struct drm_device *dev)
 		I915_WRITE(RING_MAX_IDLE(ring->mmio_base), 10);
 	I915_WRITE(GEN6_RC_SLEEP, 0);
-	I915_WRITE(GEN6_RC6_THRESHOLD, 50000); /* 50/125ms per EI */
+	I915_WRITE(GEN6_RC6_THRESHOLD, 0x557);
 	/* allows RC6 residency counter to work */
 	I915_WRITE(VLV_COUNTER_CONTROL,

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

Quoted 6 lines
drivers/gpu/drm/i915/intel_pm.c +1 -1
@@ -4053,7 +4053,7 @@ static void cherryview_enable_rps(struct drm_device *dev)
 	/* 3: Enable RC6 */
 	if ((intel_enable_rc6(dev) & INTEL_RC6_ENABLE) &&
 						(pcbr >> VLV_PCBR_ADDR_SHIFT))
-		rc6_mode = GEN6_RC_CTL_EI_MODE(1);
+		rc6_mode = GEN7_RC_CTL_TO_MODE;
 	I915_WRITE(GEN6_RC_CONTROL, rc6_mode);

Hi Ben,

Quoted 1 line

Please review the patch

Why me? I don't know anything about Cherryview. I only put the r-b on the BDW version because of the public QA data which showed it was a win for power without hurting performance.

I'd suggest you get Tom O'Rourke to review this.

Quoted 4 lines

Thanks
Deepak

Signature · 1 line
Ben Widawsky, Intel Open Source Technology Center
author
#3 lore raw
Quoted 32 lines · Ben Widawsky
Quoted 31 lines · Deepak S
Quoted 22 lines · On Thursday 17 July 2014 09:16 AM, [email protected] wrote:

From: Deepak S <[email protected]>

Higher RC6 residency is observed using timeout mode instead of EI mode. It's Recommended to use TO Method for RC6.

---
  drivers/gpu/drm/i915/intel_pm.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +1 -1
index 19c5c26..88bad36 100644
@@ -4037,7 +4037,7 @@ static void cherryview_enable_rps(struct drm_device *dev)
  		I915_WRITE(RING_MAX_IDLE(ring->mmio_base), 10);
  	I915_WRITE(GEN6_RC_SLEEP, 0);
-	I915_WRITE(GEN6_RC6_THRESHOLD, 50000); /* 50/125ms per EI */
+	I915_WRITE(GEN6_RC6_THRESHOLD, 0x557);
  	/* allows RC6 residency counter to work */
  	I915_WRITE(VLV_COUNTER_CONTROL,

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

Quoted 6 lines
drivers/gpu/drm/i915/intel_pm.c +1 -1
@@ -4053,7 +4053,7 @@ static void cherryview_enable_rps(struct drm_device *dev)
  	/* 3: Enable RC6 */
  	if ((intel_enable_rc6(dev) & INTEL_RC6_ENABLE) &&
  						(pcbr >> VLV_PCBR_ADDR_SHIFT))
-		rc6_mode = GEN6_RC_CTL_EI_MODE(1);
+		rc6_mode = GEN7_RC_CTL_TO_MODE;
  	I915_WRITE(GEN6_RC_CONTROL, rc6_mode);

Hi Ben,

Quoted 6 lines
Quoted 1 line

Please review the patch

Why me? I don't know anything about Cherryview. I only put the r-b on the BDW version because of the public QA data which showed it was a win for power without hurting performance.

I'd suggest you get Tom O'Rourke to review this.

Thanks Ben, I will check with Tom.

Quoted 3 lines
Quoted 3 lines

Thanks
Deepak