]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/pmu: Wire up engine busy stats to PMU
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Tue, 21 Nov 2017 18:18:49 +0000 (18:18 +0000)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Wed, 22 Nov 2017 11:25:03 +0000 (11:25 +0000)
commitc4e3d46db2ad5f5d3906f83708073858d9ca803f
tree8af64bf9351880561851738b501eb0abf6cd58d2
parent26f2098a6260ab72b4c9a85860ac7369dd98b4b1
drm/i915/pmu: Wire up engine busy stats to PMU

We can use engine busy stats instead of the sampling timer for
better accuracy.

By doing this we replace the stohastic sampling with busyness
metric derived directly from engine activity. This is context
switch interrupt driven, so as accurate as we can get from
software tracking.

As a secondary benefit, we can also not run the sampling timer
in cases only busyness metric is enabled.

v2: Rebase.
v3:
 * Rebase, comments.
 * Leave engine busyness controls out of workers.
v4: Checkpatch cleanup.
v5: Added comment to pmu_needs_timer change.
v6:
 * Rebase.
 * Fix style of some comments. (Chris Wilson)
v7: Rebase and commit message update. (Chris Wilson)
v8: Add delayed stats disabling to improve accuracy in face of
    CPU hotplug events.
v9: Rebase.
v10: Rebase - i915_modparams.enable_execlists removal.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20171121181852.16128-6-tvrtko.ursulin@linux.intel.com
drivers/gpu/drm/i915/i915_pmu.c
drivers/gpu/drm/i915/intel_ringbuffer.h