Commit 489645d5 authored by Chris Wilson's avatar Chris Wilson

drm/i915/gt: Show the cumulative context runtime in engine debug

As we have the total runtime known to us, show it when dumping the
engine state for debug.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200218162150.1300405-2-chris@chris-wilson.co.uk
parent d30d3d5f
...@@ -1376,7 +1376,7 @@ static void intel_engine_print_registers(struct intel_engine_cs *engine, ...@@ -1376,7 +1376,7 @@ static void intel_engine_print_registers(struct intel_engine_cs *engine,
execlists_active_lock_bh(execlists); execlists_active_lock_bh(execlists);
rcu_read_lock(); rcu_read_lock();
for (port = execlists->active; (rq = *port); port++) { for (port = execlists->active; (rq = *port); port++) {
char hdr[80]; char hdr[160];
int len; int len;
len = snprintf(hdr, sizeof(hdr), len = snprintf(hdr, sizeof(hdr),
...@@ -1386,10 +1386,12 @@ static void intel_engine_print_registers(struct intel_engine_cs *engine, ...@@ -1386,10 +1386,12 @@ static void intel_engine_print_registers(struct intel_engine_cs *engine,
struct intel_timeline *tl = get_timeline(rq); struct intel_timeline *tl = get_timeline(rq);
len += snprintf(hdr + len, sizeof(hdr) - len, len += snprintf(hdr + len, sizeof(hdr) - len,
"ring:{start:%08x, hwsp:%08x, seqno:%08x}, ", "ring:{start:%08x, hwsp:%08x, seqno:%08x, runtime:%llums}, ",
i915_ggtt_offset(rq->ring->vma), i915_ggtt_offset(rq->ring->vma),
tl ? tl->hwsp_offset : 0, tl ? tl->hwsp_offset : 0,
hwsp_seqno(rq)); hwsp_seqno(rq),
DIV_ROUND_CLOSEST_ULL(intel_context_get_total_runtime_ns(rq->context),
1000 * 1000));
if (tl) if (tl)
intel_timeline_put(tl); intel_timeline_put(tl);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment