diff options
| author | Chris Wilson <chris@chris-wilson.co.uk> | 2020-04-09 09:28:47 +0100 |
|---|---|---|
| committer | Chris Wilson <chris@chris-wilson.co.uk> | 2020-04-09 09:35:44 +0100 |
| commit | 67b4ccf188ada3bd91b9ed16b2ad2b98adf48d09 (patch) | |
| tree | 3e4470162058fb50a0b63f68b5e3cf0933a05a75 /lib | |
| parent | e03bdc72bcd8c234650b92ec42a61257797f4e5b (diff) | |
i915/gem_wait: Warn if the test completes before the spinner times out
Check that our threaded timer to expire the igt_spin_t does fire!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/igt_dummyload.c | 3 | ||||
| -rw-r--r-- | lib/igt_dummyload.h | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/igt_dummyload.c b/lib/igt_dummyload.c index d5f622cf..9221db51 100644 --- a/lib/igt_dummyload.c +++ b/lib/igt_dummyload.c @@ -464,6 +464,8 @@ void igt_spin_reset(igt_spin_t *spin) *spin->condition = spin->cmd_precondition; __sync_synchronize(); + + memset(&spin->last_signal, 0, sizeof(spin->last_signal)); } /** @@ -477,6 +479,7 @@ void igt_spin_end(igt_spin_t *spin) if (!spin) return; + igt_gettime(&spin->last_signal); *spin->condition = MI_BATCH_BUFFER_END; __sync_synchronize(); } diff --git a/lib/igt_dummyload.h b/lib/igt_dummyload.h index dfba123c..aac0c83a 100644 --- a/lib/igt_dummyload.h +++ b/lib/igt_dummyload.h @@ -34,13 +34,15 @@ typedef struct igt_spin { unsigned int handle; - int timerfd; - pthread_t timer_thread; struct igt_list_head link; uint32_t *condition; uint32_t cmd_precondition; + struct timespec last_signal; + pthread_t timer_thread; + int timerfd; + int out_fence; struct drm_i915_gem_exec_object2 obj[2]; #define IGT_SPIN_BATCH 1 |
