diff options
| author | Chris Wilson <chris@chris-wilson.co.uk> | 2020-05-26 14:56:45 +0100 |
|---|---|---|
| committer | Chris Wilson <chris@chris-wilson.co.uk> | 2020-05-26 21:15:17 +0100 |
| commit | b59bf9e6a2d94515b5ddae0ca7210a3bfa5b6e13 (patch) | |
| tree | b3464b01e110ce24073b5a4e3812683b31b20366 /tests | |
| parent | 92bfb188fac1a45dca8254d64ddf5b6d5eaec9e2 (diff) | |
i915/gem_busy: Mask out the effect of GPU relocations
If we use GPU relocations, then we will mark the batch as being written
to by the GPU. This can be any engine, and so may perturb the reported
busyness. Take this into account before reporting an error.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/i915/gem_busy.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/i915/gem_busy.c b/tests/i915/gem_busy.c index 9e28e2a9..a3cff23f 100644 --- a/tests/i915/gem_busy.c +++ b/tests/i915/gem_busy.c @@ -195,7 +195,20 @@ static void one(int fd, const struct intel_execution_engine2 *e, unsigned test_f igt_assert_eq(write[WRITE], 1 + e->class); igt_assert_eq_u32(read[WRITE], 1 << e->class); - igt_assert_eq(write[READ], 0); + /* + * We do not expect the batch to be in a modified state, but + * if we are using GPU relocations then it will indeed be marked + * as written to by the GPU. We may use any engine to update the + * relocations. + * + * If we just used CPU relocations, we could + * igt_assert_eq(write[READ], 0); + * since we do not, we have to massage the busyness to remove the trace + * of GPU relocation. + */ + if (write[READ] && write[READ] != 1 + e->class) + /* Inter-engine GPU relocation! */ + read[READ] &= ~(1 << (write[READ] - 1)); igt_assert_eq_u32(read[READ], 1 << e->class); /* Calling busy in a loop should be enough to flush the rendering */ |
