• Home
  • Raw
  • Download

Lines Matching refs:drm

40     struct drm_tegra *drm = bo->drm;  in drm_tegra_bo_free()  local
45 drmCloseBufferHandle(drm->fd, bo->handle); in drm_tegra_bo_free()
52 struct drm_tegra *drm; in drm_tegra_wrap() local
57 drm = calloc(1, sizeof(*drm)); in drm_tegra_wrap()
58 if (!drm) in drm_tegra_wrap()
61 drm->close = close; in drm_tegra_wrap()
62 drm->fd = fd; in drm_tegra_wrap()
64 *drmp = drm; in drm_tegra_wrap()
89 drm_public void drm_tegra_close(struct drm_tegra *drm) in drm_tegra_close() argument
91 if (!drm) in drm_tegra_close()
94 if (drm->close) in drm_tegra_close()
95 close(drm->fd); in drm_tegra_close()
97 free(drm); in drm_tegra_close()
100 static struct drm_tegra_bo *drm_tegra_bo_alloc(struct drm_tegra *drm, in drm_tegra_bo_alloc() argument
115 bo->drm = drm; in drm_tegra_bo_alloc()
121 drm_tegra_bo_new(struct drm_tegra *drm, uint32_t flags, uint32_t size, in drm_tegra_bo_new() argument
128 if (!drm || size == 0 || !bop) in drm_tegra_bo_new()
131 bo = drm_tegra_bo_alloc(drm, 0, flags, size); in drm_tegra_bo_new()
139 err = drmCommandWriteRead(drm->fd, DRM_TEGRA_GEM_CREATE, &args, in drm_tegra_bo_new()
155 drm_tegra_bo_wrap(struct drm_tegra *drm, uint32_t handle, uint32_t flags, in drm_tegra_bo_wrap() argument
160 if (!drm || !bop) in drm_tegra_bo_wrap()
163 bo = drm_tegra_bo_alloc(drm, handle, flags, size); in drm_tegra_bo_wrap()
199 struct drm_tegra *drm = bo->drm; in drm_tegra_bo_map() local
208 err = drmCommandWriteRead(drm->fd, DRM_TEGRA_GEM_MMAP, &args, in drm_tegra_bo_map()
216 drm->fd, bo->offset); in drm_tegra_bo_map()
247 struct drm_tegra *drm = bo->drm; in drm_tegra_bo_get_name() local
254 err = drmIoctl(drm->fd, DRM_IOCTL_GEM_FLINK, &args); in drm_tegra_bo_get_name()
265 drm_tegra_bo_open(struct drm_tegra *drm, uint32_t name, uint32_t flags, in drm_tegra_bo_open() argument
272 bo = drm_tegra_bo_alloc(drm, 0, flags, 0); in drm_tegra_bo_open()
279 err = drmIoctl(drm->fd, DRM_IOCTL_GEM_OPEN, &args); in drm_tegra_bo_open()
301 err = drmPrimeHandleToFD(bo->drm->fd, bo->handle, flags, &fd); in drm_tegra_bo_export()
329 drm_tegra_bo_import(struct drm_tegra *drm, int fd, struct drm_tegra_bo **bop) in drm_tegra_bo_import() argument
339 bo = drm_tegra_bo_alloc(drm, 0, 0, size); in drm_tegra_bo_import()
343 err = drmPrimeFDToHandle(drm->fd, fd, &bo->handle); in drm_tegra_bo_import()