mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-13 02:46:23 +00:00
igt/gem_exec_flush: Add interruptible testing
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
16c9edb464
commit
805a05caae
@ -32,6 +32,7 @@ IGT_TEST_DESCRIPTION("Basic check of flushing after batches");
|
|||||||
#define WRITE 2
|
#define WRITE 2
|
||||||
#define KERNEL 4
|
#define KERNEL 4
|
||||||
#define SET_DOMAIN 8
|
#define SET_DOMAIN 8
|
||||||
|
#define INTERRUPTIBLE 16
|
||||||
|
|
||||||
static void run(int fd, unsigned ring, int nchild, int timeout,
|
static void run(int fd, unsigned ring, int nchild, int timeout,
|
||||||
unsigned flags)
|
unsigned flags)
|
||||||
@ -160,10 +161,11 @@ static void run(int fd, unsigned ring, int nchild, int timeout,
|
|||||||
|
|
||||||
gem_execbuf(fd, &execbuf);
|
gem_execbuf(fd, &execbuf);
|
||||||
|
|
||||||
|
igt_interruptible(flags & INTERRUPTIBLE) {
|
||||||
if (flags & SET_DOMAIN) {
|
if (flags & SET_DOMAIN) {
|
||||||
gem_set_domain(fd, obj[0].handle,
|
gem_set_domain(fd, obj[0].handle,
|
||||||
I915_GEM_DOMAIN_GTT,
|
I915_GEM_DOMAIN_GTT,
|
||||||
flags & WRITE ? I915_GEM_DOMAIN_GTT : 0);
|
(flags & WRITE) ? I915_GEM_DOMAIN_GTT : 0);
|
||||||
|
|
||||||
if (xor)
|
if (xor)
|
||||||
igt_assert_eq_u32(map[i], i ^ 0xffffffff);
|
igt_assert_eq_u32(map[i], i ^ 0xffffffff);
|
||||||
@ -206,6 +208,7 @@ static void run(int fd, unsigned ring, int nchild, int timeout,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
igt_info("Child[%d]: %lu cycles\n", child, cycles);
|
igt_info("Child[%d]: %lu cycles\n", child, cycles);
|
||||||
|
|
||||||
gem_close(fd, obj[2].handle);
|
gem_close(fd, obj[2].handle);
|
||||||
@ -263,12 +266,26 @@ igt_main
|
|||||||
run(fd, ring, ncpus, timeout,
|
run(fd, ring, ncpus, timeout,
|
||||||
UNCACHED | m->flags);
|
UNCACHED | m->flags);
|
||||||
|
|
||||||
|
igt_subtest_f("%suc-%s-%s-interruptible",
|
||||||
|
e->exec_id == 0 ? "basic-" : "",
|
||||||
|
m->name,
|
||||||
|
e->name)
|
||||||
|
run(fd, ring, ncpus, timeout,
|
||||||
|
UNCACHED | m->flags | INTERRUPTIBLE);
|
||||||
|
|
||||||
igt_subtest_f("%swb-%s-%s",
|
igt_subtest_f("%swb-%s-%s",
|
||||||
e->exec_id == 0 ? "basic-" : "",
|
e->exec_id == 0 ? "basic-" : "",
|
||||||
m->name,
|
m->name,
|
||||||
e->name)
|
e->name)
|
||||||
run(fd, ring, ncpus, timeout,
|
run(fd, ring, ncpus, timeout,
|
||||||
COHERENT | m->flags);
|
COHERENT | m->flags);
|
||||||
|
|
||||||
|
igt_subtest_f("%swb-%s-%s-interruptible",
|
||||||
|
e->exec_id == 0 ? "basic-" : "",
|
||||||
|
m->name,
|
||||||
|
e->name)
|
||||||
|
run(fd, ring, ncpus, timeout,
|
||||||
|
COHERENT | m->flags | INTERRUPTIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user