From cf73a1f241542dadb49ae2c6d491c725218a68e8 Mon Sep 17 00:00:00 2001 From: Ben Widawsky Date: Wed, 24 Apr 2013 18:50:01 -0700 Subject: [PATCH] gem_storedw_loop_vebox: Modernize test to look like blitter Signed-off-by: Ben Widawsky --- tests/gem_storedw_loop_vebox.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/gem_storedw_loop_vebox.c b/tests/gem_storedw_loop_vebox.c index 718826a..2e8836d 100644 --- a/tests/gem_storedw_loop_vebox.c +++ b/tests/gem_storedw_loop_vebox.c @@ -53,7 +53,7 @@ static int has_ppgtt = 0; */ static void -store_dword_loop(void) +store_dword_loop(int divider) { int cmd, i, val = 0; uint32_t *buf; @@ -62,7 +62,7 @@ store_dword_loop(void) if (!has_ppgtt) cmd |= MI_MEM_VIRTUAL; - for (i = 0; i < 0x100000; i++) { + for (i = 0; i < SLOW_QUICK(0x100000, 0x10); i++) { BEGIN_BATCH(4); OUT_BATCH(cmd); OUT_BATCH(0); /* reserved */ @@ -73,6 +73,9 @@ store_dword_loop(void) intel_batchbuffer_flush_on_ring(batch, LOCAL_I915_EXEC_VEBOX); + if (i % divider != 0) + goto cont; + drm_intel_bo_map(target_buffer, 0); buf = target_buffer->virtual; @@ -85,6 +88,7 @@ store_dword_loop(void) drm_intel_bo_unmap(target_buffer); +cont: val++; } @@ -141,7 +145,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_buffer); intel_batchbuffer_free(batch); -- 2.7.4