Skip to content

Commit

Permalink
drm/i915: Use correct index for backtracking HUNG semaphores
Browse files Browse the repository at this point in the history
When decoding the semaphores inside hangcheck, we need to use the hw-id
and not the local array index.

Fixes: de1add3 ("drm/i915: Decouple execbuf uAPI ...")
Testcase: igt/gem_exec_whisper/hang # gen6-7
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: stable@vger.kernel.org
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161003124516.12388-3-chris@chris-wilson.co.uk
  • Loading branch information
Chris Wilson committed Oct 3, 2016
1 parent 5f12b80 commit 348b9b1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/gpu/drm/i915/i915_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -2846,7 +2846,7 @@ semaphore_wait_to_signaller_ring(struct intel_engine_cs *engine, u32 ipehr,
if (engine == signaller)
continue;

if (offset == signaller->semaphore.signal_ggtt[engine->id])
if (offset == signaller->semaphore.signal_ggtt[engine->hw_id])
return signaller;
}
} else {
Expand All @@ -2856,13 +2856,13 @@ semaphore_wait_to_signaller_ring(struct intel_engine_cs *engine, u32 ipehr,
if(engine == signaller)
continue;

if (sync_bits == signaller->semaphore.mbox.wait[engine->id])
if (sync_bits == signaller->semaphore.mbox.wait[engine->hw_id])
return signaller;
}
}

DRM_DEBUG_DRIVER("No signaller ring found for ring %i, ipehr 0x%08x, offset 0x%016llx\n",
engine->id, ipehr, offset);
DRM_DEBUG_DRIVER("No signaller ring found for %s, ipehr 0x%08x, offset 0x%016llx\n",
engine->name, ipehr, offset);

return ERR_PTR(-ENODEV);
}
Expand Down

0 comments on commit 348b9b1

Please sign in to comment.