/external/libdrm/freedreno/ |
D | freedreno_bo.c | 33 drm_private void bo_del(struct fd_bo *bo); 36 static void set_name(struct fd_bo *bo, uint32_t name) in set_name() argument 38 bo->name = name; in set_name() 40 drmHashInsert(bo->dev->name_table, name, bo); in set_name() 46 struct fd_bo *bo = NULL; in lookup_bo() local 47 if (!drmHashLookup(tbl, key, (void **)&bo)) { in lookup_bo() 49 bo = fd_bo_ref(bo); in lookup_bo() 52 list_delinit(&bo->list); in lookup_bo() 54 return bo; in lookup_bo() 61 struct fd_bo *bo; in bo_from_handle() local [all …]
|
/external/libdrm/etnaviv/ |
D | etnaviv_bo.c | 31 drm_private void bo_del(struct etna_bo *bo); 34 static void set_name(struct etna_bo *bo, uint32_t name) in set_name() argument 36 bo->name = name; in set_name() 38 drmHashInsert(bo->dev->name_table, name, bo); in set_name() 42 drm_private void bo_del(struct etna_bo *bo) in bo_del() argument 44 if (bo->map) in bo_del() 45 drm_munmap(bo->map, bo->size); in bo_del() 47 if (bo->name) in bo_del() 48 drmHashDelete(bo->dev->name_table, bo->name); in bo_del() 50 if (bo->handle) { in bo_del() [all …]
|
/external/mesa3d/src/mesa/drivers/dri/i965/ |
D | brw_bufmgr.c | 124 static int bo_set_tiling_internal(struct brw_bo *bo, uint32_t tiling_mode, 127 static void bo_free(struct brw_bo *bo); 224 brw_bo_busy(struct brw_bo *bo) in brw_bo_busy() argument 226 struct brw_bufmgr *bufmgr = bo->bufmgr; in brw_bo_busy() 227 struct drm_i915_gem_busy busy = { .handle = bo->gem_handle }; in brw_bo_busy() 231 bo->idle = !busy.busy; in brw_bo_busy() 238 brw_bo_madvise(struct brw_bo *bo, int state) in brw_bo_madvise() argument 241 .handle = bo->gem_handle, in brw_bo_madvise() 246 drmIoctl(bo->bufmgr->fd, DRM_IOCTL_I915_GEM_MADVISE, &madv); in brw_bo_madvise() 256 list_for_each_entry_safe(struct brw_bo, bo, &bucket->head, head) { in brw_bo_cache_purge_bucket() [all …]
|
/external/minigbm/ |
D | drv.c | 225 struct bo *drv_bo_new(struct driver *drv, uint32_t width, uint32_t height, uint32_t format, in drv_bo_new() 229 struct bo *bo; in drv_bo_new() local 230 bo = (struct bo *)calloc(1, sizeof(*bo)); in drv_bo_new() 232 if (!bo) in drv_bo_new() 235 bo->drv = drv; in drv_bo_new() 236 bo->width = width; in drv_bo_new() 237 bo->height = height; in drv_bo_new() 238 bo->format = format; in drv_bo_new() 239 bo->use_flags = use_flags; in drv_bo_new() 240 bo->num_planes = drv_num_planes_from_format(format); in drv_bo_new() [all …]
|
D | gbm.c | 89 PUBLIC void gbm_surface_release_buffer(struct gbm_surface *surface, struct gbm_bo *bo) in gbm_surface_release_buffer() argument 95 struct gbm_bo *bo; in gbm_bo_new() local 97 bo = (struct gbm_bo *)calloc(1, sizeof(*bo)); in gbm_bo_new() 98 if (!bo) in gbm_bo_new() 101 bo->gbm = gbm; in gbm_bo_new() 102 bo->gbm_format = format; in gbm_bo_new() 104 return bo; in gbm_bo_new() 110 struct gbm_bo *bo; in gbm_bo_create() local 115 bo = gbm_bo_new(gbm, format); in gbm_bo_create() 117 if (!bo) in gbm_bo_create() [all …]
|
D | drv.h | 61 struct bo; 116 struct bo *drv_bo_new(struct driver *drv, uint32_t width, uint32_t height, uint32_t format, 119 struct bo *drv_bo_create(struct driver *drv, uint32_t width, uint32_t height, uint32_t format, 122 struct bo *drv_bo_create_with_modifiers(struct driver *drv, uint32_t width, uint32_t height, 125 void drv_bo_destroy(struct bo *bo); 127 struct bo *drv_bo_import(struct driver *drv, struct drv_import_fd_data *data); 129 void *drv_bo_map(struct bo *bo, const struct rectangle *rect, uint32_t map_flags, 132 int drv_bo_unmap(struct bo *bo, struct mapping *mapping); 134 int drv_bo_invalidate(struct bo *bo, struct mapping *mapping); 136 int drv_bo_flush_or_unmap(struct bo *bo, struct mapping *mapping); [all …]
|
/external/mesa3d/src/gallium/winsys/radeon/drm/ |
D | radeon_drm_bo.c | 52 static inline struct radeon_bo *radeon_bo(struct pb_buffer *bo) in radeon_bo() argument 54 return (struct radeon_bo *)bo; in radeon_bo() 63 static bool radeon_real_bo_is_busy(struct radeon_bo *bo) in radeon_real_bo_is_busy() argument 67 args.handle = bo->handle; in radeon_real_bo_is_busy() 68 return drmCommandWriteRead(bo->rws->fd, DRM_RADEON_GEM_BUSY, in radeon_real_bo_is_busy() 72 static bool radeon_bo_is_busy(struct radeon_bo *bo) in radeon_bo_is_busy() argument 77 if (bo->handle) in radeon_bo_is_busy() 78 return radeon_real_bo_is_busy(bo); in radeon_bo_is_busy() 80 mtx_lock(&bo->rws->bo_fence_lock); in radeon_bo_is_busy() 81 for (num_idle = 0; num_idle < bo->u.slab.num_fences; ++num_idle) { in radeon_bo_is_busy() [all …]
|
/external/mesa3d/src/gallium/drivers/vc4/ |
D | vc4_bufmgr.c | 52 vc4_bo_label(struct vc4_screen *screen, struct vc4_bo *bo, const char *fmt, ...) in vc4_bo_label() argument 68 .handle = bo->handle, in vc4_bo_label() 108 vc4_bo_remove_from_cache(struct vc4_bo_cache *cache, struct vc4_bo *bo) in vc4_bo_remove_from_cache() argument 110 list_del(&bo->time_list); in vc4_bo_remove_from_cache() 111 list_del(&bo->size_list); in vc4_bo_remove_from_cache() 113 cache->bo_size -= bo->size; in vc4_bo_remove_from_cache() 116 static void vc4_bo_purgeable(struct vc4_bo *bo) in vc4_bo_purgeable() argument 119 .handle = bo->handle, in vc4_bo_purgeable() 123 if (bo->screen->has_madvise) in vc4_bo_purgeable() 124 vc4_ioctl(bo->screen->fd, DRM_IOCTL_VC4_GEM_MADVISE, &arg); in vc4_bo_purgeable() [all …]
|
/external/libdrm/intel/ |
D | intel_bufmgr.c | 86 drm_intel_bo_reference(drm_intel_bo *bo) in drm_intel_bo_reference() argument 88 bo->bufmgr->bo_reference(bo); in drm_intel_bo_reference() 92 drm_intel_bo_unreference(drm_intel_bo *bo) in drm_intel_bo_unreference() argument 94 if (bo == NULL) in drm_intel_bo_unreference() 97 bo->bufmgr->bo_unreference(bo); in drm_intel_bo_unreference() 113 drm_intel_bo_subdata(drm_intel_bo *bo, unsigned long offset, in drm_intel_bo_subdata() argument 116 return bo->bufmgr->bo_subdata(bo, offset, size, data); in drm_intel_bo_subdata() 120 drm_intel_bo_get_subdata(drm_intel_bo *bo, unsigned long offset, in drm_intel_bo_get_subdata() argument 124 if (bo->bufmgr->bo_get_subdata) in drm_intel_bo_get_subdata() 125 return bo->bufmgr->bo_get_subdata(bo, offset, size, data); in drm_intel_bo_get_subdata() [all …]
|
D | intel_bufmgr_fake.c | 106 drm_intel_bo *bo; member 165 int (*exec) (drm_intel_bo *bo, unsigned int used, void *priv); 183 drm_intel_bo bo; member 220 void (*invalidate_cb) (drm_intel_bo *bo, void *ptr); 419 alloc_block(drm_intel_bo *bo) in alloc_block() argument 421 drm_intel_bo_fake *bo_fake = (drm_intel_bo_fake *) bo; in alloc_block() 423 (drm_intel_bufmgr_fake *) bo->bufmgr; in alloc_block() 431 sz = (bo->size + bo_fake->alignment - 1) & ~(bo_fake->alignment - 1); in alloc_block() 446 block->bo = bo; in alloc_block() 466 bo_fake = (drm_intel_bo_fake *) block->bo; in free_block() [all …]
|
/external/mesa3d/src/gallium/winsys/amdgpu/drm/ |
D | amdgpu_bo.c | 58 struct amdgpu_winsys_bo *bo = amdgpu_winsys_bo(_buf); in amdgpu_bo_wait() local 59 struct amdgpu_winsys *ws = bo->ws; in amdgpu_bo_wait() 63 if (p_atomic_read(&bo->num_active_ioctls)) in amdgpu_bo_wait() 70 if (!os_wait_until_zero_abs_timeout(&bo->num_active_ioctls, abs_timeout)) in amdgpu_bo_wait() 74 if (bo->is_shared) { in amdgpu_bo_wait() 82 r = amdgpu_bo_wait_for_idle(bo->bo, timeout, &buffer_busy); in amdgpu_bo_wait() 95 for (idle_fences = 0; idle_fences < bo->num_fences; ++idle_fences) { in amdgpu_bo_wait() 96 if (!amdgpu_fence_wait(bo->fences[idle_fences], 0, false)) in amdgpu_bo_wait() 102 amdgpu_fence_reference(&bo->fences[i], NULL); in amdgpu_bo_wait() 104 memmove(&bo->fences[0], &bo->fences[idle_fences], in amdgpu_bo_wait() [all …]
|
/external/libdrm/omap/ |
D | omap_drm.c | 163 struct omap_bo *bo = NULL; in lookup_bo() local 164 if (!drmHashLookup(dev->handle_table, handle, (void **)&bo)) { in lookup_bo() 166 bo = omap_bo_ref(bo); in lookup_bo() 168 return bo; in lookup_bo() 175 struct omap_bo *bo = calloc(sizeof(*bo), 1); in bo_from_handle() local 176 if (!bo) { in bo_from_handle() 183 bo->dev = omap_device_ref(dev); in bo_from_handle() 184 bo->handle = handle; in bo_from_handle() 185 bo->fd = -1; in bo_from_handle() 186 atomic_set(&bo->refcnt, 1); in bo_from_handle() [all …]
|
/external/libdrm/tests/planetest/ |
D | bo.c | 23 static void draw_rect_yuv(struct sp_bo *bo, uint32_t x, uint32_t y, uint32_t width, in draw_rect_yuv() argument 28 if (xmax > bo->width) in draw_rect_yuv() 29 xmax = bo->width; in draw_rect_yuv() 30 if (ymax > bo->height) in draw_rect_yuv() 31 ymax = bo->height; in draw_rect_yuv() 34 uint8_t *luma = bo->map_addr + i * bo->pitch; in draw_rect_yuv() 41 uint8_t *chroma = bo->map_addr + (i + height) * bo->pitch; in draw_rect_yuv() 50 void fill_bo(struct sp_bo *bo, uint8_t a, uint8_t r, uint8_t g, uint8_t b) in fill_bo() argument 52 if (bo->format == DRM_FORMAT_NV12) in fill_bo() 53 draw_rect_yuv(bo, 0, 0, bo->width, bo->height, a, r, g, b); in fill_bo() [all …]
|
/external/mesa3d/src/gallium/drivers/vc5/ |
D | vc5_bufmgr.c | 82 vc5_bo_remove_from_cache(struct vc5_bo_cache *cache, struct vc5_bo *bo) in vc5_bo_remove_from_cache() argument 84 list_del(&bo->time_list); in vc5_bo_remove_from_cache() 85 list_del(&bo->size_list); in vc5_bo_remove_from_cache() 87 cache->bo_size -= bo->size; in vc5_bo_remove_from_cache() 99 struct vc5_bo *bo = NULL; in vc5_bo_from_cache() local 102 bo = LIST_ENTRY(struct vc5_bo, cache->size_list[page_index].next, in vc5_bo_from_cache() 109 if (!vc5_bo_wait(bo, 0, NULL)) { in vc5_bo_from_cache() 114 pipe_reference_init(&bo->reference, 1); in vc5_bo_from_cache() 115 vc5_bo_remove_from_cache(cache, bo); in vc5_bo_from_cache() 117 bo->name = name; in vc5_bo_from_cache() [all …]
|
/external/libdrm/tegra/ |
D | tegra.c | 38 static void drm_tegra_bo_free(struct drm_tegra_bo *bo) in drm_tegra_bo_free() argument 40 struct drm_tegra *drm = bo->drm; in drm_tegra_bo_free() 43 if (bo->map) in drm_tegra_bo_free() 44 munmap(bo->map, bo->size); in drm_tegra_bo_free() 47 args.handle = bo->handle; in drm_tegra_bo_free() 51 free(bo); in drm_tegra_bo_free() 108 struct drm_tegra_bo *bo; in drm_tegra_bo_new() local 114 bo = calloc(1, sizeof(*bo)); in drm_tegra_bo_new() 115 if (!bo) in drm_tegra_bo_new() 118 atomic_set(&bo->ref, 1); in drm_tegra_bo_new() [all …]
|
/external/mesa3d/src/amd/vulkan/winsys/amdgpu/ |
D | radv_amdgpu_bo.c | 44 amdgpu_bo_handle bo, in radv_amdgpu_bo_va_op() argument 62 return amdgpu_bo_va_op_raw(ws->dev, bo, offset, size, addr, in radv_amdgpu_bo_va_op() 67 radv_amdgpu_winsys_virtual_map(struct radv_amdgpu_winsys_bo *bo, in radv_amdgpu_winsys_virtual_map() argument 72 if (!range->bo) in radv_amdgpu_winsys_virtual_map() 75 p_atomic_inc(&range->bo->ref_count); in radv_amdgpu_winsys_virtual_map() 76 int r = radv_amdgpu_bo_va_op(bo->ws, range->bo->bo, range->bo_offset, in radv_amdgpu_winsys_virtual_map() 77 range->size, range->offset + bo->base.va, in radv_amdgpu_winsys_virtual_map() 84 radv_amdgpu_winsys_virtual_unmap(struct radv_amdgpu_winsys_bo *bo, in radv_amdgpu_winsys_virtual_unmap() argument 89 if (!range->bo) in radv_amdgpu_winsys_virtual_unmap() 92 int r = radv_amdgpu_bo_va_op(bo->ws, range->bo->bo, range->bo_offset, in radv_amdgpu_winsys_virtual_unmap() [all …]
|
/external/libdrm/amdgpu/ |
D | amdgpu_bo.c | 56 struct amdgpu_bo *bo; in amdgpu_bo_alloc() local 65 bo = calloc(1, sizeof(struct amdgpu_bo)); in amdgpu_bo_alloc() 66 if (!bo) in amdgpu_bo_alloc() 69 atomic_set(&bo->refcount, 1); in amdgpu_bo_alloc() 70 bo->dev = dev; in amdgpu_bo_alloc() 71 bo->alloc_size = alloc_buffer->alloc_size; in amdgpu_bo_alloc() 85 free(bo); in amdgpu_bo_alloc() 89 bo->handle = args.out.handle; in amdgpu_bo_alloc() 91 pthread_mutex_init(&bo->cpu_access_mutex, NULL); in amdgpu_bo_alloc() 93 *buf_handle = bo; in amdgpu_bo_alloc() [all …]
|
/external/libdrm/rockchip/ |
D | rockchip_drm.c | 94 struct rockchip_bo *bo; in rockchip_bo_create() local 105 bo = calloc(1, sizeof(*bo)); in rockchip_bo_create() 106 if (!bo) { in rockchip_bo_create() 112 bo->dev = dev; in rockchip_bo_create() 120 bo->handle = req.handle; in rockchip_bo_create() 121 bo->size = size; in rockchip_bo_create() 122 bo->flags = flags; in rockchip_bo_create() 124 return bo; in rockchip_bo_create() 127 free(bo); in rockchip_bo_create() 135 struct rockchip_bo *bo; in rockchip_bo_from_handle() local [all …]
|
/external/libdrm/tests/radeon/ |
D | rbo.c | 39 struct rbo *bo; in rbo() local 42 bo = calloc(1, sizeof(*bo)); in rbo() 43 if (bo == NULL) { in rbo() 46 list_inithead(&bo->list); in rbo() 47 bo->fd = fd; in rbo() 48 bo->size = size; in rbo() 49 bo->handle = handle; in rbo() 50 bo->refcount = 1; in rbo() 51 bo->alignment = alignment; in rbo() 60 free(bo); in rbo() [all …]
|
/external/libdrm/tests/modetest/ |
D | buffers.c | 43 struct bo struct 57 static struct bo * argument 61 struct bo *bo; in bo_create_dumb() local 64 bo = calloc(1, sizeof(*bo)); in bo_create_dumb() 65 if (bo == NULL) { in bo_create_dumb() 79 free(bo); in bo_create_dumb() 83 bo->fd = fd; in bo_create_dumb() 84 bo->handle = arg.handle; in bo_create_dumb() 85 bo->size = arg.size; in bo_create_dumb() 86 bo->pitch = arg.pitch; in bo_create_dumb() [all …]
|
/external/mesa3d/src/gbm/main/ |
D | gbm.c | 155 gbm_bo_get_width(struct gbm_bo *bo) in gbm_bo_get_width() argument 157 return bo->width; in gbm_bo_get_width() 166 gbm_bo_get_height(struct gbm_bo *bo) in gbm_bo_get_height() argument 168 return bo->height; in gbm_bo_get_height() 180 gbm_bo_get_stride(struct gbm_bo *bo) in gbm_bo_get_stride() argument 182 return gbm_bo_get_stride_for_plane(bo, 0); in gbm_bo_get_stride() 193 gbm_bo_get_stride_for_plane(struct gbm_bo *bo, int plane) in gbm_bo_get_stride_for_plane() argument 195 return bo->gbm->bo_get_stride(bo, plane); in gbm_bo_get_stride_for_plane() 206 gbm_bo_get_format(struct gbm_bo *bo) in gbm_bo_get_format() argument 208 return bo->format; in gbm_bo_get_format() [all …]
|
/external/libdrm/libkms/ |
D | radeon.c | 78 struct radeon_bo *bo; in radeon_bo_create() local 106 bo = calloc(1, sizeof(*bo)); in radeon_bo_create() 107 if (!bo) in radeon_bo_create() 122 bo->base.kms = kms; in radeon_bo_create() 123 bo->base.handle = arg.handle; in radeon_bo_create() 124 bo->base.size = size; in radeon_bo_create() 125 bo->base.pitch = pitch; in radeon_bo_create() 126 bo->base.offset = 0; in radeon_bo_create() 127 bo->map_count = 0; in radeon_bo_create() 129 *out = &bo->base; in radeon_bo_create() [all …]
|
D | vmwgfx.c | 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() [all …]
|
D | intel.c | 75 struct intel_bo *bo; in intel_bo_create() local 89 bo = calloc(1, sizeof(*bo)); in intel_bo_create() 90 if (!bo) in intel_bo_create() 101 free(bo); in intel_bo_create() 112 bo->base.kms = kms; in intel_bo_create() 113 bo->base.handle = arg.handle; in intel_bo_create() 114 bo->base.size = size; in intel_bo_create() 115 bo->base.pitch = pitch; in intel_bo_create() 117 *out = &bo->base; in intel_bo_create() 122 tile.handle = bo->base.handle; in intel_bo_create() [all …]
|
/external/libdrm/radeon/ |
D | radeon_bo.c | 36 void radeon_bo_debug(struct radeon_bo *bo, const char *op) in radeon_bo_debug() argument 38 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; in radeon_bo_debug() 41 op, bo, bo->handle, boi->size, boi->cref); in radeon_bo_debug() 48 struct radeon_bo *bo; in radeon_bo_open() local 49 bo = bom->funcs->bo_open(bom, handle, size, alignment, domains, flags); in radeon_bo_open() 50 return bo; in radeon_bo_open() 53 void radeon_bo_ref(struct radeon_bo *bo) in radeon_bo_ref() argument 55 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; in radeon_bo_ref() 60 struct radeon_bo *radeon_bo_unref(struct radeon_bo *bo) in radeon_bo_unref() argument 62 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; in radeon_bo_unref() [all …]
|