gem_ring_sync_copy: Add a ring to ring synchronization test
PATCH 1/1 gem_ring_sync_copy: Add a ring to ring synchronization test
The goal of this test is to ensure that we respect inter ring dependencies. A more detailed description of what it tests is in a comment.
The tests relies on having a blit function for the ring, so is currently only checking synchronization between the render and blitter ring.
Signed-off-by Damien Lespiau <[email protected]>
--- tests/.gitignore | 1 + tests/Makefile.sources | 1 + tests/gem_ring_sync_copy.c | 367 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 369 insertions(+) create mode 100644 tests/gem_ring_sync_copy.c
tests/.gitignore +1 -0
@@ -70,6 +70,7 @@ gem_render_linear_blits gem_render_tiled_blits gem_reset_stats gem_ringfill +gem_ring_sync_copy gem_ring_sync_loop gem_seqno_wrap gem_set_tiling_vs_blt
tests/Makefile.sources +1 -0
@@ -99,6 +99,7 @@ TESTS_progs = \ gem_render_copy \ gem_render_linear_blits \ gem_render_tiled_blits \ + gem_ring_sync_copy \ gem_ring_sync_loop \ gem_seqno_wrap \ gem_set_tiling_vs_gtt \
tests/gem_ring_sync_copy.c new file +367 -0
367 lines not on this page · raw message
Signature · 6 lines
1.8.3.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
tests/gem_ring_sync_copy.c line 296
Quoted 12 lines · Damien Lespiau
tests/gem_ring_sync_copy.c new file +12
-0+static void run_test (data_t *data,enum ring r1,enum ring r2,enum test test) +{ +struct ring_ops *r1_ops = &ops[r1]; +struct ring_ops *r2_ops = &ops[r2]; +drm_intel_bo *a, *b, *c; + + a =bo_create (data,WIDTH ,HEIGHT ,0xa ); + b =bo_create (data,WIDTH ,HEIGHT ,0xb ); + c =bo_create (data,WIDTH ,HEIGHT ,0xc ); + + r1_ops->busy (data); + r2_ops->copy (data, a, b);
^^ r1
tests/gem_ring_sync_copy.c line 300
Quoted 4 lines
tests/gem_ring_sync_copy.c new file +4
-0+ +switch (test) { +case TEST_WRITE_READ : + r2_ops->copy (data, b, c);
^^
Review
Quoted 2 lines
(quoted diff) +2
-0+ bo_check(data, c, 0xa); + break;
Turns out I was copying a to b on r2, and then b to c still on r2. So no inter-ring dependencies in that workload. Ooops.
Pushed an updated patch that copy a to b on r1 and then b to c on r2 and verified that short-circuiting the semaphores breaks the test indeed.
Signature · 1 line
Damien