Commit 80166e40 authored by Chris Wilson's avatar Chris Wilson

drm/i915: Consolidate reporting of "missed breadcrumbs"

Move the setting of gpu_error->missed_irq_ring bit to a common function
so that we can get the debug logging for either path.

v2: Add %pF caller
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170228085018.3225-1-chris@chris-wilson.co.uk
parent ebeac380
...@@ -59,6 +59,16 @@ static unsigned long wait_timeout(void) ...@@ -59,6 +59,16 @@ static unsigned long wait_timeout(void)
return round_jiffies_up(jiffies + DRM_I915_HANGCHECK_JIFFIES); return round_jiffies_up(jiffies + DRM_I915_HANGCHECK_JIFFIES);
} }
static noinline void missed_breadcrumb(struct intel_engine_cs *engine)
{
DRM_DEBUG_DRIVER("%s missed breadcrumb at %pF, irq posted? %s\n",
engine->name, __builtin_return_address(0),
yesno(test_bit(ENGINE_IRQ_BREADCRUMB,
&engine->irq_posted)));
set_bit(engine->id, &engine->i915->gpu_error.missed_irq_rings);
}
static void intel_breadcrumbs_hangcheck(unsigned long data) static void intel_breadcrumbs_hangcheck(unsigned long data)
{ {
struct intel_engine_cs *engine = (struct intel_engine_cs *)data; struct intel_engine_cs *engine = (struct intel_engine_cs *)data;
...@@ -86,8 +96,7 @@ static void intel_breadcrumbs_hangcheck(unsigned long data) ...@@ -86,8 +96,7 @@ static void intel_breadcrumbs_hangcheck(unsigned long data)
* DRM_I915_HANGCHECK_JIFFIES [1.5s]! * DRM_I915_HANGCHECK_JIFFIES [1.5s]!
*/ */
if (intel_engine_wakeup(engine) & ENGINE_WAKEUP_ASLEEP) { if (intel_engine_wakeup(engine) & ENGINE_WAKEUP_ASLEEP) {
DRM_DEBUG("Hangcheck timer elapsed... %s idle\n", engine->name); missed_breadcrumb(engine);
set_bit(engine->id, &engine->i915->gpu_error.missed_irq_rings);
mod_timer(&engine->breadcrumbs.fake_irq, jiffies + 1); mod_timer(&engine->breadcrumbs.fake_irq, jiffies + 1);
} else { } else {
mod_timer(&b->hangcheck, wait_timeout()); mod_timer(&b->hangcheck, wait_timeout());
...@@ -180,7 +189,7 @@ void intel_engine_disarm_breadcrumbs(struct intel_engine_cs *engine) ...@@ -180,7 +189,7 @@ void intel_engine_disarm_breadcrumbs(struct intel_engine_cs *engine)
* completion. * completion.
*/ */
if (__intel_breadcrumbs_wakeup(b) & ENGINE_WAKEUP_ASLEEP) if (__intel_breadcrumbs_wakeup(b) & ENGINE_WAKEUP_ASLEEP)
set_bit(engine->id, &engine->i915->gpu_error.missed_irq_rings); missed_breadcrumb(engine);
__intel_engine_disarm_breadcrumbs(engine); __intel_engine_disarm_breadcrumbs(engine);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment