• C
    drm/i915: Filter out spurious execlists context-switch interrupts · 5d266692
    Chris Wilson 提交于
    Back in commit a4b2b015 ("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 beecec90
    ("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: beecec90 ("drm/i915/execlists: Preemption!")
    Signed-off-by: NChris 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.ukReviewed-by: NMika Kuoppala <mika.kuoppala@linux.intel.com>
    (cherry picked from commit 4a118ecb)
    Signed-off-by: NJani Nikula <jani.nikula@intel.com>
    5d266692
intel_ringbuffer.h 28.4 KB