[PATCH] tests/gem_tiled_swapping: Skip on L-shaped memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 tests/gem_tiled_swapping.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/tests/gem_tiled_swapping.c b/tests/gem_tiled_swapping.c
index 69d1cfae94d2..0839df00151e 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"
 
 #define WIDTH 512
 #define HEIGHT 512
@@ -143,6 +144,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_simple_main
 {
 	struct thread *threads;
@@ -162,6 +182,8 @@ igt_simple_main
 	threads = calloc(num_threads, sizeof(struct thread));
 	igt_assert(threads);
 
+	check_memory_layout();
+
 	igt_log(IGT_LOG_INFO,
 		"Using %d 1MiB objects (available RAM: %ld/%ld, swap: %ld)\n",
 		count,
-- 
1.8.4.rc3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux