mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-10 09:26:10 +00:00
tests/gem_fenced_exec_thrash: New subtests that uses all fences
igt runs under the assumption that nothing else (besides maybe fbcon) is using the gpu. So we should be able to use all fences. Keep the conservative testcase around though in case someone has a broken setup. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
14e12b8008
commit
7b3634364a
@ -27,6 +27,7 @@ TESTS_progs_M = \
|
||||
gem_evict_everything \
|
||||
gem_exec_bad_domains \
|
||||
gem_exec_nop \
|
||||
gem_fenced_exec_thrash \
|
||||
gem_fence_thrash \
|
||||
gem_flink \
|
||||
gem_flink_race \
|
||||
@ -74,7 +75,6 @@ TESTS_progs = \
|
||||
gem_exec_blt \
|
||||
gem_exec_faulting_reloc \
|
||||
gem_exec_lut_handle \
|
||||
gem_fenced_exec_thrash \
|
||||
gem_gtt_cpu_tlb \
|
||||
gem_gtt_speed \
|
||||
gem_hangcheck_forcewake \
|
||||
|
@ -143,26 +143,35 @@ static void run_test(int fd, int num_fences, int expected_errno)
|
||||
} while (--loop);
|
||||
}
|
||||
|
||||
int fd;
|
||||
int num_fences;
|
||||
uint32_t devid;
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int fd;
|
||||
int num_fences;
|
||||
uint32_t devid;
|
||||
igt_subtest_init(argc, argv);
|
||||
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
num_fences = gem_available_fences(fd);
|
||||
igt_assert(num_fences > 4);
|
||||
devid = intel_get_drm_devid(fd);
|
||||
igt_fixture {
|
||||
fd = drm_open_any();
|
||||
num_fences = gem_available_fences(fd);
|
||||
igt_assert(num_fences > 4);
|
||||
devid = intel_get_drm_devid(fd);
|
||||
|
||||
igt_assert(num_fences <= MAX_FENCES);
|
||||
igt_assert(num_fences <= MAX_FENCES);
|
||||
}
|
||||
|
||||
run_test(fd, num_fences - 2, 0);
|
||||
run_test(fd, num_fences + 1, intel_gen(devid) >= 4 ? 0 : EDEADLK);
|
||||
igt_subtest("2-spare-fences")
|
||||
run_test(fd, num_fences - 2, 0);
|
||||
igt_subtest("no-spare-fences")
|
||||
run_test(fd, num_fences, 0);
|
||||
igt_subtest("too-many-fences")
|
||||
run_test(fd, num_fences + 1, intel_gen(devid) >= 4 ? 0 : EDEADLK);
|
||||
|
||||
close(fd);
|
||||
igt_fixture
|
||||
close(fd);
|
||||
|
||||
return 0;
|
||||
igt_exit();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user