drm/i915: Show all active engines on hangcheck
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 21 Jan 2019 22:20:46 +0000 (22:20 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 22 Jan 2019 13:30:51 +0000 (13:30 +0000)
This turns out to be quite useful if one happens to be debugging
semaphore deadlocks.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190121222117.23305-4-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_hangcheck.c

index 7dc11fcb13deecbfa58f9b6447cd5233ac03c0f9..741441daae321d68e34f08ce98ca628ea1b93b2a 100644 (file)
@@ -195,10 +195,6 @@ static void hangcheck_accumulate_sample(struct intel_engine_cs *engine,
                break;
 
        case ENGINE_DEAD:
-               if (GEM_SHOW_DEBUG()) {
-                       struct drm_printer p = drm_debug_printer("hangcheck");
-                       intel_engine_dump(engine, &p, "%s\n", engine->name);
-               }
                break;
 
        default:
@@ -285,6 +281,17 @@ static void i915_hangcheck_elapsed(struct work_struct *work)
                        wedged |= intel_engine_flag(engine);
        }
 
+       if (GEM_SHOW_DEBUG() && (hung | stuck)) {
+               struct drm_printer p = drm_debug_printer("hangcheck");
+
+               for_each_engine(engine, dev_priv, id) {
+                       if (intel_engine_is_idle(engine))
+                               continue;
+
+                       intel_engine_dump(engine, &p, "%s\n", engine->name);
+               }
+       }
+
        if (wedged) {
                dev_err(dev_priv->drm.dev,
                        "GPU recovery timed out,"