diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2020-01-26 13:41:17 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2020-01-28 10:06:10 +0000 |
commit | 004b7ccce8a6fc76f89344afc0a65e2dfe61e317 (patch) | |
tree | 427d34be827ca15b47668f921c4d193949de8e11 /tests/i915/gem_busy.c | |
parent | 0ecbff50d72538b5e548fc6dd48a07173e9f8b42 (diff) |
i915: Inject invalid CS into hanging spinners
Some spinners are used with the intent of never ending and being
declared hung by the kernel. In some cases, these are being used to
simulate invalid payloads and so we can use an invalid command to
trigger a GPU hang. (Other cases, they are simulating infinite workloads
that truly never end, but we still need to be able to curtail to provide
multi-tasking). This patch adds IGT_SPIN_INVALID_CS to request the
injection of 0xdeadbeef into the command stream that should trigger a
GPU hang.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Diffstat (limited to 'tests/i915/gem_busy.c')
-rw-r--r-- | tests/i915/gem_busy.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/i915/gem_busy.c b/tests/i915/gem_busy.c index 39a6714c..2f1b04e3 100644 --- a/tests/i915/gem_busy.c +++ b/tests/i915/gem_busy.c @@ -436,7 +436,8 @@ static void basic(int fd, const struct intel_execution_engine2 *e, unsigned flag igt_spin_t *spin = igt_spin_new(fd, .engine = e->flags, - .flags = IGT_SPIN_NO_PREEMPTION); + .flags = IGT_SPIN_NO_PREEMPTION | + (flags & HANG ? IGT_SPIN_INVALID_CS : 0)); struct timespec tv; int timeout; bool busy; |