mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-07-26 03:07:24 +00:00
igt/gem_exec_whisper: Add interruptibles tests
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
87cad37c78
commit
83cfed8c39
@ -107,6 +107,7 @@ static bool ignore_engine(int gen, unsigned engine)
|
||||
|
||||
#define CONTEXTS 0x1
|
||||
#define FDS 0x2
|
||||
#define INTERRUPTIBLE 0x4
|
||||
|
||||
static void whisper(int fd, unsigned engine, unsigned flags)
|
||||
{
|
||||
@ -214,6 +215,7 @@ static void whisper(int fd, unsigned engine, unsigned flags)
|
||||
gem_write(fd, batches[n].handle, 0, batch, sizeof(batch));
|
||||
}
|
||||
|
||||
igt_interruptible(flags & INTERRUPTIBLE) {
|
||||
for (pass = 0; pass < 1024; pass++) {
|
||||
uint64_t offset;
|
||||
|
||||
@ -316,6 +318,7 @@ static void whisper(int fd, unsigned engine, unsigned flags)
|
||||
store = tmp[1];
|
||||
scratch = tmp[0];
|
||||
}
|
||||
}
|
||||
igt_info("Number of migrations for execbuf: %d\n", eb_migrations);
|
||||
igt_info("Number of migrations for reloc: %d\n", reloc_migrations);
|
||||
|
||||
@ -337,28 +340,34 @@ static void whisper(int fd, unsigned engine, unsigned flags)
|
||||
|
||||
igt_main
|
||||
{
|
||||
const struct mode {
|
||||
const char *name;
|
||||
unsigned flags;
|
||||
} modes[] = {
|
||||
{ "", 0 },
|
||||
{ "contexts", CONTEXTS },
|
||||
{ "contexts-interruptible", CONTEXTS | INTERRUPTIBLE},
|
||||
{ "fds", FDS },
|
||||
{ "fds-interruptible", FDS | INTERRUPTIBLE},
|
||||
{ NULL }
|
||||
};
|
||||
int fd;
|
||||
|
||||
igt_fixture
|
||||
fd = drm_open_driver_master(DRIVER_INTEL);
|
||||
|
||||
igt_subtest("basic")
|
||||
whisper(fd, -1, 0);
|
||||
|
||||
igt_subtest("contexts")
|
||||
whisper(fd, -1, CONTEXTS);
|
||||
|
||||
igt_subtest("fds")
|
||||
whisper(fd, -1, FDS);
|
||||
for (const struct mode *m = modes; m->name; m++)
|
||||
igt_subtest_f("%s", *m->name ? m->name : "basic")
|
||||
whisper(fd, -1, m->flags);
|
||||
|
||||
for (const struct intel_execution_engine *e = intel_execution_engines;
|
||||
e->name; e++) {
|
||||
igt_subtest_f("normal-%s", e->name)
|
||||
whisper(fd, e->exec_id | e->flags, 0);
|
||||
igt_subtest_f("contexts-%s", e->name)
|
||||
whisper(fd, e->exec_id | e->flags, CONTEXTS);
|
||||
igt_subtest_f("fds-%s", e->name)
|
||||
whisper(fd, e->exec_id | e->flags, FDS);
|
||||
for (const struct mode *m = modes; m->name; m++)
|
||||
igt_subtest_f("%s%s%s",
|
||||
e->name,
|
||||
*m->name ? "-" : "",
|
||||
m->name)
|
||||
whisper(fd, e->exec_id | e->flags, m->flags);
|
||||
}
|
||||
|
||||
igt_fixture
|
||||
|
Loading…
x
Reference in New Issue
Block a user