diff --git a/tests/intel/xe_create.c b/tests/intel/xe_create.c index 0a1b54ae4d..3c96ac8d90 100644 --- a/tests/intel/xe_create.c +++ b/tests/intel/xe_create.c @@ -418,7 +418,7 @@ static void create_massive_size(int fd) * Description: Verifies the creation of substantial BO while continuously * interrupted by signals. */ -static void create_big(int fd, int gt, bool interruptible) +static void create_big(int fd, int gt) { uint64_t bo_size, size, visible_avail_size, alignment; uint32_t bo_handle; @@ -430,6 +430,7 @@ static void create_big(int fd, int gt, bool interruptible) if (xe_has_vram(fd)) { visible_avail_size = xe_visible_available_vram_size(fd, gt); + igt_require(visible_avail_size); bo_size = params.quantity ? params.quantity * 1024ULL * 1024ULL : ALIGN_DOWN(visible_avail_size * params.percent / 100, alignment); igt_info("gt%u bo_size=%"PRIu64" visible_available_vram_size=%"PRIu64"\n", @@ -441,11 +442,9 @@ static void create_big(int fd, int gt, bool interruptible) } igt_require(bo_size); - if (interruptible) - igt_fork_signal_helper(); - - bo_handle = xe_bo_create(fd, vm, bo_size, vram_if_possible(fd, gt), - DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM); + bo_handle = xe_bo_create_caching(fd, vm, bo_size, vram_if_possible(fd, gt), + DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM, + DRM_XE_GEM_CPU_CACHING_WC); bo_ptr = xe_bo_map(fd, bo_handle, bo_size); size = bo_size - 1; @@ -457,9 +456,6 @@ static void create_big(int fd, int gt, bool interruptible) } igt_assert_eq(0, bo_ptr[0]); - if (interruptible) - igt_stop_signal_helper(); - munmap(bo_ptr, bo_size); gem_close(fd, bo_handle); xe_vm_destroy(fd, vm); @@ -604,20 +600,28 @@ int igt_main_args("Q:p:", NULL, help_str, opt_handler, NULL) xe_for_each_gt(xe, gt) igt_dynamic_f("gt%u", gt) - create_big(xe, gt, false); + create_big(xe, gt); } - igt_subtest_with_dynamic("create-big-bo-interruptible") { - int gt; + igt_subtest_group() { + igt_fixture() + igt_fork_signal_helper(); - if (xe_has_vram(xe)) { - xe_for_each_gt(xe, gt) - igt_dynamic_f("gt%u", gt) - create_big(xe, gt, true); - } else { - igt_dynamic("system") - create_big(xe, 0, true); + igt_subtest_with_dynamic("create-big-bo-interruptible") { + int gt; + + if (xe_has_vram(xe)) { + xe_for_each_gt(xe, gt) + igt_dynamic_f("gt%u", gt) + create_big(xe, gt); + } else { + igt_dynamic("system") + create_big(xe, 0); + } } + + igt_fixture() + igt_stop_signal_helper(); } igt_subtest("create-contexts") {