public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: Correct the i915_frequency_info debugfs output
@ 2016-04-21  7:03 akash.goel
  2016-04-21  6:54 ` Chris Wilson
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: akash.goel @ 2016-04-21  7:03 UTC (permalink / raw)
  To: intel-gfx; +Cc: Akash Goel

From: Akash Goel <akash.goel@intel.com>

There are certain registers, which captures the time elapsed in the
in current Up/Down EI, for how long GT has been Idle/Busy/Avg in the
current Up/Down EI and also in the previous Up/Down EI.
These register values are reported by the i915_frequency_info debugfs
interface. The Driver prints the 'us' suffix after the values, albeit
they are actually in raw form & not in microsecond units.
This patch removes the 'us' suffix so that its clear to User that values
are indeed in raw form.

Signed-off-by: Akash Goel <akash.goel@intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 931dc60..10d095a 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1291,20 +1291,20 @@ static int i915_frequency_info(struct seq_file *m, void *unused)
 		seq_printf(m, "RPDECLIMIT: 0x%08x\n", rpdeclimit);
 		seq_printf(m, "RPNSWREQ: %dMHz\n", reqf);
 		seq_printf(m, "CAGF: %dMHz\n", cagf);
-		seq_printf(m, "RP CUR UP EI: %dus\n", rpupei &
+		seq_printf(m, "RP CUR UP EI: %d\n", rpupei &
 			   GEN6_CURICONT_MASK);
-		seq_printf(m, "RP CUR UP: %dus\n", rpcurup &
+		seq_printf(m, "RP CUR UP: %d\n", rpcurup &
 			   GEN6_CURBSYTAVG_MASK);
-		seq_printf(m, "RP PREV UP: %dus\n", rpprevup &
+		seq_printf(m, "RP PREV UP: %d\n", rpprevup &
 			   GEN6_CURBSYTAVG_MASK);
 		seq_printf(m, "Up threshold: %d%%\n",
 			   dev_priv->rps.up_threshold);
 
-		seq_printf(m, "RP CUR DOWN EI: %dus\n", rpdownei &
+		seq_printf(m, "RP CUR DOWN EI: %d\n", rpdownei &
 			   GEN6_CURIAVG_MASK);
-		seq_printf(m, "RP CUR DOWN: %dus\n", rpcurdown &
+		seq_printf(m, "RP CUR DOWN: %d\n", rpcurdown &
 			   GEN6_CURBSYTAVG_MASK);
-		seq_printf(m, "RP PREV DOWN: %dus\n", rpprevdown &
+		seq_printf(m, "RP PREV DOWN: %d\n", rpprevdown &
 			   GEN6_CURBSYTAVG_MASK);
 		seq_printf(m, "Down threshold: %d%%\n",
 			   dev_priv->rps.down_threshold);
-- 
1.9.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 17+ messages in thread
* [PATCH 1/3] drm/i915: Macros to convert PM time interval values to microseconds
@ 2016-04-22 18:35 akash.goel
  2016-04-26 14:06 ` Daniel Vetter
  0 siblings, 1 reply; 17+ messages in thread
From: akash.goel @ 2016-04-22 18:35 UTC (permalink / raw)
  To: intel-gfx; +Cc: Akash Goel

From: Akash Goel <akash.goel@intel.com>

Added a new GT_PM_INTERVAL_TO_US macro to perform the platform
specific conversion of PM time interval values to microseconds unit.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Akash Goel <akash.goel@intel.com>
---
 drivers/gpu/drm/i915/i915_reg.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 9464ba3..eacd9ae 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -2939,6 +2939,15 @@ enum skl_disp_power_wells {
 				INTERVAL_1_33_US(us)) : \
 				INTERVAL_1_28_US(us))
 
+#define INTERVAL_1_28_TO_US(interval)  (((interval) << 7) / 100)
+#define INTERVAL_1_33_TO_US(interval)  (((interval) << 2) / 3)
+#define INTERVAL_0_833_TO_US(interval) (((interval) * 5)  / 6)
+#define GT_PM_INTERVAL_TO_US(dev_priv, interval) (IS_GEN9(dev_priv) ? \
+                           (IS_BROXTON(dev_priv) ? \
+                           INTERVAL_0_833_TO_US(interval) : \
+                           INTERVAL_1_33_TO_US(interval)) : \
+                           INTERVAL_1_28_TO_US(interval))
+
 /*
  * Logical Context regs
  */
-- 
1.9.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2016-04-26 14:29 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-21  7:03 [PATCH 1/2] drm/i915: Correct the i915_frequency_info debugfs output akash.goel
2016-04-21  6:54 ` Chris Wilson
2016-04-21  7:37   ` Goel, Akash
2016-04-22 11:52     ` [PATCH 1/3] drm/i915: Macros to convert PM time interval values to microseconds akash.goel
2016-04-22 11:52       ` [PATCH v2 2/3] drm/i915: Correct the i915_frequency_info debugfs output akash.goel
2016-04-22 12:00         ` Chris Wilson
2016-04-22 11:52       ` [PATCH v2 3/3] drm/i915/bxt: Explicitly clear the Turbo control register akash.goel
2016-04-22 11:58       ` [PATCH 1/3] drm/i915: Macros to convert PM time interval values to microseconds Chris Wilson
2016-04-22 12:56       ` Daniel Vetter
2016-04-21  7:03 ` [PATCH 2/2] drm/i915/bxt: Explicitly clear the Turbo control register akash.goel
2016-04-21  7:37   ` Chris Wilson
2016-04-21  8:30     ` Goel, Akash
2016-04-21 15:27 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Correct the i915_frequency_info debugfs output Patchwork
2016-04-23 13:53 ` ✗ Fi.CI.BAT: warning " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2016-04-22 18:35 [PATCH 1/3] drm/i915: Macros to convert PM time interval values to microseconds akash.goel
2016-04-26 14:06 ` Daniel Vetter
2016-04-26 14:29   ` Chris Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox