[Intel-gfx] [PATCH v2] tests/gem_storedw_batches_loop: add subtest for cached mappings

Imre Deak imre.deak at intel.com
Mon Jun 8 10:07:29 PDT 2015


v2:
- add a subtest for uncached mappings too for LLC platforms where the
  default is cached mapping (Chris)

Signed-off-by: Imre Deak <imre.deak at intel.com>
---
 tests/gem_storedw_batches_loop.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/tests/gem_storedw_batches_loop.c b/tests/gem_storedw_batches_loop.c
index dcc11a5..348f7e2 100644
--- a/tests/gem_storedw_batches_loop.c
+++ b/tests/gem_storedw_batches_loop.c
@@ -169,6 +169,27 @@ igt_main
 		store_dword_loop(5, SECURE_DISPATCH);
 	}
 
+	igt_subtest("cached-mapping") {
+		gem_set_caching(fd, target_bo->handle, 1);
+		store_dword_loop(1, 0);
+		store_dword_loop(2, 0);
+		store_dword_loop(3, 0);
+		store_dword_loop(5, 0);
+	}
+
+	igt_subtest("uncached-mapping") {
+		/*
+		 * On non-LLC platforms the default is non-cached, so on those
+		 * "normal" has covered already this case.
+		 */
+		igt_require(gem_has_llc(fd));
+		gem_set_caching(fd, target_bo->handle, 0);
+		store_dword_loop(1, 0);
+		store_dword_loop(2, 0);
+		store_dword_loop(3, 0);
+		store_dword_loop(5, 0);
+	}
+
 	igt_fixture {
 		drm_intel_bo_unreference(target_bo);
 		drm_intel_bufmgr_destroy(bufmgr);
-- 
2.1.4



More information about the Intel-gfx mailing list