]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/pmu: Stop averaging with the previous sample
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Fri, 24 Nov 2017 09:49:59 +0000 (09:49 +0000)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Fri, 24 Nov 2017 13:20:48 +0000 (13:20 +0000)
commit0d5afc1f3dea3e066a641a4b52ee028f300bab9d
tree37890b2f6dc87756391117f712412af68fb69136
parent90238bec13587030b6cfe0a3e199eaacac3b354f
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 <tvrtko.ursulin@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20171124094959.10725-1-tvrtko.ursulin@linux.intel.com
drivers/gpu/drm/i915/i915_pmu.c
drivers/gpu/drm/i915/i915_pmu.h