mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-23 07:46:15 +00:00
tests/*: scrap get_num_fences
Just use gem_available_fences directly. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
deba868066
commit
14e12b8008
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user