]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/pmu: Skip busyness sampling when and where not needed
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Wed, 11 Sep 2019 16:07:30 +0000 (17:07 +0100)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Thu, 12 Sep 2019 12:33:05 +0000 (13:33 +0100)
commit3b3c81875e9440b5c56d9521ff1aa4e66ee0b723
tree4dbfc89bb7f397d250ca83d097a7c4fec9db1362
parent123d9dca0519b22d7f7d27dc9d160b2431c700e1
drm/i915/pmu: Skip busyness sampling when and where not needed

Since 6ef2bd8e4ff7 ("drm/i915/pmu: Always sample an active ringbuffer")
the cost of sampling the engine state on execlists platforms became a
little bit higher when both engine busyness and one of the wait states are
being monitored. (Previously the busyness sampling on legacy platforms was
done via seqno comparison so there was no cost of mmio read.)

We can avoid that by skipping busyness sampling when engine supports
software busy stats and so avoid the cost of potential mmio read and
sample accumulation.

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