]> git.proxmox.com Git - mirror_ubuntu-eoan-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)
commit07c9a21a0d594c3acc0983e5e0a25d2364188d51
tree12e52acad3a19aa735f91596f3909c94fc727826
parent03af79e0b801fa5ea817f71a22a932d4b5b62b4b
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