summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-07-24 10:10:21 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2016-07-24 10:57:20 +0100
commitf527a38ee764f57a86ceedfc105f425e56392db4 (patch)
tree89599960b0d930007fd75b4a8290622889a287c1
parent2529d57050af51232fddbbe135fcc2a216182c5d (diff)
drm/i915: Update the breadcrumb interrupt counter before enabling
In order to close a race with a long running hangcheck comparing a stale interrupt counter with a just started waiter, we need to first bump the counter as we start the fresh wait. References: https://bugs.freedesktop.org/show_bug.cgi?id=96974 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1469351421-13493-2-git-send-email-chris@chris-wilson.co.uk
-rw-r--r--drivers/gpu/drm/i915/intel_breadcrumbs.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_breadcrumbs.c b/drivers/gpu/drm/i915/intel_breadcrumbs.c
index f0b56e3f4abe..d893ccdd62ac 100644
--- a/drivers/gpu/drm/i915/intel_breadcrumbs.c
+++ b/drivers/gpu/drm/i915/intel_breadcrumbs.c
@@ -51,6 +51,13 @@ static void irq_enable(struct intel_engine_cs *engine)
*/
engine->breadcrumbs.irq_posted = true;
+ /* Make sure the current hangcheck doesn't falsely accuse a just
+ * started irq handler from missing an interrupt (because the
+ * interrupt count still matches the stale value from when
+ * the irq handler was disabled, many hangchecks ago).
+ */
+ engine->breadcrumbs.irq_wakeups++;
+
spin_lock_irq(&engine->i915->irq_lock);
engine->irq_enable(engine);
spin_unlock_irq(&engine->i915->irq_lock);