summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_selftest.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-02-13 20:15:44 +0300
committerChris Wilson <chris@chris-wilson.co.uk>2017-02-13 23:46:32 +0300
commitaae4a3d811753d3f79c43c932b8f7d1bcbf42fb0 (patch)
treef68b0859db6065d9ad2b23df503606df3ac1787d /drivers/gpu/drm/i915/i915_selftest.h
parent4a6f13fce1331df68e1fc7dd4eb0c0b461d5f845 (diff)
downloadlinux-aae4a3d811753d3f79c43c932b8f7d1bcbf42fb0.tar.xz
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>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_selftest.h')
-rw-r--r--drivers/gpu/drm/i915/i915_selftest.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_selftest.h b/drivers/gpu/drm/i915/i915_selftest.h
index e43777b72211..9d7d86f1733d 100644
--- a/drivers/gpu/drm/i915/i915_selftest.h
+++ b/drivers/gpu/drm/i915/i915_selftest.h
@@ -36,6 +36,8 @@ struct i915_selftest {
};
#if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
+#include <linux/fault-inject.h>
+
extern struct i915_selftest i915_selftest;
int i915_mock_selftests(void);