summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMika Kuoppala <mika.kuoppala@intel.com>2017-03-17 18:57:44 +0200
committerMika Kuoppala <mika.kuoppala@intel.com>2017-03-17 18:54:14 +0200
commit621639a60fae9b585ec6bd73999adf642efd4179 (patch)
treec8eda91a2ded12fb732962800cb7902fa759e296
parent774b0bab8f5088073b9b994199578be6faa66929 (diff)
more debugsrc0_util
-rw-r--r--drivers/gpu/drm/i915/i915_irq.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 74e4a258174b..8f426e8b7c83 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1117,14 +1117,29 @@ static u32 vlv_wa_c0_ei(struct drm_i915_private *dev_priv, u32 pm_iir)
c0 = max(render, media);
c0 *= 1000 * 100 << 8; /* to usecs and scale to threshold% */
- printk("time %llu us, c0 %llu us, util %llu%%, up %d%%, down %d%%\n",
+ printk("time %llu us, c0 %llu us, c0 %llu, time %llu, util %llu%%, up %d%%, down %d%%\n",
ktime_us_delta(now->ktime, prev->ktime),
DIV_ROUND_CLOSEST_ULL(1000ULL * max(render, media) << 8,
dev_priv->czclk_freq),
- DIV_ROUND_CLOSEST_ULL(c0 * 100, time),
+ c0, time,
+ // DIV_ROUND_UP_ULL(c0, time),
+ c0 / time,
dev_priv->rps.up_threshold,
dev_priv->rps.down_threshold);
+ printk("x %llu, y %llu\n", c0, time);
+ printk("x / y = %llu\n", c0 / time);
+
+ printk("DIV_ROUND_UP_ULL = %llu\n",
+ DIV_ROUND_UP_ULL(c0, time));
+
+ printk("x %llu, y %llu\n", c0, time);
+
+ printk("DIV_ROUND CLOSEST_ULL = %llu\n",
+ DIV_ROUND_CLOSEST_ULL(c0, time));
+
+ printk("x %llu, y %llu\n", c0, time);
+
if (c0 > time * dev_priv->rps.up_threshold) {
printk("up\n");
return GEN6_PM_RP_UP_THRESHOLD;