Lines Matching refs:bo

60 void gralloc_gbm_destroy_user_data(struct gbm_bo *bo, void *data)  in gralloc_gbm_destroy_user_data()  argument
65 (void)bo; in gralloc_gbm_destroy_user_data()
68 static struct bo_data_t *gbm_bo_data(struct gbm_bo *bo) { in gbm_bo_data() argument
69 return (struct bo_data_t *)gbm_bo_get_user_data(bo); in gbm_bo_data()
159 struct gbm_bo *bo; in gbm_import() local
186 bo = gbm_bo_import(gbm, GBM_BO_IMPORT_FD_MODIFIER, &data, 0); in gbm_import()
190 bo = gbm_bo_import(gbm, GBM_BO_IMPORT_FD, &data, 0); in gbm_import()
193 return bo; in gbm_import()
199 struct gbm_bo *bo; in gbm_alloc() local
225 bo = gbm_bo_create(gbm, width, height, format, usage); in gbm_alloc()
226 if (!bo) { in gbm_alloc()
232 handle->prime_fd = gbm_bo_get_fd(bo); in gbm_alloc()
233 handle->stride = gbm_bo_get_stride(bo); in gbm_alloc()
235 handle->modifier = gbm_bo_get_modifier(bo); in gbm_alloc()
238 return bo; in gbm_alloc()
243 struct gbm_bo *bo = gralloc_gbm_bo_from_handle(handle); in gbm_free() local
245 if (!bo) in gbm_free()
249 gbm_bo_destroy(bo); in gbm_free()
266 struct gbm_bo *bo = gralloc_gbm_bo_from_handle(handle); in gbm_map() local
267 struct bo_data_t *bo_data = gbm_bo_data(bo); in gbm_map()
275 ALOGE("can't map with offset for planar %p", bo); in gbm_map()
283 *addr = gbm_bo_map(bo, 0, 0, x + w, y + h, flags, &stride, &bo_data->map_data); in gbm_map()
284 ALOGV("mapped bo %p (%d, %d)-(%d, %d) at %p", bo, x, y, w, h, *addr); in gbm_map()
288 assert(stride == gbm_bo_get_stride(bo)); in gbm_map()
293 static void gbm_unmap(struct gbm_bo *bo) in gbm_unmap() argument
295 struct bo_data_t *bo_data = gbm_bo_data(bo); in gbm_unmap()
297 gbm_bo_unmap(bo, bo_data->map_data); in gbm_unmap()
336 struct gbm_bo *bo; in gralloc_gbm_handle_register() local
344 bo = gbm_import(gbm, _handle); in gralloc_gbm_handle_register()
345 if (!bo) in gralloc_gbm_handle_register()
348 gbm_bo_handle_map.emplace(_handle, bo); in gralloc_gbm_handle_register()
369 struct gbm_bo *bo; in gralloc_gbm_bo_create() local
376 bo = gbm_alloc(gbm, handle); in gralloc_gbm_bo_create()
377 if (!bo) { in gralloc_gbm_bo_create()
382 gbm_bo_handle_map.emplace(handle, bo); in gralloc_gbm_bo_create()
399 struct gbm_bo *bo = gralloc_gbm_bo_from_handle(handle); in gralloc_gbm_bo_lock() local
402 if (!bo) in gralloc_gbm_bo_lock()
417 bo_data = gbm_bo_data(bo); in gralloc_gbm_bo_lock()
420 gbm_bo_set_user_data(bo, bo_data, gralloc_gbm_destroy_user_data); in gralloc_gbm_bo_lock()
423 ALOGI("lock bo %p, cnt=%d, usage=%x", bo, bo_data->lock_count, usage); in gralloc_gbm_bo_lock()
463 struct gbm_bo *bo = gralloc_gbm_bo_from_handle(handle); in gralloc_gbm_bo_unlock() local
465 if (!bo) in gralloc_gbm_bo_unlock()
468 bo_data = gbm_bo_data(bo); in gralloc_gbm_bo_unlock()
477 gbm_unmap(bo); in gralloc_gbm_bo_unlock()