diff options
author | Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> | 2022-03-11 13:13:13 +0100 |
---|---|---|
committer | Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> | 2022-03-11 18:00:51 +0100 |
commit | 891f0126992812afdb72db8f4dc0bf675223d0cb (patch) | |
tree | 17d19ded1c4e857c476e6a3db456abf30e921135 /lib/igt_core.c | |
parent | c253caee9b776333a46268d85fbdf0feb79c8094 (diff) |
lib/i915/gem_create: Introduce gem-pool bo cache
Handling batchbuffers with softpin requires tracking its state otherwise
we can write to inflight batchbuffer and encounter gpu hang. Gem pool
adds such tracking (similar to libdrm bo cache) and provides free and
ready to use bo. If pool has no free bo new one is created what means pool
can be growing during test execution. When test completes freeing buffers
and memory is called from igt_core so no additional cleanup is necessary.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.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 f2c701de..6dad3c84 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -58,6 +58,7 @@ #include <glib.h> #include "drmtest.h" +#include "i915/gem_create.h" #include "intel_allocator.h" #include "intel_batchbuffer.h" #include "intel_chipset.h" @@ -1428,6 +1429,7 @@ __noreturn static void exit_subtest(const char *result) */ intel_allocator_init(); intel_bb_reinit_allocator(); + gem_pool_init(); if (!in_dynamic_subtest) _igt_dynamic_tests_executed = -1; |