diff options
author | Mika Kuoppala <mika.kuoppala@linux.intel.com> | 2017-03-15 17:43:00 +0200 |
---|---|---|
committer | Mika Kuoppala <mika.kuoppala@intel.com> | 2017-03-16 12:28:28 +0200 |
commit | c5a0ad114b6a9f4ad03f30bd7c61994bc6e8ab52 (patch) | |
tree | e30d1155564a7a9ae2f827a4473cfdb9ee366220 /drivers/gpu/drm/i915/i915_sysfs.c | |
parent | 135bafa551de3e7a8fff29e80a714b44d7dfd778 (diff) |
drm/i915: Return residency as microseconds
Change the granularity from milliseconds to microseconds
when returning rc6 residencies. This is in preparation
for increased resolution on some platforms.
v2: use 64bit div macro (Chris)
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_sysfs.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_sysfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c index ab723e3403d3..f3fdfda5e558 100644 --- a/drivers/gpu/drm/i915/i915_sysfs.c +++ b/drivers/gpu/drm/i915/i915_sysfs.c @@ -42,7 +42,8 @@ static inline struct drm_i915_private *kdev_minor_to_i915(struct device *kdev) static u32 calc_residency(struct drm_i915_private *dev_priv, i915_reg_t reg) { - return intel_rc6_residency(dev_priv, reg); + return DIV_ROUND_CLOSEST_ULL(intel_rc6_residency_us(dev_priv, reg), + 1000); } static ssize_t |