drm/i915: Reset the hangcheck timestamp before repeating a seqno
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 2 May 2018 22:03:12 +0000 (23:03 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 3 May 2018 09:43:45 +0000 (10:43 +0100)
In the unusual circumstance where we reuse a seqno (for example, in
igt), make sure that we reset the hangcheck timestamp before it sees the
same seqno again.

References: https://bugs.freedesktop.org/show_bug.cgi?id=106215
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180502220313.6459-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_request.c
drivers/gpu/drm/i915/intel_hangcheck.c

index 5acf869f3ca3fc4e7d891a827da867883258cfb5..63bb61089be51148c3c3b04db5a6236d8163b81a 100644 (file)
@@ -223,6 +223,7 @@ static int reset_all_global_seqno(struct drm_i915_private *i915, u32 seqno)
                if (!i915_seqno_passed(seqno, engine->timeline.seqno)) {
                        /* Flush any waiters before we reuse the seqno */
                        intel_engine_disarm_breadcrumbs(engine);
+                       intel_engine_init_hangcheck(engine);
                        GEM_BUG_ON(!list_empty(&engine->breadcrumbs.signals));
                }
 
index 309e38b00e959cf4e583023fd5a643cae160254c..d47e346bd49e97fc45e9aa0cb15563bbdb28c2fd 100644 (file)
@@ -452,6 +452,7 @@ static void i915_hangcheck_elapsed(struct work_struct *work)
 void intel_engine_init_hangcheck(struct intel_engine_cs *engine)
 {
        memset(&engine->hangcheck, 0, sizeof(engine->hangcheck));
+       engine->hangcheck.action_timestamp = jiffies;
 }
 
 void intel_hangcheck_init(struct drm_i915_private *i915)