drm/i915/evict: Always switch away from the current context
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 15 Jul 2016 13:56:19 +0000 (14:56 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 15 Jul 2016 19:40:53 +0000 (20:40 +0100)
commit945657b461ed27621ec6d3ca2f1b9880b34843bd
tree603ba1105acef3c26f990ab5a37ddb42b7570a3f
parent6bc265424df02f8162f4a17a37e4982e1c64460e
drm/i915/evict: Always switch away from the current context

Currently execlists is exempt from emitting a request to switch each
ring away from the current context over to the dev_priv->kernel_context
(for whatever reason, just under execlists the GGTT is unlikely to be as
fragmented, however the switch may help in some extreme cases). Extract
the switcher and enable it for execlsts as well, as we need to do so in
a later patch to force the context switch before suspend. (And since for
that switch we explicitly require the disposable kernel context, rename
the extracted function.)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1468590980-6186-1-git-send-email-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem_context.c
drivers/gpu/drm/i915/i915_gem_evict.c