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)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 16 Jan 2020 19:56:15 +0000 (19:56 +0000)
commit672c368f9398042b629740cc9816e8e939eff2db
treea9b50ca588eaf98148d410781cd271bf70bc1787
parent9e83713a721b185774e32879b85f0b2ea615936b
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
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