提交 d8135109 编写于 作者: I Imre Deak 提交者: Daniel Vetter

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: NImre Deak <imre.deak@intel.com>
Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 93f25318
...@@ -54,6 +54,9 @@ static u32 calc_residency(struct drm_device *dev, const u32 reg) ...@@ -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) if (I915_READ(VLV_COUNTER_CONTROL) & VLV_COUNT_RANGE_HIGH)
units <<= 8; units <<= 8;
} else if (IS_BROXTON(dev)) {
units = 1;
div = 1200; /* 833.33ns */
} }
raw_time = I915_READ(reg) * units; raw_time = I915_READ(reg) * units;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册