diff options
author | Kamil Konieczny <kamil.konieczny@linux.intel.com> | 2022-02-02 15:13:11 +0100 |
---|---|---|
committer | Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> | 2022-02-02 19:13:31 +0100 |
commit | 9cd99d763440ae75d9981ce4e361d3deb5edb4e4 (patch) | |
tree | fbd164189abf979b1cbc06d4884c746def822e18 /lib/igt_core.c | |
parent | f31f9ca3d81440e955e3963f9d91f54fa6c3c09f (diff) |
lib/intel_batchbuffer: add tracking and reset for allocator
After subtest ends, due to normal flow or after fail by
igt_assert, igt_core inits intel_allocator before next subtest,
and this makes allocator handle keeped in intel_batchbuffer
invalid. Moreover any call to intel_allocator can result in
fail as there are no allocators until first allocator_open.
Add tracking intel_butchbuffer if it is using allocator and
recreate its allocator handle and offsets from igt_core before
next subtest.
Add flag for turn on tracking and a helper function for it with
default value off. It will not change behaviour of already used
tests. Use case is for standalone runs with many subtests like
gem_concurrent_blit.
v2: add tracking flag with default off (Zbigniew)
v3: add and correct functions descriptions (Zbigniew)
Signed-off-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Diffstat (limited to 'lib/igt_core.c')
-rw-r--r-- | lib/igt_core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/igt_core.c b/lib/igt_core.c index 7c906675..ab27a24d 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -59,6 +59,7 @@ #include "drmtest.h" #include "intel_allocator.h" +#include "intel_batchbuffer.h" #include "intel_chipset.h" #include "intel_io.h" #include "igt_debugfs.h" @@ -1426,6 +1427,7 @@ __noreturn static void exit_subtest(const char *result) * remnants from previous allocator run (if any). */ intel_allocator_init(); + intel_bb_reinit_allocator(); if (!in_dynamic_subtest) _igt_dynamic_tests_executed = -1; |