OSDN Git Service

drm/i915/breadcrumbs: Keep the fake irq armed across reset
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 24 Apr 2018 14:29:45 +0000 (15:29 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 24 Apr 2018 16:11:36 +0000 (17:11 +0100)
commit36a501a199336fbf87299ebbe598d0af00922949
tree29406e4090d0a4588872aa236c84687a83e737b0
parenta3997159133d56e444f0c0f56ab1ae59863912a8
drm/i915/breadcrumbs: Keep the fake irq armed across reset

Instead of synchronously cancelling the timer and re-enabling it inside
the reset callbacks, keep the timer enabled and let it die on its next
wakeup if no longer required. This allows
intel_engine_reset_breadcrumbs() to be used from an atomic
(timer/softirq) context such as required for resetting an engine.

It also allows us to react better to the user poking around debugfs for
testing missed irqs.

v2: Tighten the order of del_timer_sync as the fake_irq timer
may trigger the hangcheck timer, and so we should cancel it first and
then cancel the hangcheck (Mika)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180424142945.6787-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_breadcrumbs.c