All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/pmu: Clear the previous sample value when parking
@ 2017-11-23  0:06 Chris Wilson
  2017-11-23  0:25 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Chris Wilson @ 2017-11-23  0:06 UTC (permalink / raw)
  To: intel-gfx

When turning off the engines, and the pmu sampling, clear the previous
value as the current measurement should be 0.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/i915_pmu.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
index f1e932a3fb85..6f1316f5039a 100644
--- a/drivers/gpu/drm/i915/i915_pmu.c
+++ b/drivers/gpu/drm/i915/i915_pmu.c
@@ -135,9 +135,18 @@ static bool pmu_needs_timer(struct drm_i915_private *i915, bool gpu_active)
 
 void i915_pmu_gt_parked(struct drm_i915_private *i915)
 {
+	struct intel_engine_cs *engine;
+	enum intel_engine_id id;
+
 	if (!i915->pmu.base.event_init)
 		return;
 
+	for_each_engine(engine, i915, id) {
+		engine->pmu.sample[I915_SAMPLE_BUSY].prev = 0;
+		engine->pmu.sample[I915_SAMPLE_WAIT].prev = 0;
+		engine->pmu.sample[I915_SAMPLE_SEMA].prev = 0;
+	}
+
 	spin_lock_irq(&i915->pmu.lock);
 	/*
 	 * Signal sampling timer to stop if only engine events are enabled and
-- 
2.15.0

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

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

end of thread, other threads:[~2017-11-23 14:06 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-23  0:06 [PATCH] drm/i915/pmu: Clear the previous sample value when parking Chris Wilson
2017-11-23  0:25 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-11-23  1:03 ` ✓ Fi.CI.IGT: " Patchwork
2017-11-23  6:56 ` [PATCH] " Tvrtko Ursulin
2017-11-23  7:15   ` Chris Wilson
2017-11-23  8:54 ` [PATCH v2] " Chris Wilson
2017-11-23  9:27   ` [PATCH v3] " Tvrtko Ursulin
2017-11-23  9:37     ` Chris Wilson
2017-11-23 10:17       ` Sagar Arun Kamble
2017-11-23 10:26       ` [PATCH v4] " Tvrtko Ursulin
2017-11-23 12:06         ` Chris Wilson
2017-11-23 10:22 ` ✓ Fi.CI.BAT: success for drm/i915/pmu: Clear the previous sample value when parking (rev3) Patchwork
2017-11-23 12:36   ` Tvrtko Ursulin
2017-11-23 11:20 ` ✓ Fi.CI.BAT: success for drm/i915/pmu: Clear the previous sample value when parking (rev4) Patchwork
2017-11-23 14:06 ` ✗ Fi.CI.IGT: warning " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.