Skip to contentSkip to conversation

test cases for the new ring on Haswell

PATCH In review Xiang, Haihao 2 participants 5 messages Nov 14, 2012 – Nov 15, 2012 Library code

lore
Share & tools
lore
#0 lore raw

cover test cases for the new ring on Haswell

From: "Xiang, Haihao" <[email protected]>

Xiang, Haihao (2):
tests: storedw on VEBOX
Update gem_ring_sync_loop to support VEBOX ring (the 4th ring) on
Haswell

 lib/intel_chipset.h            |    2 +
 tests/Makefile.am              |    1 +
 tests/gem_ring_sync_loop.c     |   18 ++++-
 tests/gem_storedw_loop_vebox.c |  153 ++++++++++++++++++++++++++++++++++++++++
 4 files changed, 171 insertions(+), 3 deletions(-)
 create mode 100644 tests/gem_storedw_loop_vebox.c
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/2 tests: storedw on VEBOX

From: "Xiang, Haihao" <[email protected]>

---
 lib/intel_chipset.h            |    2 +
 tests/Makefile.am              |    1 +
 tests/gem_storedw_loop_vebox.c |  153 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 156 insertions(+)
 create mode 100644 tests/gem_storedw_loop_vebox.c
lib/intel_chipset.h +2 -0
index 9dd4c94..0433a75 100755
@@ -268,3 +268,5 @@
 
 #define IS_CRESTLINE(devid)	(devid == PCI_CHIP_I965_GM || \
 				 devid == PCI_CHIP_I965_GME)
+
+#define HAS_VEBOX_RING(devid)   (IS_HASWELL(devid))
tests/Makefile.am +1 -0
index d4c7c46..9a0e509 100644
@@ -58,6 +58,7 @@ TESTS_progs = \
 	gem_storedw_loop_render \
 	gem_storedw_loop_blt \
 	gem_storedw_loop_bsd \
+	gem_storedw_loop_vebox \
 	gem_storedw_batches_loop \
 	gem_dummy_reloc_loop \
 	gem_double_irq_loop \
tests/gem_storedw_loop_vebox.c new file +153 -0

153 lines not on this page · raw message

Signature · 6 lines
1.7.9.5

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

PATCH 2/2 Update gem_ring_sync_loop to support VEBOX ring (the 4th ring) on Haswell

In reply to Xiang, Haihao

From: "Xiang, Haihao" <[email protected]>

---
 tests/gem_ring_sync_loop.c |   18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)
tests/gem_ring_sync_loop.c +15 -3
index b689bcd..199dcfd 100644
@@ -56,14 +56,26 @@ static drm_intel_bo *target_buffer;
 #define MI_DO_COMPARE			(1<<21)
 
 static void
-store_dword_loop(void)
+store_dword_loop(int devid)
 {
 	int i;
+	int num_rings = 3;
 
 	srandom(0xdeadbeef);
 
+	if (IS_HASWELL(devid))
+		num_rings = 4;
+	else if (IS_IVYBRIDGE(devid) || IS_GEN6(devid))
+		num_rings = 3;
+	else if (IS_GEN5(devid) || IS_G4X(devid))
+		num_rings = 2;
+	else
+		num_rings = 1;
+
+        fprintf(stderr, "The number of rings: %d\n", num_rings);
+
 	for (i = 0; i < 0x100000; i++) {
-		int ring = random() % 3 + 1;
+		int ring = random() % num_rings + 1;
 
 		if (ring == I915_EXEC_RENDER) {
 			BEGIN_BATCH(4);
@@ -127,7 +139,7 @@ int main(int argc, char **argv)
 		exit(-1);
 	}
 
-	store_dword_loop();
+	store_dword_loop(devid);
 
 	drm_intel_bo_unreference(target_buffer);
 	intel_batchbuffer_free(batch);
Signature · 1 line
1.7.9.5
#3 lore raw
In reply to Xiang, Haihao
Quoted 6 lines · Haihao

From: "Xiang, Haihao" <[email protected]>

Xiang, Haihao (2):
tests: storedw on VEBOX
Update gem_ring_sync_loop to support VEBOX ring (the 4th ring) on
Haswell

Should be using the GET_PARAM to determine support for the various rings.
-Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
#4 lore raw
Quoted 10 lines · Chris Wilson
Quoted 6 lines · Haihao

From: "Xiang, Haihao" <[email protected]>

Xiang, Haihao (2):
tests: storedw on VEBOX
Update gem_ring_sync_loop to support VEBOX ring (the 4th ring) on
Haswell

Should be using the GET_PARAM to determine support for the various rings.

Thanks for your comment, I split it into 2 patches: one is to check the the rings supported by drm/i915, another is to test the new ring.

Thanks
Haihao

Quoted 1 line