diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-08-05 12:28:44 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-08-05 12:31:36 +0100 |
commit | 37657f5251f0f08d4e06618834be52480b2455f5 (patch) | |
tree | 8d4e6edfaea6800347af71c9c3693a2d638e6e31 /tests | |
parent | b9e2db934b262fe541e4800854f320bce59b34de (diff) |
igt/drv_missed_irq: Coordinate child/parent
In the child, make sure the parent is about to sleep before allowing the
GPU to complete. In theory, we are created as an inferior process on the
same CPU and the scheduler shouldn't be executing the child before the
parent, but seems to anyway.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/drv_missed_irq.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/drv_missed_irq.c b/tests/drv_missed_irq.c index d0d9b391..795f3f4e 100644 --- a/tests/drv_missed_irq.c +++ b/tests/drv_missed_irq.c @@ -72,6 +72,7 @@ static void trigger_missed_interrupt(int fd, unsigned ring) reloc.delta = 1; } } + batch[1000] = 1; memset(&execbuf, 0, sizeof(execbuf)); execbuf.buffers_ptr = (uintptr_t)&obj; @@ -87,10 +88,14 @@ static void trigger_missed_interrupt(int fd, unsigned ring) * parent. We will have to wait for our parent to sleep * (gem_sync -> i915_wait_request) before we run. */ + while (*((volatile uint32_t *)batch + 1000)) + ; + *batch = MI_BATCH_BUFFER_END; __sync_synchronize(); } + batch[1000] = 0; gem_sync(fd, obj.handle); igt_waitchildren(); |