Skip to contentSkip to conversation

Add gem_seqno_wrap test

PATCH In review Mika Kuoppala 2 participants 3 messages Dec 3, 2012 – Dec 4, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add gem_seqno_wrap test

This test uses debugfs entry to set next_seqno close to a wrapping point and then creates a load with dependant buffer objects or with specified command to induce the wrap.

---
 tests/Makefile.am      |    1 +
 tests/gem_seqno_wrap.c |  581 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 582 insertions(+)
 create mode 100644 tests/gem_seqno_wrap.c
tests/Makefile.am +1 -0
index d0c3451..bb3b705 100644
@@ -50,6 +50,7 @@ TESTS_progs = \
 	gem_linear_blits \
 	gem_vmap_blits \
 	gem_threaded_access_tiled \
+	gem_seqno_wrap \
 	gem_tiled_blits \
 	gem_tiled_fence_blits \
 	gem_largeobject \
tests/gem_seqno_wrap.c new file +581 -0

581 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 6 lines · Mika Kuoppala

This test uses debugfs entry to set next_seqno close to a wrapping point and then creates a load with dependant buffer objects or with specified command to induce the wrap.

---

[snip]

Quoted 24 lines
tests/gem_seqno_wrap.c new file +24 -0
+static void render_copyfunc(struct scratch_buf *src,
+			    struct scratch_buf *dst,
+			    int width,
+			    int height)
+{
+	const int src_x = 0, src_y = 0, dst_x = 0, dst_y = 0;
+
+	if (IS_GEN2(devid))
+		gen2_render_copyfunc(batch_3d,
+				     src, src_x, src_y,
+				     width, height,
+				     dst, dst_x, dst_y);
+	else if (IS_GEN3(devid))
+		gen3_render_copyfunc(batch_3d,
+				     src, src_x, src_y,
+				     width, height,
+				     dst, dst_x, dst_y);
+	else if (IS_GEN6(devid))
+		gen6_render_copyfunc(batch_3d,
+				     src, src_x, src_y,
+				     width, height,
+				     dst, dst_x, dst_y);
+	else if (IS_GEN7(devid))
+		gen7_render_copyfunc(batch_3d,

tests/gem_seqno_wrap.c line 174

Quoted 10 lines
tests/gem_seqno_wrap.c new file +10 -0
+				     src, src_x, src_y,
+				     width, height,
+				     dst, dst_x, dst_y);
+	else {
+		printf("No render copy found for this gen, test is shallow\n");
+		intel_copy_bo(batch_blt, dst->bo, src->bo, width, height);
+	}
+
+	intel_batchbuffer_flush(batch_3d);
+}

Can you please use the new get_rendercpy_func added in

commit 64f669f7a94d459437a4dd47142ef2bb9870c5e6

Author: Daniel Vetter <[email protected]>
Date:   Thu Nov 29 14:59:57 2012 +0100

lib: extract get_render_copyfunc

That way the test will just work when we add new rendercpy support. -Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#2 lore raw

PATCH 1/1 tests: add gem_seqno_wrap

This test uses debugfs entry to set next_seqno close to a wrapping point and then creates a load with dependant buffer objects or with specified command to induce the wrap.

v2: Use new get_rendercpy_func as suggested by Daniel Vetter.

---
 tests/Makefile.am      |    1 +
 tests/gem_seqno_wrap.c |  567 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 568 insertions(+)
 create mode 100644 tests/gem_seqno_wrap.c
tests/Makefile.am +1 -0
index f725fc9..18f7148 100644
@@ -50,6 +50,7 @@ TESTS_progs = \
 	gem_linear_blits \
 	gem_vmap_blits \
 	gem_threaded_access_tiled \
+	gem_seqno_wrap \
 	gem_tiled_blits \
 	gem_tiled_fence_blits \
 	gem_largeobject \
tests/gem_seqno_wrap.c new file +567 -0

567 lines not on this page · raw message

Signature · 1 line
1.7.9.5