summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/gem_fenced_exec_thrash.c15
-rw-r--r--tests/gem_stress.c15
2 files changed, 4 insertions, 26 deletions
diff --git a/tests/gem_fenced_exec_thrash.c b/tests/gem_fenced_exec_thrash.c
index 58b2545b..125b77c8 100644
--- a/tests/gem_fenced_exec_thrash.c
+++ b/tests/gem_fenced_exec_thrash.c
@@ -84,18 +84,6 @@ batch_create (int fd)
return batch_handle;
}
-static int get_num_fences(int fd)
-{
- int val;
-
- val = gem_available_fences(fd);
-
- printf ("total %d fences\n", val);
- igt_assert(val > 4);
-
- return val;
-}
-
static void fill_reloc(struct drm_i915_gem_relocation_entry *reloc, uint32_t handle)
{
reloc->offset = 2 * sizeof(uint32_t);
@@ -165,7 +153,8 @@ main(int argc, char **argv)
igt_skip_on_simulation();
fd = drm_open_any();
- num_fences = get_num_fences(fd);
+ num_fences = gem_available_fences(fd);
+ igt_assert(num_fences > 4);
devid = intel_get_drm_devid(fd);
igt_assert(num_fences <= MAX_FENCES);
diff --git a/tests/gem_stress.c b/tests/gem_stress.c
index 74b34aea..dfbbf66a 100644
--- a/tests/gem_stress.c
+++ b/tests/gem_stress.c
@@ -603,18 +603,6 @@ static void copy_tiles(unsigned *permutation)
intel_batchbuffer_flush(batch);
}
-static int get_num_fences(void)
-{
- int val;
-
- val = gem_available_fences(drm_fd);
-
- printf ("total %d fences\n", val);
- igt_assert(val > 4);
-
- return val - 2;
-}
-
static void sanitize_tiles_per_buf(void)
{
if (options.tiles_per_buf > options.scratch_buf_size / TILE_BYTES(options.tile_size))
@@ -795,7 +783,8 @@ static void init(void)
bufmgr = drm_intel_bufmgr_gem_init(drm_fd, 4096);
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
drm_intel_bufmgr_gem_enable_fenced_relocs(bufmgr);
- num_fences = get_num_fences();
+ num_fences = gem_available_fences(drm_fd);
+ igt_assert(num_fences > 4);
batch = intel_batchbuffer_alloc(bufmgr, devid);
busy_bo = drm_intel_bo_alloc(bufmgr, "tiled bo", BUSY_BUF_SIZE, 4096);