]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Filter out spurious execlists context-switch interrupts
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 23 Oct 2017 21:32:36 +0000 (22:32 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 24 Oct 2017 14:54:37 +0000 (15:54 +0100)
commitc9470644d399dc7d70d66f76c451b5994dd2572e
treeceaffe835882a83ed7d0c576e99cfd4eb52fcfd2
parent431e020bd08db1de4760907cbfdd5cd8b944d82b
drm/i915: Filter out spurious execlists context-switch interrupts

Back in commit 937ed5e0bd99 ("drm/i915: Don't mark an execlists
context-switch when idle") we noticed the presence of late
context-switch interrupts. We were able to filter those out by looking
at whether the ELSP remained active, but in commit 3bf8a38d2c99
("drm/i915/execlists: Preemption!") that became problematic as we now
anticipate receiving a context-switch event for preemption while ELSP
may be empty. To restore the spurious interrupt suppression, add a
counter for the expected number of pending context-switches and skip if
we do not need to handle this interrupt to make forward progress.

v2: Don't forget to switch on for preempt.
v3: Reduce the counter to a on/off boolean tracker. Declare the HW as
active when we first submit, and idle after the final completion event
(with which we confirm the HW says it is idle), and track each source
of activity separately. With a finite number of sources, it should aide
us in debugging which gets stuck.

Fixes: 3bf8a38d2c99 ("drm/i915/execlists: Preemption!")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171023213237.26536-3-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
drivers/gpu/drm/i915/i915_guc_submission.c
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/intel_engine_cs.c
drivers/gpu/drm/i915/intel_lrc.c
drivers/gpu/drm/i915/intel_ringbuffer.h