• Home
  • Raw
  • Download

Lines Matching refs:bo

71 	struct vmwgfx_bo *bo;  in vmwgfx_bo_create()  local
85 bo = calloc(1, sizeof(*bo)); in vmwgfx_bo_create()
86 if (!bo) in vmwgfx_bo_create()
96 bo->base.size = req->size; in vmwgfx_bo_create()
97 bo->base.pitch = width * 4; in vmwgfx_bo_create()
98 bo->base.kms = kms; in vmwgfx_bo_create()
101 ret = drmCommandWriteRead(bo->base.kms->fd, in vmwgfx_bo_create()
109 bo->base.handle = rep->handle; in vmwgfx_bo_create()
110 bo->map_handle = rep->map_handle; in vmwgfx_bo_create()
111 bo->base.handle = rep->cur_gmr_id; in vmwgfx_bo_create()
112 bo->base.offset = rep->cur_gmr_offset; in vmwgfx_bo_create()
115 *out = &bo->base; in vmwgfx_bo_create()
120 free(bo); in vmwgfx_bo_create()
125 vmwgfx_bo_get_prop(struct kms_bo *bo, unsigned key, unsigned *out) in vmwgfx_bo_get_prop() argument
136 struct vmwgfx_bo *bo = (struct vmwgfx_bo *)_bo; in vmwgfx_bo_map() local
139 if (bo->base.ptr) { in vmwgfx_bo_map()
140 bo->map_count++; in vmwgfx_bo_map()
141 *out = bo->base.ptr; in vmwgfx_bo_map()
145 …map = drm_mmap(NULL, bo->base.size, PROT_READ | PROT_WRITE, MAP_SHARED, bo->base.kms->fd, bo->map_… in vmwgfx_bo_map()
149 bo->base.ptr = map; in vmwgfx_bo_map()
150 bo->map_count++; in vmwgfx_bo_map()
151 *out = bo->base.ptr; in vmwgfx_bo_map()
159 struct vmwgfx_bo *bo = (struct vmwgfx_bo *)_bo; in vmwgfx_bo_unmap() local
160 bo->map_count--; in vmwgfx_bo_unmap()
167 struct vmwgfx_bo *bo = (struct vmwgfx_bo *)_bo; in vmwgfx_bo_destroy() local
170 if (bo->base.ptr) { in vmwgfx_bo_destroy()
172 drm_munmap(bo->base.ptr, bo->base.size); in vmwgfx_bo_destroy()
173 bo->base.ptr = NULL; in vmwgfx_bo_destroy()
177 arg.handle = bo->base.handle; in vmwgfx_bo_destroy()
178 drmCommandWrite(bo->base.kms->fd, DRM_VMW_UNREF_DMABUF, &arg, sizeof(arg)); in vmwgfx_bo_destroy()
180 free(bo); in vmwgfx_bo_destroy()