drm/i915: Immediately execute the fenced work
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 25 Mar 2020 12:02:27 +0000 (12:02 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 25 Mar 2020 13:05:04 +0000 (13:05 +0000)
commit92581f9fb99ca46941bdf869b8984ce61c085434
tree64cec5ff2187f1345a5bc2b3eff1893a12e4e2fb
parent6670b413f8452ec303efcd2f9a6009c8602a297e
drm/i915: Immediately execute the fenced work

If the caller allows and we do not have to wait for any signals,
immediately execute the work within the caller's process. By doing so we
avoid the overhead of scheduling a new task, and the latency in
executing it, at the cost of pulling that work back into the immediate
context. (Sometimes we still prefer to offload the task to another cpu,
especially if we plan on executing many such tasks in parallel for this
client.)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200325120227.8044-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
drivers/gpu/drm/i915/i915_sw_fence_work.c
drivers/gpu/drm/i915/i915_sw_fence_work.h
drivers/gpu/drm/i915/i915_vma.c