diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-08-08 09:48:03 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-08-08 10:21:34 +0100 |
commit | 7e5abbe4d9b2129bbbf02be77a70cad3da2ab941 (patch) | |
tree | 4fa10393141be8164f3e899e562385cd71863283 /tests/gem_eio.c | |
parent | 5d78c73d871525ec9caecd88ad7d9abe36637314 (diff) |
igt/gem_eio: Apply reset-stress to each engine
A simple question as to whether the error only occurs on rcs/hsw, or all.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Diffstat (limited to 'tests/gem_eio.c')
-rw-r--r-- | tests/gem_eio.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/tests/gem_eio.c b/tests/gem_eio.c index 9d608e83..de161332 100644 --- a/tests/gem_eio.c +++ b/tests/gem_eio.c @@ -646,13 +646,10 @@ static void test_inflight_internal(int fd, unsigned int wait) close(fd); } -/* - * Verify that we can submit and execute work after unwedging the GPU. - */ -static void test_reset_stress(int fd, unsigned int flags) +static void reset_stress(int fd, + uint32_t ctx0, unsigned int engine, + unsigned int flags) { - uint32_t ctx0 = context_create_safe(fd); - igt_until_timeout(5) { struct drm_i915_gem_execbuffer2 execbuf = { }; struct drm_i915_gem_exec_object2 obj = { }; @@ -672,7 +669,7 @@ static void test_reset_stress(int fd, unsigned int flags) * Start executing a spin batch with some queued batches * against a different context after it. */ - hang = spin_sync(fd, ctx0, 0); + hang = spin_sync(fd, ctx0, engine); obj.handle = gem_create(fd, 4096); gem_write(fd, obj.handle, 0, &bbe, sizeof(bbe)); @@ -680,6 +677,7 @@ static void test_reset_stress(int fd, unsigned int flags) execbuf.buffers_ptr = to_user_pointer(&obj); execbuf.buffer_count = 1; execbuf.rsvd1 = ctx0; + execbuf.flags = engine; for (i = 0; i < 10; i++) gem_execbuf(fd, &execbuf); @@ -710,6 +708,18 @@ static void test_reset_stress(int fd, unsigned int flags) gem_context_destroy(fd, ctx); gem_close(fd, obj.handle); } +} + +/* + * Verify that we can submit and execute work after unwedging the GPU. + */ +static void test_reset_stress(int fd, unsigned int flags) +{ + uint32_t ctx0 = context_create_safe(fd); + unsigned int engine; + + for_each_engine(fd, engine) + reset_stress(fd, ctx0, engine, flags); gem_context_destroy(fd, ctx0); } |