drm/i915: Use correct index for backtracking HUNG semaphores
authorChris Wilson <[email protected]>
Mon, 3 Oct 2016 12:45:16 +0000 (13:45 +0100)
committerJani Nikula <[email protected]>
Mon, 10 Oct 2016 13:06:42 +0000 (16:06 +0300)
When decoding the semaphores inside hangcheck, we need to use the hw-id
and not the local array index.

Fixes: de1add360522 ("drm/i915: Decouple execbuf uAPI ...")
Testcase: igt/gem_exec_whisper/hang # gen6-7
Signed-off-by: Chris Wilson <[email protected]>
Cc: Mika Kuoppala <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: [email protected]
Reviewed-by: Joonas Lahtinen <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 348b9b1192144e13b779f8f9be301d492bebaff2)
Signed-off-by: Jani Nikula <[email protected]>
drivers/gpu/drm/i915/i915_irq.c

index 13fae1c9dcc8d253563a4512f8b5a8291db89002..3fc286cd11577b36426c18d1398eaaaf00f1556e 100644 (file)
@@ -2822,7 +2822,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 {
@@ -2832,13 +2832,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);
 }