• Chris Wilson's avatar
    drm/i915/scheduler: emulate a scheduler for guc · 31de7350
    Chris Wilson authored
    This emulates execlists on top of the GuC in order to defer submission of
    requests to the hardware. This deferral allows time for high priority
    requests to gazump their way to the head of the queue, however it nerfs
    the GuC by converting it back into a simple execlist (where the CPU has
    to wake up after every request to feed new commands into the GuC).
    
    v2: Drop hack status - though iirc there is still a lockdep inversion
    between fence and engine->timeline->lock (which is impossible as the
    nesting only occurs on different fences - hopefully just requires some
    judicious lockdep annotation)
    v3: Apply lockdep nesting to enabling signaling on the request, using
    the pattern we already have in __i915_gem_request_submit();
    v4: Replaying requests after a hang also now needs the timeline
    spinlock, to disable the interrupts at least
    v5: Hold wq lock for completeness, and emit a tracepoint for enabling signal
    v6: Reorder interrupt checking for a happier gcc.
    v7: Only signal the tasklet after a user-interrupt if using guc scheduling
    v8: Restore lost update of rq through the i915_guc_irq_handler (Tvrtko)
    v9: Avoid re-initialising the engine->irq_tasklet from inside a reset
    v10: Hook up the execlists-style tracepoints
    v11: Clear the execlists irq_posted bit after taking over the interrupt/tasklet
    Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
    Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
    Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
    Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
    Link: http://patchwork.freedesktop.org/patch/msgid/20170316125619.6856-1-chris@chris-wilson.co.ukReviewed-by: default avatarMichał Winiarski <michal.winiarski@intel.com>
    31de7350
intel_lrc.c 61.1 KB