Lines Matching refs:dev
40 drmHashInsert(bo->dev->name_table, name, bo);
58 static struct fd_bo * bo_from_handle(struct fd_device *dev,
63 bo = dev->funcs->bo_from_handle(dev, size, handle);
65 drmCloseBufferHandle(dev->fd, handle);
68 bo->dev = fd_device_ref(dev);
74 drmHashInsert(dev->handle_table, handle, bo);
79 bo_new(struct fd_device *dev, uint32_t size, uint32_t flags,
90 ret = dev->funcs->bo_new_handle(dev, size, flags, &handle);
95 bo = bo_from_handle(dev, size, handle);
104 fd_bo_new(struct fd_device *dev, uint32_t size, uint32_t flags)
106 struct fd_bo *bo = bo_new(dev, size, flags, &dev->bo_cache);
118 fd_bo_new_ring(struct fd_device *dev, uint32_t size, uint32_t flags)
120 struct fd_bo *bo = bo_new(dev, size, flags, &dev->ring_cache);
127 fd_bo_from_handle(struct fd_device *dev, uint32_t handle, uint32_t size)
133 bo = lookup_bo(dev->handle_table, handle);
137 bo = bo_from_handle(dev, size, handle);
148 fd_bo_from_dmabuf(struct fd_device *dev, int fd)
155 ret = drmPrimeFDToHandle(dev->fd, fd, &handle);
161 bo = lookup_bo(dev->handle_table, handle);
169 bo = bo_from_handle(dev, size, handle);
179 drm_public struct fd_bo * fd_bo_from_name(struct fd_device *dev, uint32_t name)
189 bo = lookup_bo(dev->name_table, name);
193 if (drmIoctl(dev->fd, DRM_IOCTL_GEM_OPEN, &req)) {
198 bo = lookup_bo(dev->handle_table, req.handle);
202 bo = bo_from_handle(dev, req.size, req.handle);
232 struct fd_device *dev = bo->dev;
239 if ((bo->bo_reuse == BO_CACHE) && (fd_bo_cache_free(&dev->bo_cache, bo) == 0))
241 if ((bo->bo_reuse == RING_CACHE) && (fd_bo_cache_free(&dev->ring_cache, bo) == 0))
245 fd_device_del_locked(dev);
263 drmHashDelete(bo->dev->handle_table, bo->handle);
265 drmHashDelete(bo->dev->name_table, bo->name);
266 drmCloseBufferHandle(bo->dev->fd, bo->handle);
280 ret = drmIoctl(bo->dev->fd, DRM_IOCTL_GEM_FLINK, &req);
305 ret = drmPrimeHandleToFD(bo->dev->fd, bo->handle, DRM_CLOEXEC,
334 bo->dev->fd, offset);