drm/i915: Keep track of request among the scheduling lists
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 16 Jan 2020 18:47:52 +0000 (18:47 +0000)
committerJani Nikula <jani.nikula@intel.com>
Wed, 12 Feb 2020 14:55:58 +0000 (16:55 +0200)
commit9e2750fc80b5cc606365201132d49fed00570dd1
treee75dd312fee6aaa6589a4ab40ebcc4400866df7e
parentcc3251d8ef6abb5ae7f75a5062dc4b05830571d2
drm/i915: Keep track of request among the scheduling lists

If we keep track of when the i915_request.sched.link is on the HW
runlist, or in the priority queue we can simplify our interactions with
the request (such as during rescheduling). This also simplifies the next
patch where we introduce a new in-between list, for requests that are
ready but neither on the run list or in the queue.

v2: Update i915_sched_node.link explanation for current usage where it
is a link on both the queue and on the runlists.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200116184754.2860848-1-chris@chris-wilson.co.uk
(cherry picked from commit 672c368f9398042b629740cc9816e8e939eff2db)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/gt/intel_lrc.c
drivers/gpu/drm/i915/i915_request.c
drivers/gpu/drm/i915/i915_request.h
drivers/gpu/drm/i915/i915_scheduler.c