From 8ee4f19c47031f23340055da4d9f2af537de23f4 Mon Sep 17 00:00:00 2001 From: Tvrtko Ursulin Date: Fri, 24 Nov 2017 09:49:59 +0000 Subject: drm/i915/pmu: Stop averaging with the previous sample Averaging with the previous sample brings a small statistical improvement to sampling counters, but can leek a little bit of state from a current client to the next which mulls the border between past and present for observing clients. This is because on event enable clients record the current counter value and use it as reference, but with rapid off-on event cycles, and due the delayed nature of sampling timer self-disarm, previous sample value does not get cleared under these circumstances. Solution is to stop averaging with the previous sample. This has a small downside of losing some precision with short and spiky signals, but the alternatives look too complicated for the benefit. Signed-off-by: Tvrtko Ursulin Cc: Chris Wilson Cc: Sagar Arun Kamble Reviewed-by: Chris Wilson Tested-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171124094959.10725-1-tvrtko.ursulin@linux.intel.com --- drivers/gpu/drm/i915/i915_pmu.h | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/gpu/drm/i915/i915_pmu.h') diff --git a/drivers/gpu/drm/i915/i915_pmu.h b/drivers/gpu/drm/i915/i915_pmu.h index e209783a4c5f..40c154d13565 100644 --- a/drivers/gpu/drm/i915/i915_pmu.h +++ b/drivers/gpu/drm/i915/i915_pmu.h @@ -41,7 +41,6 @@ enum { struct i915_pmu_sample { u64 cur; - u32 prev; }; struct i915_pmu { -- cgit