Skip to contentSkip to conversation

tests/gem_storedw_batches_loop: add subtest for cached mappings

PATCH Superseded Imre Deak 2 participants 5 messages Jun 8, 2015

lore
Share & tools
lore

Imre Deak

author
#0 lore raw

PATCH 1/1 tests/gem_storedw_batches_loop: add subtest for cached mappings

---
 tests/gem_storedw_batches_loop.c | 8 ++++++++
 1 file changed, 8 insertions(+)
tests/gem_storedw_batches_loop.c +8 -0
index dcc11a5..8706b80 100644
@@ -169,6 +169,14 @@ 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_fixture {
 		drm_intel_bo_unreference(target_bo);
 		drm_intel_bufmgr_destroy(bufmgr);
Signature · 6 lines
2.1.4

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 10 lines · Imre Deak
---
 tests/gem_storedw_batches_loop.c | 8 ++++++++
 1 file changed, 8 insertions(+)
tests/gem_storedw_batches_loop.c +0 -0
index dcc11a5..8706b80 100644

tests/gem_storedw_batches_loop.c igt_main · line 178

Quoted 10 lines
tests/gem_storedw_batches_loop.c +7 -0
@@ -169,6 +169,14 @@ 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);
+	}

You probably want to also test uncached on llc as when then, i.e. 3 loops, one for default, one for cache-mapping one for uncached-mapping -Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
author
#2 lore raw

PATCH v2 1/1 tests/gem_storedw_batches_loop: add subtest for cached mappings

In reply to Imre Deak

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

---
 tests/gem_storedw_batches_loop.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
tests/gem_storedw_batches_loop.c +21 -0
index dcc11a5..348f7e2 100644
@@ -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);
Signature · 6 lines
2.1.4

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw
Quoted 21 lines · Imre Deak

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

---
 tests/gem_storedw_batches_loop.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
tests/gem_storedw_batches_loop.c +4 -0
index dcc11a5..348f7e2 100644
@@ -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);

tests/gem_storedw_batches_loop.c igt_main · line 185

Quoted 10 lines
tests/gem_storedw_batches_loop.c +10 -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));

I wouldn't bother with the SKIP. Since there is a nice bit of interplay here with multiple calls to gem_set_caching() that may uncover a bug. -Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
author
#4 lore raw
Quoted 27 lines · Chris Wilson
Quoted 26 lines · Imre Deak

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

---
 tests/gem_storedw_batches_loop.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
tests/gem_storedw_batches_loop.c +9 -0
index dcc11a5..348f7e2 100644
@@ -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") {
Quoted 8 lines

tests/gem_storedw_batches_loop.c igt_main · line 185

Quoted 5 lines
tests/gem_storedw_batches_loop.c +5 -0
+		/*
+		 * On non-LLC platforms the default is non-cached, so on those
+		 * "normal" has covered already this case.
+		 */
+		igt_require(gem_has_llc(fd));

I wouldn't bother with the SKIP. Since there is a nice bit of interplay here with multiple calls to gem_set_caching() that may uncover a bug.

Ok, I'll remove the skip.

--Imre

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx