Lines Matching refs:bo
37 void (*close)(int fd, uint32_t bo);
40 void (*clear)(int fd, uint32_t bo, uint64_t size);
63 uint32_t *bo, *sel; in minor_evictions() local
78 bo = malloc((nr_surfaces + total_surfaces)*sizeof(*bo)); in minor_evictions()
79 igt_assert(bo); in minor_evictions()
82 bo[n] = ops->create(fd, surface_size); in minor_evictions()
84 sel = bo + n; in minor_evictions()
89 sel[n] = bo[m%total_surfaces]; in minor_evictions()
93 ret = ops->copy(fd, bo[0], bo[0], bo, total_surfaces); in minor_evictions()
98 ops->close(fd, bo[n]); in minor_evictions()
99 free(bo); in minor_evictions()
108 uint32_t *bo; in major_evictions() local
113 bo = malloc(nr_surfaces*sizeof(*bo)); in major_evictions()
114 igt_assert(bo); in major_evictions()
117 bo[n] = ops->create(fd, surface_size); in major_evictions()
121 ret = ops->copy(fd, bo[n], bo[n], &bo[n], 1); in major_evictions()
126 ops->close(fd, bo[n]); in major_evictions()
127 free(bo); in major_evictions()
150 uint32_t *bo; in mlocked_evictions() local
155 bo = malloc(surface_count * sizeof(*bo)); in mlocked_evictions()
156 igt_assert(bo); in mlocked_evictions()
157 lock -= ALIGN(surface_count * sizeof(*bo), 4096); in mlocked_evictions()
166 bo[n] = ops->create(fd, surface_size); in mlocked_evictions()
169 igt_permute_array(bo, surface_count, exchange_uint32_t); in mlocked_evictions()
170 ret = ops->copy(fd, bo[0], bo[1], bo, surface_count-n); in mlocked_evictions()
186 ops->close(fd, bo[n]); in mlocked_evictions()
198 uint32_t *bo; in swapping_evictions() local
209 bo = malloc(trash_surfaces*sizeof(*bo)); in swapping_evictions()
210 igt_assert(bo); in swapping_evictions()
213 bo[n] = ops->create(fd, surface_size); in swapping_evictions()
216 igt_permute_array(bo, trash_surfaces, exchange_uint32_t); in swapping_evictions()
219 ret = ops->copy(fd, bo[0], bo[1], bo, working_surfaces); in swapping_evictions()
225 ops->close(fd, bo[n]); in swapping_evictions()
226 free(bo); in swapping_evictions()
239 uint32_t *bo; in forking_evictions() local
255 bo = malloc(bo_count*sizeof(*bo)); in forking_evictions()
256 igt_assert(bo); in forking_evictions()
259 bo[n] = ops->create(fd, surface_size); in forking_evictions()
271 igt_permute_array(bo, bo_count, exchange_uint32_t); in forking_evictions()
278 uint32_t handle = bo[l]; in forking_evictions()
279 uint32_t flink = gem_flink(fd, bo[l]); in forking_evictions()
281 bo[l] = gem_open(realfd, flink); in forking_evictions()
283 ops->flink(handle, bo[l]); in forking_evictions()
288 ret = ops->copy(realfd, bo[0], bo[1], bo, working_surfaces); in forking_evictions()
294 ops->clear(realfd, bo[l], surface_size); in forking_evictions()
309 ops->close(fd, bo[n]); in forking_evictions()
310 free(bo); in forking_evictions()