summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gt/intel_engine_cs.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2020-06-19 20:10:53 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2020-06-19 21:13:45 +0100
commit4fb33953438bf3c67c655a4d187f1645446863fb (patch)
tree1bcff83a413afc24c31c69c5f5c16b4d8897280c /drivers/gpu/drm/i915/gt/intel_engine_cs.c
parent5a15550e56cc57bb5b953b0f6629c6805f4724fe (diff)
downloadlwn-4fb33953438bf3c67c655a4d187f1645446863fb.tar.gz
lwn-4fb33953438bf3c67c655a4d187f1645446863fb.zip
drm/i915/gt: Show the culmative runtime as part of the engine info
Since we always enable the busy-stats, the culmulative runtime should be accurate, and might be useful for diagnosing issues with the engine. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200619191053.9654-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/gt/intel_engine_cs.c')
-rw-r--r--drivers/gpu/drm/i915/gt/intel_engine_cs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
index c62b3cbdbbf9..7bf2f76212f0 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
@@ -1510,6 +1510,7 @@ void intel_engine_dump(struct intel_engine_cs *engine,
struct i915_request *rq;
intel_wakeref_t wakeref;
unsigned long flags;
+ ktime_t dummy;
if (header) {
va_list ap;
@@ -1527,6 +1528,10 @@ void intel_engine_dump(struct intel_engine_cs *engine,
yesno(!llist_empty(&engine->barrier_tasks)));
drm_printf(m, "\tLatency: %luus\n",
ewma__engine_latency_read(&engine->latency));
+ if (intel_engine_supports_stats(engine))
+ drm_printf(m, "\tRuntime: %llums\n",
+ ktime_to_ms(intel_engine_get_busy_time(engine,
+ &dummy)));
drm_printf(m, "\tForcewake: %x domains, %d active\n",
engine->fw_domain, atomic_read(&engine->fw_active));