aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/selftests/i915_request.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2020-04-29 21:54:41 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2020-04-30 00:57:34 +0100
commit426d0073fb6d1a9513978cea4c9e8396f3721fba (patch)
treee0e1c1a7971a7b5dd0b0eded8911a2a691c6cff3 /drivers/gpu/drm/i915/selftests/i915_request.c
parentdrm/i915/gt: Keep a no-frills swappable copy of the default context state (diff)
downloadlinux-dev-426d0073fb6d1a9513978cea4c9e8396f3721fba.tar.xz
linux-dev-426d0073fb6d1a9513978cea4c9e8396f3721fba.zip
drm/i915/gt: Always enable busy-stats for execlists
In the near future, we will utilize the busy-stats on each engine to approximate the C0 cycles of each, and use that as an input to a manual RPS mechanism. That entails having busy-stats always enabled and so we can remove the enable/disable routines and simplify the pmu setup. As a consequence of always having the stats enabled, we can also show the current active time via sysfs/engine/xcs/active_time_ns. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200429205446.3259-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/selftests/i915_request.c')
-rw-r--r--drivers/gpu/drm/i915/selftests/i915_request.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c b/drivers/gpu/drm/i915/selftests/i915_request.c
index 3b319c0953cb..15b1ca9f7a01 100644
--- a/drivers/gpu/drm/i915/selftests/i915_request.c
+++ b/drivers/gpu/drm/i915/selftests/i915_request.c
@@ -1679,8 +1679,7 @@ static int perf_series_engines(void *arg)
p->engine = ps->ce[idx]->engine;
intel_engine_pm_get(p->engine);
- if (intel_engine_supports_stats(p->engine) &&
- !intel_enable_engine_stats(p->engine))
+ if (intel_engine_supports_stats(p->engine))
p->busy = intel_engine_get_busy_time(p->engine) + 1;
p->runtime = -intel_context_get_total_runtime_ns(ce);
p->time = ktime_get();
@@ -1700,7 +1699,6 @@ static int perf_series_engines(void *arg)
if (p->busy) {
p->busy = ktime_sub(intel_engine_get_busy_time(p->engine),
p->busy - 1);
- intel_disable_engine_stats(p->engine);
}
err = switch_to_kernel_sync(ce, err);
@@ -1762,8 +1760,7 @@ static int p_sync0(void *arg)
}
busy = false;
- if (intel_engine_supports_stats(engine) &&
- !intel_enable_engine_stats(engine)) {
+ if (intel_engine_supports_stats(engine)) {
p->busy = intel_engine_get_busy_time(engine);
busy = true;
}
@@ -1796,7 +1793,6 @@ static int p_sync0(void *arg)
if (busy) {
p->busy = ktime_sub(intel_engine_get_busy_time(engine),
p->busy);
- intel_disable_engine_stats(engine);
}
err = switch_to_kernel_sync(ce, err);
@@ -1830,8 +1826,7 @@ static int p_sync1(void *arg)
}
busy = false;
- if (intel_engine_supports_stats(engine) &&
- !intel_enable_engine_stats(engine)) {
+ if (intel_engine_supports_stats(engine)) {
p->busy = intel_engine_get_busy_time(engine);
busy = true;
}
@@ -1866,7 +1861,6 @@ static int p_sync1(void *arg)
if (busy) {
p->busy = ktime_sub(intel_engine_get_busy_time(engine),
p->busy);
- intel_disable_engine_stats(engine);
}
err = switch_to_kernel_sync(ce, err);
@@ -1899,8 +1893,7 @@ static int p_many(void *arg)
}
busy = false;
- if (intel_engine_supports_stats(engine) &&
- !intel_enable_engine_stats(engine)) {
+ if (intel_engine_supports_stats(engine)) {
p->busy = intel_engine_get_busy_time(engine);
busy = true;
}
@@ -1924,7 +1917,6 @@ static int p_many(void *arg)
if (busy) {
p->busy = ktime_sub(intel_engine_get_busy_time(engine),
p->busy);
- intel_disable_engine_stats(engine);
}
err = switch_to_kernel_sync(ce, err);