]> git.ipfire.org Git - people/arne_f/kernel.git/commit - drivers/gpu/drm/i915/i915_gem_gtt.c
drm/i915: Use fault-injection to force the shrinker to run in live GTT tests
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 13 Feb 2017 17:15:44 +0000 (17:15 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 13 Feb 2017 20:46:32 +0000 (20:46 +0000)
commitaae4a3d811753d3f79c43c932b8f7d1bcbf42fb0
treef68b0859db6065d9ad2b23df503606df3ac1787d
parent4a6f13fce1331df68e1fc7dd4eb0c0b461d5f845
drm/i915: Use fault-injection to force the shrinker to run in live GTT tests

It is possible whilst allocating the page-directory tree for a ppgtt
bind that the shrinker may run and reap unused parts of the tree. If the
shrinker happens to remove a chunk of the tree that the
allocate_va_range has already processed, we may then try to insert into
the dangling tree. This test uses the fault-injection framework to force
the shrinker to be invoked before we allocate new pages, i.e. new chunks
of the PD tree.

References: https://bugs.freedesktop.org/show_bug.cgi?id=99295
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
drivers/gpu/drm/i915/Kconfig.debug
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/i915_selftest.h
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c