diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-04-13 15:06:43 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-07-11 12:30:55 +0100 |
commit | be9296a1e1e4d288d4baee3aba89480f007dea6c (patch) | |
tree | 0846b79aee664a116092bc6f15efedf09729e9da /lib/igt_dummyload.c | |
parent | 4dc2ce0e362143d98cd2f95eea30b1173b861484 (diff) |
lib/dummyload: Control whether or not the batch is preemptible
Sometimes, we do not want to allow control to escape from the spinner,
e.g. for when we want to hang the GPU inside the batch.
(Split out from the preempt-timeout test case.)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
Diffstat (limited to 'lib/igt_dummyload.c')
-rw-r--r-- | lib/igt_dummyload.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/igt_dummyload.c b/lib/igt_dummyload.c index 7beb6624..2027a4b7 100644 --- a/lib/igt_dummyload.c +++ b/lib/igt_dummyload.c @@ -186,7 +186,8 @@ emit_recursive_batch(igt_spin_t *spin, spin->handle = obj[BATCH].handle; /* Allow ourselves to be preempted */ - *batch++ = MI_ARB_CHK; + if (!(opts->flags & IGT_SPIN_NO_PREEMPTION)) + *batch++ = MI_ARB_CHK; /* Pad with a few nops so that we do not completely hog the system. * @@ -379,8 +380,6 @@ void igt_spin_batch_end(igt_spin_t *spin) if (!spin) return; - igt_assert(*spin->batch == MI_ARB_CHK || - *spin->batch == MI_BATCH_BUFFER_END); *spin->batch = MI_BATCH_BUFFER_END; __sync_synchronize(); } |