Skip to content

Commit

Permalink
drm/i915: Include timeline seqno in error capture
Browse files Browse the repository at this point in the history
The seqno value actually written out to memory is no longer in the
regular HWSP. Instead, it is now in its own private timeline buffer.
Thus, it is no longer visible in an error capture. So, explicitly read
the value and include that in the capture.

v2: %d -> %u (Alan)

Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: Alan Previn <alan.previn.teres.alexis@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230311063714.570389-4-John.C.Harrison@Intel.com
  • Loading branch information
John Harrison authored and John Harrison committed Mar 14, 2023
1 parent 53c4e64 commit c8a76df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/i915/i915_gpu_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ static void error_print_context(struct drm_i915_error_state_buf *m,
header, ctx->comm, ctx->pid, ctx->sched_attr.priority,
ctx->guilty, ctx->active,
ctx->total_runtime, ctx->avg_runtime);
err_printf(m, " context timeline seqno %u\n", ctx->hwsp_seqno);
}

static struct i915_vma_coredump *
Expand Down Expand Up @@ -1395,6 +1396,8 @@ static bool record_context(struct i915_gem_context_coredump *e,
e->sched_attr = ctx->sched;
e->guilty = atomic_read(&ctx->guilty_count);
e->active = atomic_read(&ctx->active_count);
e->hwsp_seqno = (ce->timeline && ce->timeline->hwsp_seqno) ?
*ce->timeline->hwsp_seqno : ~0U;

e->total_runtime = intel_context_get_total_runtime_ns(ce);
e->avg_runtime = intel_context_get_avg_runtime_ns(ce);
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/i915_gpu_error.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ struct intel_engine_coredump {
int active;
int guilty;
struct i915_sched_attr sched_attr;
u32 hwsp_seqno;
} context;

struct i915_vma_coredump *vma;
Expand Down

0 comments on commit c8a76df

Please sign in to comment.