Commit 4049866f authored by Matthew Auld's avatar Matthew Auld Committed by Chris Wilson

drm/i915/selftests: huge page tests

v2: mock test page support configurations and add MI_STORE_DWORD test

v3: run all mockable huge page tests on all platforms via the mock_device

v4: add pin_update regression test
    various improvements suggested by Chris

v5: fix issues reported by kbuild
    test single sg spanning multiple page sizes
    don't explode when running the live-tests through the appgtt

v6: lots of improvements from Chris

v7: run on each engine for igt_write_huge
    add simple tmpfs fallback test

v8: size_t is bad
    don't break the i386 build
Signed-off-by: default avatarMatthew Auld <matthew.auld@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20171006145041.21673-18-matthew.auld@intel.comSigned-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20171006221833.32439-17-chris@chris-wilson.co.uk
parent 7393b7ee
...@@ -5412,6 +5412,7 @@ int i915_gem_object_attach_phys(struct drm_i915_gem_object *obj, int align) ...@@ -5412,6 +5412,7 @@ int i915_gem_object_attach_phys(struct drm_i915_gem_object *obj, int align)
#include "selftests/scatterlist.c" #include "selftests/scatterlist.c"
#include "selftests/mock_gem_device.c" #include "selftests/mock_gem_device.c"
#include "selftests/huge_gem_object.c" #include "selftests/huge_gem_object.c"
#include "selftests/huge_pages.c"
#include "selftests/i915_gem_object.c" #include "selftests/i915_gem_object.c"
#include "selftests/i915_gem_coherency.c" #include "selftests/i915_gem_coherency.c"
#endif #endif
...@@ -196,6 +196,8 @@ struct drm_i915_gem_object { ...@@ -196,6 +196,8 @@ struct drm_i915_gem_object {
unsigned int gtt; unsigned int gtt;
} page_sizes; } page_sizes;
I915_SELFTEST_DECLARE(unsigned int page_mask);
struct i915_gem_object_page_iter { struct i915_gem_object_page_iter {
struct scatterlist *sg_pos; struct scatterlist *sg_pos;
unsigned int sg_idx; /* in pages, but 32bit eek! */ unsigned int sg_idx; /* in pages, but 32bit eek! */
......
This diff is collapsed.
...@@ -15,5 +15,6 @@ selftest(objects, i915_gem_object_live_selftests) ...@@ -15,5 +15,6 @@ selftest(objects, i915_gem_object_live_selftests)
selftest(dmabuf, i915_gem_dmabuf_live_selftests) selftest(dmabuf, i915_gem_dmabuf_live_selftests)
selftest(coherency, i915_gem_coherency_live_selftests) selftest(coherency, i915_gem_coherency_live_selftests)
selftest(gtt, i915_gem_gtt_live_selftests) selftest(gtt, i915_gem_gtt_live_selftests)
selftest(hugepages, i915_gem_huge_page_live_selftests)
selftest(contexts, i915_gem_context_live_selftests) selftest(contexts, i915_gem_context_live_selftests)
selftest(hangcheck, intel_hangcheck_live_selftests) selftest(hangcheck, intel_hangcheck_live_selftests)
...@@ -21,3 +21,4 @@ selftest(dmabuf, i915_gem_dmabuf_mock_selftests) ...@@ -21,3 +21,4 @@ selftest(dmabuf, i915_gem_dmabuf_mock_selftests)
selftest(vma, i915_vma_mock_selftests) selftest(vma, i915_vma_mock_selftests)
selftest(evict, i915_gem_evict_mock_selftests) selftest(evict, i915_gem_evict_mock_selftests)
selftest(gtt, i915_gem_gtt_mock_selftests) selftest(gtt, i915_gem_gtt_mock_selftests)
selftest(hugepages, i915_gem_huge_page_mock_selftests)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment