Skip to content

Commit 3c75de5

Browse files
committed
drm/i915: Include RING_MODE when dumping the engine state
Knowing the RING_MODE flags is useful for checking the state of the engine, such as whether the CS is idle after trying to stop the engines before reset. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171026115048.20144-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
1 parent bad7b7e commit 3c75de5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

drivers/gpu/drm/i915/intel_engine_cs.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1723,9 +1723,14 @@ void intel_engine_dump(struct intel_engine_cs *engine, struct drm_printer *m)
17231723
drm_printf(m, "\tRING_TAIL: 0x%08x [0x%08x]\n",
17241724
I915_READ(RING_TAIL(engine->mmio_base)) & TAIL_ADDR,
17251725
rq ? rq->ring->tail : 0);
1726-
drm_printf(m, "\tRING_CTL: 0x%08x [%s]\n",
1726+
drm_printf(m, "\tRING_CTL: 0x%08x%s\n",
17271727
I915_READ(RING_CTL(engine->mmio_base)),
1728-
I915_READ(RING_CTL(engine->mmio_base)) & (RING_WAIT | RING_WAIT_SEMAPHORE) ? "waiting" : "");
1728+
I915_READ(RING_CTL(engine->mmio_base)) & (RING_WAIT | RING_WAIT_SEMAPHORE) ? " [waiting]" : "");
1729+
if (INTEL_GEN(engine->i915) > 2) {
1730+
drm_printf(m, "\tRING_MODE: 0x%08x%s\n",
1731+
I915_READ(RING_MI_MODE(engine->mmio_base)),
1732+
I915_READ(RING_MI_MODE(engine->mmio_base)) & (MODE_IDLE) ? " [idle]" : "");
1733+
}
17291734

17301735
rcu_read_unlock();
17311736

0 commit comments

Comments
 (0)