diff options
| author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-08-12 16:10:49 +0100 |
|---|---|---|
| committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-08-13 16:13:31 +0100 |
| commit | d62008b45c735c32c5e52dd14c5ad2a4ba57feb5 (patch) | |
| tree | 932490c613d141e7f2047ce9802ed2d0db0982d5 /tests | |
| parent | 5716e280f4c55be3da3e5fe285070c0fd7638202 (diff) | |
i915/gem_eio: Restrict number of batches of submitted
Make sure we don't block while setting up the stress case before the
reset by only submitting less batches than would fill the ring.
References: https://bugs.freedesktop.org/show_bug.cgi?id=111379
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Andi Shyti <andi.shyti@intel.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/i915/gem_eio.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c index dcbcefa9..9b086a03 100644 --- a/tests/i915/gem_eio.c +++ b/tests/i915/gem_eio.c @@ -734,6 +734,11 @@ static void reset_stress(int fd, uint32_t ctx0, .flags = engine, }; igt_stats_t stats; + int max; + + max = gem_measure_ring_inflight(fd, engine, 0); + max = max / 2 - 1; /* assume !execlists and a shared ring */ + igt_require(max > 0); gem_write(fd, obj.handle, 0, &bbe, sizeof(bbe)); @@ -755,11 +760,11 @@ static void reset_stress(int fd, uint32_t ctx0, hang = spin_sync(fd, ctx0, engine); execbuf.rsvd1 = ctx; - for (i = 0; i < 10; i++) + for (i = 0; i < max; i++) gem_execbuf(fd, &execbuf); execbuf.rsvd1 = ctx0; - for (i = 0; i < 10; i++) + for (i = 0; i < max; i++) gem_execbuf(fd, &execbuf); /* Wedge after a small delay. */ @@ -777,11 +782,11 @@ static void reset_stress(int fd, uint32_t ctx0, * both contexts. */ execbuf.rsvd1 = ctx; - for (i = 0; i < 5; i++) + for (i = 0; i < max; i++) gem_execbuf(fd, &execbuf); execbuf.rsvd1 = ctx0; - for (i = 0; i < 5; i++) + for (i = 0; i < max; i++) gem_execbuf(fd, &execbuf); gem_sync(fd, obj.handle); |
