Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> writes: > This turns out to be quite useful if one happens to be debugging > semaphore deadlocks. > > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> > --- > drivers/gpu/drm/i915/intel_hangcheck.c | 15 +++++++++++---- > 1 file changed, 11 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_hangcheck.c b/drivers/gpu/drm/i915/intel_hangcheck.c > index 7dc11fcb13de..741441daae32 100644 > --- a/drivers/gpu/drm/i915/intel_hangcheck.c > +++ b/drivers/gpu/drm/i915/intel_hangcheck.c > @@ -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; Looks rather harmless tho there is that local_bh_disable. I was pondering if it was worthwhile to determine idle here with more lightweight approach, but as we already use the exact same method on determining hangcheck action, lets stick to this as it is should be then in parity with the engine action we got earlier. Reviewed-by: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx> > + > + intel_engine_dump(engine, &p, "%s\n", engine->name); > + } > + } > + > if (wedged) { > dev_err(dev_priv->drm.dev, > "GPU recovery timed out," > -- > 2.20.1 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/intel-gfx _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx