diff options
author | Tvrtko Ursulin <[email protected]> | 2023-05-19 08:49:42 -0700 |
---|---|---|
committer | Umesh Nerlige Ramappa <[email protected]> | 2023-05-22 11:07:49 -0700 |
commit | 08322dabb5cbce75e210d8df4774fc078ed7161c (patch) | |
tree | 921641ba3a10bd18221b3494ffa9159693fbeb32 | |
parent | e367d3c45158ba34bb684227d87c52d8d840fd67 (diff) |
drm/i915/pmu: Skip sampling engines with no enabled counters
As we have more and more engines do not waste time sampling the ones no-
one is monitoring.
Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: Umesh Nerlige Ramappa <[email protected]>
Signed-off-by: Umesh Nerlige Ramappa <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r-- | drivers/gpu/drm/i915/i915_pmu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c index 9edf87ee5d10..6d594f67f365 100644 --- a/drivers/gpu/drm/i915/i915_pmu.c +++ b/drivers/gpu/drm/i915/i915_pmu.c @@ -350,6 +350,9 @@ engines_sample(struct intel_gt *gt, unsigned int period_ns) return; for_each_engine(engine, gt, id) { + if (!engine->pmu.enable) + continue; + if (!intel_engine_pm_get_if_awake(engine)) continue; |