summaryrefslogtreecommitdiff
path: root/tests/gem_storedw_batches_loop.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-10-04 13:22:16 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-10-04 13:22:16 +0200
commit1422c22e8909b189bb7cc67ee1ee403c5bd81d08 (patch)
treeeb306bd02c5f0e1d5140831a72b4126028e8ae7e /tests/gem_storedw_batches_loop.c
parent826326bc7c464c7297687a82d03da83922555ca1 (diff)
tests/*storedw*: add subcases with more outstanding batches
Just in case this is better at hitting seqno signalling races ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/gem_storedw_batches_loop.c')
-rw-r--r--tests/gem_storedw_batches_loop.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/gem_storedw_batches_loop.c b/tests/gem_storedw_batches_loop.c
index 8cf5f719..576e5645 100644
--- a/tests/gem_storedw_batches_loop.c
+++ b/tests/gem_storedw_batches_loop.c
@@ -48,12 +48,14 @@ static int has_ppgtt = 0;
/* Like the store dword test, but we create new command buffers each time */
static void
-store_dword_loop(void)
+store_dword_loop(int div)
{
int cmd, i, val = 0, ret;
uint32_t *buf;
drm_intel_bo *cmd_bo;
+ printf("running storedw loop with stall every %i batch\n", div);
+
cmd = MI_STORE_DWORD_IMM;
if (!has_ppgtt)
cmd |= MI_MEM_VIRTUAL;
@@ -104,6 +106,9 @@ store_dword_loop(void)
exit(-1);
}
+ if (i % div != 0)
+ goto cont;
+
drm_intel_bo_wait_rendering(cmd_bo);
drm_intel_bo_map(target_bo, 1);
@@ -118,6 +123,7 @@ store_dword_loop(void)
buf[0] = 0; /* let batch write it again */
drm_intel_bo_unmap(target_bo);
+cont:
drm_intel_bo_unreference(cmd_bo);
val++;
@@ -162,7 +168,10 @@ int main(int argc, char **argv)
exit(-1);
}
- store_dword_loop();
+ store_dword_loop(1);
+ store_dword_loop(2);
+ store_dword_loop(3);
+ store_dword_loop(5);
drm_intel_bo_unreference(target_bo);
drm_intel_bufmgr_destroy(bufmgr);