drm/i915: Skip unbinding large unmappable global buffers
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 13 Oct 2016 08:55:04 +0000 (09:55 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 13 Oct 2016 14:47:47 +0000 (15:47 +0100)
commitad16d2ed8fa80e7f4f0d0da32129ed2c9caca3b4
treed15e12f05b39e22ce0068b317b1e0a916bab6ccf
parent06392e3b21a20e66b668cd58d28f6b8ff920ef17
drm/i915: Skip unbinding large unmappable global buffers

If the user requests a mappable binding to the global GTT, we will first
unbind an existing mapping if it doesn't match. We will unbind even if
there is no possibility that the object can fit in the mappable
aperture. This may lead to a ping-pong migration of the object, for
example igt/gem_exec_big.

v2: Comment upon the reasoning, or lack thereof!, behind the choice of
magic numbers.

Testcase: igt/gem_exec_big
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20161013085504.30705-1-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com
drivers/gpu/drm/i915/i915_gem.c