]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drm/i915: Skip switch to kernel context if already done
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 29 Dec 2016 14:40:37 +0000 (14:40 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 16 Jan 2017 12:21:20 +0000 (12:21 +0000)
commitf131e3562ef0e0aa418eeb60a8fd562c5b9b0122
tree46c67788de336dc3fe65fc6c2daa3e2936e10fdc
parent6ffb7d0756e34427a39f6ffdf861fe93b49fc0e8
drm/i915: Skip switch to kernel context if already done

Some engines are never user or already sitting idle in the kernel
context and for those we can skip flushing the current context for
i915_gem_switch_to_kernel_context(). We used to perform this
optimisation but that was removed for convenience of converting over to
multiple timelines and handling the pending request queues.

From the perspective of writing selftests, reducing the number of
background operations on the engines makes defining assertions easier.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20170114162334.10271-2-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_context.c