]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Export a function to flush the context upon pinning
authorChris Wilson <chris@chris-wilson.co.uk>
Sun, 30 Oct 2016 13:28:20 +0000 (13:28 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 1 Nov 2016 14:26:33 +0000 (14:26 +0000)
commitabe03555128b1ed8a6a5516ce45a5dab6f7a5d33
tree12e52acad3a19aa735f91596f3909c94fc727826
parent7c66f4743c6b25cb3698665c5b8ef81968cd83e8
drm/i915: Export a function to flush the context upon pinning

For legacy contexts we employ an optimisation to only flush the context
when binding into the global GTT. This avoids stalling on the GPU when
reloading an active context. Wrap this detail up into a helper and
export it for a potential third user. (Longer term, context pinning
needs to be reworked as the current handling of switch context pins too
late and so risks eviction and corrupting the request. Plans, plans,
plans.)

v2: Expand the comment explaining the optimisation for avoiding the
stall on active contexts.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20161030132820.32163-1-chris@chris-wilson.co.uk
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem_context.c
drivers/gpu/drm/i915/intel_ringbuffer.c