• Home
  • Raw
  • Download

Lines Matching refs:bo

65 	struct exynos_bo *bo;  in exynos_bo_create()  local
79 bo = calloc(1, sizeof(*bo)); in exynos_bo_create()
80 if (!bo) in exynos_bo_create()
101 bo->base.kms = kms; in exynos_bo_create()
102 bo->base.handle = arg.handle; in exynos_bo_create()
103 bo->base.size = size; in exynos_bo_create()
104 bo->base.pitch = pitch; in exynos_bo_create()
106 *out = &bo->base; in exynos_bo_create()
111 free(bo); in exynos_bo_create()
116 exynos_bo_get_prop(struct kms_bo *bo, unsigned key, unsigned *out) in exynos_bo_get_prop() argument
127 struct exynos_bo *bo = (struct exynos_bo *)_bo; in exynos_bo_map() local
132 if (bo->base.ptr) { in exynos_bo_map()
133 bo->map_count++; in exynos_bo_map()
134 *out = bo->base.ptr; in exynos_bo_map()
139 arg.handle = bo->base.handle; in exynos_bo_map()
141 ret = drmIoctl(bo->base.kms->fd, DRM_IOCTL_MODE_MAP_DUMB, &arg); in exynos_bo_map()
145 map = drm_mmap(0, bo->base.size, PROT_READ | PROT_WRITE, MAP_SHARED, bo->base.kms->fd, arg.offset); in exynos_bo_map()
149 bo->base.ptr = map; in exynos_bo_map()
150 bo->map_count++; in exynos_bo_map()
151 *out = bo->base.ptr; in exynos_bo_map()
159 struct exynos_bo *bo = (struct exynos_bo *)_bo; in exynos_bo_unmap() local
160 bo->map_count--; in exynos_bo_unmap()
167 struct exynos_bo *bo = (struct exynos_bo *)_bo; in exynos_bo_destroy() local
171 if (bo->base.ptr) { in exynos_bo_destroy()
173 munmap(bo->base.ptr, bo->base.size); in exynos_bo_destroy()
174 bo->base.ptr = NULL; in exynos_bo_destroy()
178 arg.handle = bo->base.handle; in exynos_bo_destroy()
180 ret = drmIoctl(bo->base.kms->fd, DRM_IOCTL_GEM_CLOSE, &arg); in exynos_bo_destroy()
184 free(bo); in exynos_bo_destroy()