diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-01-27 13:03:31 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-01-30 09:49:51 +0000 |
commit | 07e227a53baf29b8be1a31cea1f7cf72af18643c (patch) | |
tree | a96b5d923af828bbe72ca92084583bf09b3397f4 /tests/i915 | |
parent | a5211ea15c324f7789c0284a685dd2642d57b661 (diff) |
i915/gem_workarounds: Require GPU resets
Check that we are allowed to reset the GPU prior to execution.
v2: Push the require checking up into a subgroup
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'tests/i915')
-rw-r--r-- | tests/i915/gem_workarounds.c | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/tests/i915/gem_workarounds.c b/tests/i915/gem_workarounds.c index 78478ad2..44e3dce8 100644 --- a/tests/i915/gem_workarounds.c +++ b/tests/i915/gem_workarounds.c @@ -282,9 +282,32 @@ igt_main } for (op = ops; op->name; op++) { - for (m = modes; m->name; m++) { - igt_subtest_f("%s%s", op->name, m->name) - check_workarounds(device, op->op, m->flags); + igt_subtest_group { + igt_hang_t hang = {}; + + igt_fixture { + switch (op->op) { + case GPU_RESET: + hang = igt_allow_hang(device, 0, 0); + break; + default: + break; + } + } + + for (m = modes; m->name; m++) + igt_subtest_f("%s%s", op->name, m->name) + check_workarounds(device, op->op, m->flags); + + igt_fixture { + switch (op->op) { + case GPU_RESET: + igt_disallow_hang(device, hang); + break; + default: + break; + } + } } } } |