• Chris Wilson's avatar
    drm/i915: Spin after waking up for an interrupt · f69a02c9
    Chris Wilson authored
    When waiting for an interrupt (waiting for the engine to complete some
    work), we know we are the only waiter to be woken on this engine. We also
    know when the GPU has nearly completed our request (or at least started
    processing it), so after being woken and we detect that the GPU is
    active and working on our request, allow us the bottom-half (the first
    waiter who wakes up to handle checking the seqno after the interrupt) to
    spin for a very short while to reduce client latencies.
    
    The impact is minimal, there was an improvement to the realtime-vs-many
    clients case, but exporting the function proves useful later. However,
    it is tempting to adjust irq_seqno_barrier to include the spin. The
    problem is first ensuring that the "start-of-request" seqno is coherent
    as we use that as our basis for judging when it is ok to spin. If we
    could, spinning there could dramatically shorten some sleeps, and allow
    us to make the barriers more conservative to handle missed seqno writes
    on more platforms (all gen7+ are known to have the occasional issue, at
    least).
    Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
    Link: http://patchwork.freedesktop.org/patch/msgid/1467390209-3576-7-git-send-email-chris@chris-wilson.co.uk
    f69a02c9
i915_gem.c 143 KB