[Intel-gfx] [PATCH 1/1] drm/i915/skl: fix RC6 residency time calculation

Sagar Arun Kamble sagar.a.kamble at intel.com
Wed Feb 3 05:59:46 UTC 2016


The RC6 residency time unit is 1.33us on SKL according to the
specification, so update the calculation accordingly.

Cc: Imre Deak <imre.deak at intel.com>
Signed-off-by: Sagar Arun Kamble <sagar.a.kamble at intel.com>
---
 drivers/gpu/drm/i915/i915_sysfs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c
index c6188dd..9aa49a9 100644
--- a/drivers/gpu/drm/i915/i915_sysfs.c
+++ b/drivers/gpu/drm/i915/i915_sysfs.c
@@ -58,7 +58,8 @@ static u32 calc_residency(struct drm_device *dev,
 	} else if (IS_BROXTON(dev)) {
 		units = 1;
 		div = 1200;		/* 833.33ns */
-	}
+	} else if (IS_SKYLAKE(dev))
+		units = 133ULL;
 
 	raw_time = I915_READ(reg) * units;
 	ret = DIV_ROUND_UP_ULL(raw_time, div);
-- 
1.9.1



More information about the Intel-gfx mailing list