aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2013-09-26 20:55:57 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-10-01 01:45:43 -0400
commit49798eb2fe7240900d0a22a4e8d2b8e2f2ea6684 (patch)
treec695f5127d4f4bceadf26eef23d1a14843f8c6e0
parent5de56df5c708f5d0d1bb2c156385a6740436affa (diff)
drm/i915/vlv: use lower precision RC6 counter
And add some reg defines while we're at it. Since the units of the RC6 residency counter are actually in CZ clocks, we want to just use the high bits or we'll overflow too frequently. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/i915/i915_reg.h4
-rw-r--r--drivers/gpu/drm/i915/intel_pm.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 33bb4750516a..c15cc749ca2c 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -4729,6 +4729,10 @@
4729 GEN6_PM_RP_DOWN_TIMEOUT) 4729 GEN6_PM_RP_DOWN_TIMEOUT)
4730 4730
4731#define GEN6_GT_GFX_RC6_LOCKED 0x138104 4731#define GEN6_GT_GFX_RC6_LOCKED 0x138104
4732#define VLV_COUNTER_CONTROL 0x138104
4733#define VLV_COUNT_RANGE_HIGH (1<<15)
4734#define VLV_MEDIA_RC6_COUNT_EN (1<<1)
4735#define VLV_RENDER_RC6_COUNT_EN (1<<0)
4732#define GEN6_GT_GFX_RC6 0x138108 4736#define GEN6_GT_GFX_RC6 0x138108
4733#define GEN6_GT_GFX_RC6p 0x13810C 4737#define GEN6_GT_GFX_RC6p 0x13810C
4734#define GEN6_GT_GFX_RC6pp 0x138110 4738#define GEN6_GT_GFX_RC6pp 0x138110
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 2ac1c2fd58bb..102fc498a12f 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -3837,7 +3837,10 @@ static void valleyview_enable_rps(struct drm_device *dev)
3837 I915_WRITE(GEN6_RC6_THRESHOLD, 0xc350); 3837 I915_WRITE(GEN6_RC6_THRESHOLD, 0xc350);
3838 3838
3839 /* allows RC6 residency counter to work */ 3839 /* allows RC6 residency counter to work */
3840 I915_WRITE(0x138104, _MASKED_BIT_ENABLE(0x3)); 3840 I915_WRITE(VLV_COUNTER_CONTROL,
3841 _MASKED_BIT_ENABLE(VLV_COUNT_RANGE_HIGH |
3842 VLV_MEDIA_RC6_COUNT_EN |
3843 VLV_RENDER_RC6_COUNT_EN));
3841 if (intel_enable_rc6(dev) & INTEL_RC6_ENABLE) 3844 if (intel_enable_rc6(dev) & INTEL_RC6_ENABLE)
3842 rc6_mode = GEN7_RC_CTL_TO_MODE; 3845 rc6_mode = GEN7_RC_CTL_TO_MODE;
3843 I915_WRITE(GEN6_RC_CONTROL, rc6_mode); 3846 I915_WRITE(GEN6_RC_CONTROL, rc6_mode);