diff options
Diffstat (limited to 'tests/gem_tiled_swapping.c')
-rw-r--r-- | tests/gem_tiled_swapping.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/gem_tiled_swapping.c b/tests/gem_tiled_swapping.c index 16566be0..2361dfcf 100644 --- a/tests/gem_tiled_swapping.c +++ b/tests/gem_tiled_swapping.c @@ -61,6 +61,7 @@ #include "drmtest.h" #include "intel_io.h" #include "igt_aux.h" +#include "igt_debugfs.h" IGT_TEST_DESCRIPTION("Exercise swizzle code for swapping."); @@ -158,6 +159,25 @@ static void thread_fini(struct thread *t) free(t->idx_arr); } +static void check_memory_layout(void) +{ + FILE *tiling_debugfs_file; + char *line = NULL; + size_t sz = 0; + + tiling_debugfs_file = igt_debugfs_fopen("i915_swizzle_info", "r"); + igt_assert(tiling_debugfs_file); + + while (getline(&line, &sz, tiling_debugfs_file) > 0) { + if (strstr(line, "L-shaped") != 0) + continue; + + igt_skip("L-shaped memory configuration detected\n"); + } + + igt_debug("normal memory configuration detected, continuing\n"); +} + igt_main { struct thread *threads; @@ -172,6 +192,8 @@ igt_main fd = drm_open_any(); + check_memory_layout(); + /* lock RAM, leaving only 512MB available */ lock_size = max(0, intel_get_total_ram_mb() - AVAIL_RAM); igt_lock_mem(lock_size); |