drm/i915/gt: Use virtual_engine during execlists_dequeue
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 24 Dec 2020 13:55:37 +0000 (13:55 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 24 Dec 2020 15:02:37 +0000 (15:02 +0000)
commit64b7a3fa7e3e629bc8cb56cef457c0e374303ed1
tree21317518389ba638b5cdacc1795e904a1c556a51
parent16f2941ad3078cac9c9ad69f3205fe4619f49edf
drm/i915/gt: Use virtual_engine during execlists_dequeue

Rather than going back and forth between the rb_node entry and the
virtual_engine type, store the ve local and reuse it. As the
container_of conversion from rb_node to virtual_engine requires a
variable offset, performing that conversion just once shaves off a bit
of code.

v2: Keep a single virtual engine lookup, for typical use.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201224135544.1713-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_execlists_submission.c