drm/i915: Pin relocations for the duration of constructing the execbuffer
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 26 Nov 2013 11:23:15 +0000 (11:23 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 27 Nov 2013 08:04:36 +0000 (09:04 +0100)
commita415d355645ca5e8797235a76026ca2622ceefdb
tree75cf3f853d0b4f80ef4ae4e6e7332e3425aa4351
parent7c063c725987406d743cc7de7625ff224fab75de
drm/i915: Pin relocations for the duration of constructing the execbuffer

As the execbuffer dispatch grows ever more complex and involves multiple
stages of moving objects into the aperture, we need to take greater care
that we do not evict our execbuffer objects prior to dispatch. This is
relatively simple as we can just keep the objects pinned for not just
the relocation but until we are finished.

One such example is the possibility of the context switch causing an
eviction or hitting the shrinker in order to fit its object into the
aperture.

Link: http://lists.freedesktop.org/archives/intel-gfx/2013-November/036166.html
Reported-by: "Siluvery, Arun" <arun.siluvery@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ben Widawsky <benjamin.widawsky@intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: stable@vger.kernel.org
Acked-by: Ben Widawsky <ben@bwidawsk.net>
Tested-by: Ben Widawsky <ben@bwidawsk.net>
[danvet: Add the additional explanations from Chris to the commit
message.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem_execbuffer.c