diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-12-18 11:45:30 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-12-18 11:49:11 +0000 |
commit | 9f389d00cf83248fa31f626a5a4a3f5ac7c07a75 (patch) | |
tree | 975f0ed257334b4131b5381912a995b0f3586e48 /tests/gem_ctx_thrash.c | |
parent | 14c661599b0a9af9169779b9ffcffa4bbbb7bb3d (diff) |
igt/gem_ctx_thrash: Boost workloads
Now that we are no longer busy-spinning inside random(), we can spend
more time exercising i915.ko
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_ctx_thrash.c')
-rw-r--r-- | tests/gem_ctx_thrash.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/gem_ctx_thrash.c b/tests/gem_ctx_thrash.c index 1f8bb6cc..aecbc567 100644 --- a/tests/gem_ctx_thrash.c +++ b/tests/gem_ctx_thrash.c @@ -98,17 +98,17 @@ static void *thread(void *bufmgr) struct igt_buf src, dst; src.bo = bo[b % num_bo]; - src.stride = 4; + src.stride = 64; src.size = OBJECT_SIZE; src.tiling = I915_TILING_NONE; dst.bo = bo[(b+1) % num_bo]; - dst.stride = 4; + dst.stride = 64; dst.size = OBJECT_SIZE; dst.tiling = I915_TILING_NONE; render_copy(batch, ctx[c % num_ctx], - &src, 0, 0, 1, 1, &dst, 0, 0); + &src, 0, 0, 16, 16, &dst, 0, 0); } } @@ -171,11 +171,11 @@ processes(void) all_fds[n] = reopen(fd); if (all_fds[n] == -1) { int err = errno; - while (n--) - close(all_fds[n]); + for (int i = n; i--; ) + close(all_fds[i]); free(all_fds); errno = err; - igt_assert(0); + igt_assert_f(0, "failed to create context %d/%d\n", n, num_ctx); } } @@ -200,18 +200,18 @@ processes(void) src.bo = drm_intel_bo_alloc(bufmgr, "", obj_size, 0); igt_assert(src.bo); - src.stride = 4; + src.stride = 64; src.size = obj_size; src.tiling = I915_TILING_NONE; dst.bo = drm_intel_bo_alloc(bufmgr, "", obj_size, 0); igt_assert(dst.bo); - dst.stride = 4; + dst.stride = 64; dst.size = obj_size; dst.tiling = I915_TILING_NONE; render_copy(batch, NULL, - &src, 0, 0, 1, 1, &dst, 0, 0); + &src, 0, 0, 16, 16, &dst, 0, 0); intel_batchbuffer_free(batch); drm_intel_bo_unreference(src.bo); @@ -276,8 +276,8 @@ threads(void) igt_assert(all_bo[n]); } - ctx_per_thread = 5 * num_ctx / NUM_THREADS / 4; - bo_per_ctx = 2 * num_bo / ctx_per_thread; + ctx_per_thread = 3 * num_ctx / NUM_THREADS / 2; + bo_per_ctx = 3 * num_bo / NUM_THREADS / 2; for (n = 0; n < NUM_THREADS; n++) pthread_create(&threads[n], NULL, thread, bufmgr); |