diff options
author | Imre Deak <imre.deak@intel.com> | 2015-09-29 16:28:46 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-09-30 18:15:13 +0300 |
commit | d8135109e45d4cf352387b7de66c216a176e37f0 (patch) | |
tree | a4b03312749b5e8dd1c28a58f3a1c8640c0698f0 /drivers/gpu/drm/i915/i915_sysfs.c | |
parent | 93f253187c2f565678bd7e5ca5f64c1043774f1b (diff) | |
download | linux-d8135109e45d4cf352387b7de66c216a176e37f0.tar.xz |
drm/i915/bxt: fix RC6 residency time calculation
The RC6 residency time unit is 833.33ns on BXT according to the
specification, so update the calculation accordingly. Use the same way
as CHV/VLV to divide by the corresponding frequency, as I think this is
the more natural unit for what the HW does internally.
v2:
- add missing IS_BROXTON check (Ville)
Testcase: igt/pm_rc6_residency
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_sysfs.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_sysfs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c index 74086eb5bf83..50ce9ce2b269 100644 --- a/drivers/gpu/drm/i915/i915_sysfs.c +++ b/drivers/gpu/drm/i915/i915_sysfs.c @@ -54,6 +54,9 @@ static u32 calc_residency(struct drm_device *dev, const u32 reg) if (I915_READ(VLV_COUNTER_CONTROL) & VLV_COUNT_RANGE_HIGH) units <<= 8; + } else if (IS_BROXTON(dev)) { + units = 1; + div = 1200; /* 833.33ns */ } raw_time = I915_READ(reg) * units; |