mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-07 16:06:25 +00:00
igt/gem_storedw_loop: Use common array of rings
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
01acd70762
commit
b09ef449af
@ -145,6 +145,7 @@ store_dword_loop(int fd, int ring, int count, int divider)
|
|||||||
static void
|
static void
|
||||||
store_test(int fd, int ring, int count)
|
store_test(int fd, int ring, int count)
|
||||||
{
|
{
|
||||||
|
gem_require_ring(fd, ring);
|
||||||
store_dword_loop(fd, ring, count, 1);
|
store_dword_loop(fd, ring, count, 1);
|
||||||
store_dword_loop(fd, ring, count, 2);
|
store_dword_loop(fd, ring, count, 2);
|
||||||
if (!igt_run_in_simulation()) {
|
if (!igt_run_in_simulation()) {
|
||||||
@ -158,16 +159,6 @@ store_test(int fd, int ring, int count)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ring {
|
|
||||||
const char *name;
|
|
||||||
int id;
|
|
||||||
} rings[] = {
|
|
||||||
{ "bsd", I915_EXEC_BSD },
|
|
||||||
{ "render", I915_EXEC_RENDER },
|
|
||||||
{ "blt", I915_EXEC_BLT },
|
|
||||||
{ "vebox", I915_EXEC_VEBOX },
|
|
||||||
};
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
check_test_requirements(int fd, int ringid)
|
check_test_requirements(int fd, int ringid)
|
||||||
{
|
{
|
||||||
@ -178,7 +169,8 @@ check_test_requirements(int fd, int ringid)
|
|||||||
|
|
||||||
igt_main
|
igt_main
|
||||||
{
|
{
|
||||||
int fd, i;
|
const struct intel_execution_engine *e;
|
||||||
|
int fd;
|
||||||
|
|
||||||
igt_fixture {
|
igt_fixture {
|
||||||
fd = drm_open_driver(DRIVER_INTEL);
|
fd = drm_open_driver(DRIVER_INTEL);
|
||||||
@ -192,16 +184,15 @@ igt_main
|
|||||||
igt_require(gem_uses_ppgtt(fd));
|
igt_require(gem_uses_ppgtt(fd));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(rings); i++) {
|
for (e = intel_execution_engines; e->name; e++) {
|
||||||
|
igt_subtest_f("basic-%s", e->name) {
|
||||||
igt_subtest_f("basic-%s", rings[i].name) {
|
check_test_requirements(fd, e->exec_id);
|
||||||
check_test_requirements(fd, rings[i].id);
|
store_test(fd, e->exec_id | e->flags, 16*1024);
|
||||||
store_test(fd, rings[i].id, 16*1024);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
igt_subtest_f("long-%s", rings[i].name) {
|
igt_subtest_f("long-%s", e->name) {
|
||||||
check_test_requirements(fd, rings[i].id);
|
check_test_requirements(fd, e->exec_id);
|
||||||
store_test(fd, rings[i].id, 1024*1024);
|
store_test(fd, e->exec_id | e->flags, 1024*1024);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user