Lines Matching refs:bo
94 struct exynos_bo *bo; in exynos_bo_create() local
105 bo = calloc(sizeof(*bo), 1); in exynos_bo_create()
106 if (!bo) { in exynos_bo_create()
112 bo->dev = dev; in exynos_bo_create()
120 bo->handle = req.handle; in exynos_bo_create()
121 bo->size = size; in exynos_bo_create()
122 bo->flags = flags; in exynos_bo_create()
124 return bo; in exynos_bo_create()
127 free(bo); in exynos_bo_create()
171 drm_public void exynos_bo_destroy(struct exynos_bo *bo) in exynos_bo_destroy() argument
173 if (!bo) in exynos_bo_destroy()
176 if (bo->vaddr) in exynos_bo_destroy()
177 munmap(bo->vaddr, bo->size); in exynos_bo_destroy()
179 if (bo->handle) { in exynos_bo_destroy()
181 .handle = bo->handle, in exynos_bo_destroy()
184 drmIoctl(bo->dev->fd, DRM_IOCTL_GEM_CLOSE, &req); in exynos_bo_destroy()
187 free(bo); in exynos_bo_destroy()
206 struct exynos_bo *bo; in exynos_bo_from_name() local
211 bo = calloc(sizeof(*bo), 1); in exynos_bo_from_name()
212 if (!bo) { in exynos_bo_from_name()
224 bo->dev = dev; in exynos_bo_from_name()
225 bo->name = name; in exynos_bo_from_name()
226 bo->handle = req.handle; in exynos_bo_from_name()
228 return bo; in exynos_bo_from_name()
231 free(bo); in exynos_bo_from_name()
246 drm_public int exynos_bo_get_name(struct exynos_bo *bo, uint32_t *name) in exynos_bo_get_name() argument
248 if (!bo->name) { in exynos_bo_get_name()
250 .handle = bo->handle, in exynos_bo_get_name()
254 ret = drmIoctl(bo->dev->fd, DRM_IOCTL_GEM_FLINK, &req); in exynos_bo_get_name()
261 bo->name = req.name; in exynos_bo_get_name()
264 *name = bo->name; in exynos_bo_get_name()
269 drm_public uint32_t exynos_bo_handle(struct exynos_bo *bo) in exynos_bo_handle() argument
271 return bo->handle; in exynos_bo_handle()
282 drm_public void *exynos_bo_map(struct exynos_bo *bo) in exynos_bo_map() argument
284 if (!bo->vaddr) { in exynos_bo_map()
285 struct exynos_device *dev = bo->dev; in exynos_bo_map()
287 .handle = bo->handle, in exynos_bo_map()
288 .size = bo->size, in exynos_bo_map()
299 bo->vaddr = (void *)(uintptr_t)req.mapped; in exynos_bo_map()
302 return bo->vaddr; in exynos_bo_map()