Lines Matching refs:boi
61 static int bo_wait(struct radeon_bo_int *boi);
124 static void bo_ref(struct radeon_bo_int *boi) in bo_ref() argument
128 static struct radeon_bo *bo_unref(struct radeon_bo_int *boi) in bo_unref() argument
130 struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem*)boi; in bo_unref()
133 if (boi->cref) { in bo_unref()
134 return (struct radeon_bo *)boi; in bo_unref()
137 drm_munmap(bo_gem->priv_ptr, boi->size); in bo_unref()
144 args.handle = boi->handle; in bo_unref()
145 drmIoctl(boi->bom->fd, DRM_IOCTL_GEM_CLOSE, &args); in bo_unref()
151 static int bo_map(struct radeon_bo_int *boi, int write) in bo_map() argument
153 struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem*)boi; in bo_map()
165 boi->ptr = NULL; in bo_map()
169 args.handle = boi->handle; in bo_map()
171 args.size = (uint64_t)boi->size; in bo_map()
172 r = drmCommandWriteRead(boi->bom->fd, in bo_map()
178 boi, boi->handle, r); in bo_map()
181 ptr = drm_mmap(0, args.size, PROT_READ|PROT_WRITE, MAP_SHARED, boi->bom->fd, args.addr_ptr); in bo_map()
186 boi->ptr = bo_gem->priv_ptr; in bo_map()
187 r = bo_wait(boi); in bo_map()
193 static int bo_unmap(struct radeon_bo_int *boi) in bo_unmap() argument
195 struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem*)boi; in bo_unmap()
201 boi->ptr = NULL; in bo_unmap()
205 static int bo_wait(struct radeon_bo_int *boi) in bo_wait() argument
212 args.handle = boi->handle; in bo_wait()
214 ret = drmCommandWrite(boi->bom->fd, DRM_RADEON_GEM_WAIT_IDLE, in bo_wait()
220 static int bo_is_busy(struct radeon_bo_int *boi, uint32_t *domain) in bo_is_busy() argument
225 args.handle = boi->handle; in bo_is_busy()
228 ret = drmCommandWriteRead(boi->bom->fd, DRM_RADEON_GEM_BUSY, in bo_is_busy()
235 static int bo_set_tiling(struct radeon_bo_int *boi, uint32_t tiling_flags, in bo_set_tiling() argument
241 args.handle = boi->handle; in bo_set_tiling()
245 r = drmCommandWriteRead(boi->bom->fd, in bo_set_tiling()
252 static int bo_get_tiling(struct radeon_bo_int *boi, uint32_t *tiling_flags, in bo_get_tiling() argument
258 args.handle = boi->handle; in bo_get_tiling()
260 r = drmCommandWriteRead(boi->bom->fd, in bo_get_tiling()
328 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; in radeon_gem_get_kernel_name() local
337 r = drmIoctl(boi->bom->fd, DRM_IOCTL_GEM_FLINK, &flink); in radeon_gem_get_kernel_name()
349 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; in radeon_gem_set_domain() local
357 r = drmCommandWriteRead(boi->bom->fd, in radeon_gem_set_domain()