Skip to content

Commit

Permalink
drm/i915/tgl: Add SFC instdone to error state
Browse files Browse the repository at this point in the history
On debugging media workload hangs, sfc instdone
might prove useful in future. Be prepared.

Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20191029163841.5224-1-mika.kuoppala@linux.intel.com
  • Loading branch information
Mika Kuoppala authored and Chris Wilson committed Oct 30, 2019
1 parent b3545e0 commit e50dbdb
Showing 3 changed files with 19 additions and 0 deletions.
15 changes: 15 additions & 0 deletions drivers/gpu/drm/i915/i915_gpu_error.c
Original file line number Diff line number Diff line change
@@ -740,6 +740,14 @@ static void __err_print_to_sgl(struct drm_i915_error_state_buf *m,
if (IS_GEN(m->i915, 12))
err_printf(m, "AUX_ERR_DBG: 0x%08x\n", error->aux_err);

if (INTEL_GEN(m->i915) >= 12) {
int i;

for (i = 0; i < GEN12_SFC_DONE_MAX; i++)
err_printf(m, " SFC_DONE[%d]: 0x%08x\n", i,
error->sfc_done[i]);
}

for (ee = error->engine; ee; ee = ee->next)
error_print_engine(m, ee, error->capture);

@@ -1599,6 +1607,13 @@ static void capture_reg_state(struct i915_gpu_state *error)
if (IS_GEN(i915, 12))
error->aux_err = intel_uncore_read(uncore, GEN12_AUX_ERR_DBG);

if (INTEL_GEN(i915) >= 12) {
for (i = 0; i < GEN12_SFC_DONE_MAX; i++) {
error->sfc_done[i] =
intel_uncore_read(uncore, GEN12_SFC_DONE(i));
}
}

/* 4: Everything else */
if (INTEL_GEN(i915) >= 11) {
error->ier = intel_uncore_read(uncore, GEN8_DE_MISC_IER);
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/i915_gpu_error.h
Original file line number Diff line number Diff line change
@@ -75,6 +75,7 @@ struct i915_gpu_state {
u32 gfx_mode;
u32 gtt_cache;
u32 aux_err; /* gen12 */
u32 sfc_done[GEN12_SFC_DONE_MAX]; /* gen12 */

u32 nfence;
u64 fence[I915_MAX_NUM_FENCES];
3 changes: 3 additions & 0 deletions drivers/gpu/drm/i915/i915_reg.h
Original file line number Diff line number Diff line change
@@ -413,6 +413,9 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)
#define GEN11_VECS_SFC_USAGE(engine) _MMIO((engine)->mmio_base + 0x2014)
#define GEN11_VECS_SFC_USAGE_BIT (1 << 0)

#define GEN12_SFC_DONE(n) _MMIO(0x1cc00 + (n) * 0x100)
#define GEN12_SFC_DONE_MAX 4

#define RING_PP_DIR_BASE(base) _MMIO((base) + 0x228)
#define RING_PP_DIR_BASE_READ(base) _MMIO((base) + 0x518)
#define RING_PP_DIR_DCLV(base) _MMIO((base) + 0x220)

0 comments on commit e50dbdb

Please sign in to comment.