]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Shrink search list for active timelines
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 15 May 2018 14:31:49 +0000 (15:31 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 16 May 2018 06:32:10 +0000 (07:32 +0100)
commit2cca71c3c65de8b76ead26fee8855b7bd071ccf5
tree71757e711a9485b25e376c95a0249af06a9120d3
parentdf6a37b6362a877438b3b7f96aca389780f81efe
drm/i915: Shrink search list for active timelines

When switching to the kernel context, we force the switch to occur after
all currently active requests (so that we know the GPU won't switch
immediately away and the kernel context remains current as we work). To
do so we have to inspect all the timelines and add a fence from the
active work to queue our switch afterwards. We can use the tracked set
of active rings to shrink our search for active timelines.

v2: Use a local to shrink the list_for_each_entry()

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180515143149.4795-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_context.c