summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-11-18 14:39:14 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-03-02 10:41:23 +0100
commit5e4fc0c48c9a44689ec1593f356a8f22e1ca6bb8 (patch)
treea6950b55daeea38bf855d76fda7c45bf2088d3f3
parentf26d8a04c3938845d4db07cf6587b29e287dc2dc (diff)
tests/gem_tiled_swapping: Skip on L-shaped memory
The only thing the kernel can do is pin the buffers, which essentially means no swapped tiled objects. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
-rw-r--r--tests/gem_tiled_swapping.c22
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);