Home
last modified time | relevance | path

Searched refs:bo (Results 1 – 25 of 702) sorted by relevance

12345678910>>...29

/external/libdrm/etnaviv/
Detnaviv_bo.c35 drm_private void bo_del(struct etna_bo *bo);
38 static void set_name(struct etna_bo *bo, uint32_t name) in set_name() argument
40 bo->name = name; in set_name()
42 drmHashInsert(bo->dev->name_table, name, bo); in set_name()
46 drm_private void bo_del(struct etna_bo *bo) in bo_del() argument
48 if (bo->map) in bo_del()
49 drm_munmap(bo->map, bo->size); in bo_del()
51 if (bo->name) in bo_del()
52 drmHashDelete(bo->dev->name_table, bo->name); in bo_del()
54 if (bo->handle) { in bo_del()
[all …]
/external/libdrm/freedreno/
Dfreedreno_bo.c37 drm_private void bo_del(struct fd_bo *bo);
40 static void set_name(struct fd_bo *bo, uint32_t name) in set_name() argument
42 bo->name = name; in set_name()
44 drmHashInsert(bo->dev->name_table, name, bo); in set_name()
50 struct fd_bo *bo = NULL; in lookup_bo() local
51 if (!drmHashLookup(tbl, key, (void **)&bo)) { in lookup_bo()
53 bo = fd_bo_ref(bo); in lookup_bo()
56 list_delinit(&bo->list); in lookup_bo()
58 return bo; in lookup_bo()
65 struct fd_bo *bo; in bo_from_handle() local
[all …]
/external/mesa3d/src/gallium/winsys/amdgpu/drm/
Damdgpu_bo.c51 struct amdgpu_winsys_bo *bo = amdgpu_winsys_bo(_buf); in amdgpu_bo_wait() local
52 struct amdgpu_winsys *ws = bo->ws; in amdgpu_bo_wait()
56 if (p_atomic_read(&bo->num_active_ioctls)) in amdgpu_bo_wait()
63 if (!os_wait_until_zero_abs_timeout(&bo->num_active_ioctls, abs_timeout)) in amdgpu_bo_wait()
67 if (bo->is_shared) { in amdgpu_bo_wait()
75 r = amdgpu_bo_wait_for_idle(bo->bo, timeout, &buffer_busy); in amdgpu_bo_wait()
88 for (idle_fences = 0; idle_fences < bo->num_fences; ++idle_fences) { in amdgpu_bo_wait()
89 if (!amdgpu_fence_wait(bo->fences[idle_fences], 0, false)) in amdgpu_bo_wait()
95 amdgpu_fence_reference(&bo->fences[i], NULL); in amdgpu_bo_wait()
97 memmove(&bo->fences[0], &bo->fences[idle_fences], in amdgpu_bo_wait()
[all …]
/external/libdrm/intel/
Dintel_bufmgr.c90 drm_intel_bo_reference(drm_intel_bo *bo) in drm_intel_bo_reference() argument
92 bo->bufmgr->bo_reference(bo); in drm_intel_bo_reference()
96 drm_intel_bo_unreference(drm_intel_bo *bo) in drm_intel_bo_unreference() argument
98 if (bo == NULL) in drm_intel_bo_unreference()
101 bo->bufmgr->bo_unreference(bo); in drm_intel_bo_unreference()
117 drm_intel_bo_subdata(drm_intel_bo *bo, unsigned long offset, in drm_intel_bo_subdata() argument
120 return bo->bufmgr->bo_subdata(bo, offset, size, data); in drm_intel_bo_subdata()
124 drm_intel_bo_get_subdata(drm_intel_bo *bo, unsigned long offset, in drm_intel_bo_get_subdata() argument
128 if (bo->bufmgr->bo_get_subdata) in drm_intel_bo_get_subdata()
129 return bo->bufmgr->bo_get_subdata(bo, offset, size, data); in drm_intel_bo_get_subdata()
[all …]
Dintel_bufmgr_fake.c110 drm_intel_bo *bo; member
169 int (*exec) (drm_intel_bo *bo, unsigned int used, void *priv);
187 drm_intel_bo bo; member
224 void (*invalidate_cb) (drm_intel_bo *bo, void *ptr);
423 alloc_block(drm_intel_bo *bo) in alloc_block() argument
425 drm_intel_bo_fake *bo_fake = (drm_intel_bo_fake *) bo; in alloc_block()
427 (drm_intel_bufmgr_fake *) bo->bufmgr; in alloc_block()
435 sz = (bo->size + bo_fake->alignment - 1) & ~(bo_fake->alignment - 1); in alloc_block()
450 block->bo = bo; in alloc_block()
470 bo_fake = (drm_intel_bo_fake *) block->bo; in free_block()
[all …]
/external/mesa3d/src/gallium/drivers/vc4/
Dvc4_bufmgr.c82 vc4_bo_remove_from_cache(struct vc4_bo_cache *cache, struct vc4_bo *bo) in vc4_bo_remove_from_cache() argument
84 list_del(&bo->time_list); in vc4_bo_remove_from_cache()
85 list_del(&bo->size_list); in vc4_bo_remove_from_cache()
87 cache->bo_size -= bo->size; in vc4_bo_remove_from_cache()
99 struct vc4_bo *bo = NULL; in vc4_bo_from_cache() local
102 bo = LIST_ENTRY(struct vc4_bo, cache->size_list[page_index].next, in vc4_bo_from_cache()
109 if (!vc4_bo_wait(bo, 0, NULL)) { in vc4_bo_from_cache()
114 pipe_reference_init(&bo->reference, 1); in vc4_bo_from_cache()
115 vc4_bo_remove_from_cache(cache, bo); in vc4_bo_from_cache()
117 bo->name = name; in vc4_bo_from_cache()
[all …]
Dvc4_bufmgr.h59 void vc4_bo_last_unreference(struct vc4_bo *bo);
60 void vc4_bo_last_unreference_locked_timed(struct vc4_bo *bo, time_t time);
65 bool vc4_bo_flink(struct vc4_bo *bo, uint32_t *name);
66 int vc4_bo_get_dmabuf(struct vc4_bo *bo);
77 vc4_bo_reference(struct vc4_bo *bo) in vc4_bo_reference() argument
79 pipe_reference(NULL, &bo->reference); in vc4_bo_reference()
80 return bo; in vc4_bo_reference()
84 vc4_bo_unreference(struct vc4_bo **bo) in vc4_bo_unreference() argument
87 if (!*bo) in vc4_bo_unreference()
90 if ((*bo)->private) { in vc4_bo_unreference()
[all …]
/external/mesa3d/src/gallium/winsys/radeon/drm/
Dradeon_drm_bo.c52 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 pipe_mutex_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/libdrm/omap/
Domap_drm.c167 struct omap_bo *bo = NULL; in lookup_bo() local
168 if (!drmHashLookup(dev->handle_table, handle, (void **)&bo)) { in lookup_bo()
170 bo = omap_bo_ref(bo); in lookup_bo()
172 return bo; in lookup_bo()
179 struct omap_bo *bo = calloc(sizeof(*bo), 1); in bo_from_handle() local
180 if (!bo) { in bo_from_handle()
187 bo->dev = omap_device_ref(dev); in bo_from_handle()
188 bo->handle = handle; in bo_from_handle()
189 bo->fd = -1; in bo_from_handle()
190 atomic_set(&bo->refcnt, 1); in bo_from_handle()
[all …]
/external/libdrm/amdgpu/
Damdgpu_bo.c56 drm_private void amdgpu_bo_free_internal(amdgpu_bo_handle bo) in amdgpu_bo_free_internal() argument
59 pthread_mutex_lock(&bo->dev->bo_table_mutex); in amdgpu_bo_free_internal()
60 util_hash_table_remove(bo->dev->bo_handles, in amdgpu_bo_free_internal()
61 (void*)(uintptr_t)bo->handle); in amdgpu_bo_free_internal()
62 if (bo->flink_name) { in amdgpu_bo_free_internal()
63 util_hash_table_remove(bo->dev->bo_flink_names, in amdgpu_bo_free_internal()
64 (void*)(uintptr_t)bo->flink_name); in amdgpu_bo_free_internal()
66 pthread_mutex_unlock(&bo->dev->bo_table_mutex); in amdgpu_bo_free_internal()
69 if (bo->cpu_map_count > 0) { in amdgpu_bo_free_internal()
70 bo->cpu_map_count = 1; in amdgpu_bo_free_internal()
[all …]
/external/libdrm/tests/planetest/
Dbo.c23 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/libdrm/tegra/
Dtegra.c42 static void drm_tegra_bo_free(struct drm_tegra_bo *bo) in drm_tegra_bo_free() argument
44 struct drm_tegra *drm = bo->drm; in drm_tegra_bo_free()
47 if (bo->map) in drm_tegra_bo_free()
48 munmap(bo->map, bo->size); in drm_tegra_bo_free()
51 args.handle = bo->handle; in drm_tegra_bo_free()
55 free(bo); in drm_tegra_bo_free()
112 struct drm_tegra_bo *bo; in drm_tegra_bo_new() local
118 bo = calloc(1, sizeof(*bo)); in drm_tegra_bo_new()
119 if (!bo) in drm_tegra_bo_new()
122 atomic_set(&bo->ref, 1); in drm_tegra_bo_new()
[all …]
/external/libdrm/rockchip/
Drockchip_drm.c94 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/
Drbo.c39 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/mesa3d/src/amd/vulkan/winsys/amdgpu/
Dradv_amdgpu_bo.c39 struct radv_amdgpu_winsys_bo *bo = radv_amdgpu_winsys_bo(_bo); in radv_amdgpu_winsys_bo_destroy() local
41 if (bo->ws->debug_all_bos) { in radv_amdgpu_winsys_bo_destroy()
42 pthread_mutex_lock(&bo->ws->global_bo_list_lock); in radv_amdgpu_winsys_bo_destroy()
43 LIST_DEL(&bo->global_list_item); in radv_amdgpu_winsys_bo_destroy()
44 bo->ws->num_buffers--; in radv_amdgpu_winsys_bo_destroy()
45 pthread_mutex_unlock(&bo->ws->global_bo_list_lock); in radv_amdgpu_winsys_bo_destroy()
47 amdgpu_bo_va_op(bo->bo, 0, bo->size, bo->va, 0, AMDGPU_VA_OP_UNMAP); in radv_amdgpu_winsys_bo_destroy()
48 amdgpu_va_range_free(bo->va_handle); in radv_amdgpu_winsys_bo_destroy()
49 amdgpu_bo_free(bo->bo); in radv_amdgpu_winsys_bo_destroy()
50 FREE(bo); in radv_amdgpu_winsys_bo_destroy()
[all …]
/external/libdrm/tests/modetest/
Dbuffers.c47 struct bo struct
61 static struct bo * argument
65 struct bo *bo; in bo_create_dumb() local
68 bo = calloc(1, sizeof(*bo)); in bo_create_dumb()
69 if (bo == NULL) { in bo_create_dumb()
83 free(bo); in bo_create_dumb()
87 bo->fd = fd; in bo_create_dumb()
88 bo->handle = arg.handle; in bo_create_dumb()
89 bo->size = arg.size; in bo_create_dumb()
90 bo->pitch = arg.pitch; in bo_create_dumb()
[all …]
/external/mesa3d/src/gbm/main/
Dgbm.c141 gbm_bo_get_width(struct gbm_bo *bo) in gbm_bo_get_width() argument
143 return bo->width; in gbm_bo_get_width()
152 gbm_bo_get_height(struct gbm_bo *bo) in gbm_bo_get_height() argument
154 return bo->height; in gbm_bo_get_height()
166 gbm_bo_get_stride(struct gbm_bo *bo) in gbm_bo_get_stride() argument
168 return bo->stride; in gbm_bo_get_stride()
179 gbm_bo_get_format(struct gbm_bo *bo) in gbm_bo_get_format() argument
181 return bo->format; in gbm_bo_get_format()
193 gbm_bo_get_handle(struct gbm_bo *bo) in gbm_bo_get_handle() argument
195 return bo->handle; in gbm_bo_get_handle()
[all …]
/external/libdrm/libkms/
Dradeon.c82 struct radeon_bo *bo; in radeon_bo_create() local
110 bo = calloc(1, sizeof(*bo)); in radeon_bo_create()
111 if (!bo) in radeon_bo_create()
126 bo->base.kms = kms; in radeon_bo_create()
127 bo->base.handle = arg.handle; in radeon_bo_create()
128 bo->base.size = size; in radeon_bo_create()
129 bo->base.pitch = pitch; in radeon_bo_create()
130 bo->base.offset = 0; in radeon_bo_create()
131 bo->map_count = 0; in radeon_bo_create()
133 *out = &bo->base; in radeon_bo_create()
[all …]
Dvmwgfx.c75 struct vmwgfx_bo *bo; in vmwgfx_bo_create() local
89 bo = calloc(1, sizeof(*bo)); in vmwgfx_bo_create()
90 if (!bo) in vmwgfx_bo_create()
100 bo->base.size = req->size; in vmwgfx_bo_create()
101 bo->base.pitch = width * 4; in vmwgfx_bo_create()
102 bo->base.kms = kms; in vmwgfx_bo_create()
105 ret = drmCommandWriteRead(bo->base.kms->fd, in vmwgfx_bo_create()
113 bo->base.handle = rep->handle; in vmwgfx_bo_create()
114 bo->map_handle = rep->map_handle; in vmwgfx_bo_create()
115 bo->base.handle = rep->cur_gmr_id; in vmwgfx_bo_create()
[all …]
Dintel.c79 struct intel_bo *bo; in intel_bo_create() local
93 bo = calloc(1, sizeof(*bo)); in intel_bo_create()
94 if (!bo) in intel_bo_create()
105 free(bo); in intel_bo_create()
116 bo->base.kms = kms; in intel_bo_create()
117 bo->base.handle = arg.handle; in intel_bo_create()
118 bo->base.size = size; in intel_bo_create()
119 bo->base.pitch = pitch; in intel_bo_create()
121 *out = &bo->base; in intel_bo_create()
126 tile.handle = bo->base.handle; in intel_bo_create()
[all …]
Dnouveau.c80 struct nouveau_bo *bo; in nouveau_bo_create() local
94 bo = calloc(1, sizeof(*bo)); in nouveau_bo_create()
95 if (!bo) in nouveau_bo_create()
106 free(bo); in nouveau_bo_create()
122 bo->base.kms = kms; in nouveau_bo_create()
123 bo->base.handle = arg.info.handle; in nouveau_bo_create()
124 bo->base.size = size; in nouveau_bo_create()
125 bo->base.pitch = pitch; in nouveau_bo_create()
126 bo->map_handle = arg.info.map_handle; in nouveau_bo_create()
128 *out = &bo->base; in nouveau_bo_create()
[all …]
Dexynos.c65 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()
102 bo->base.kms = kms; in exynos_bo_create()
103 bo->base.handle = arg.handle; in exynos_bo_create()
104 bo->base.size = size; in exynos_bo_create()
105 bo->base.pitch = pitch; in exynos_bo_create()
107 *out = &bo->base; in exynos_bo_create()
112 free(bo); in exynos_bo_create()
117 exynos_bo_get_prop(struct kms_bo *bo, unsigned key, unsigned *out) in exynos_bo_get_prop() argument
[all …]
Ddumb.c76 struct dumb_bo *bo; in dumb_bo_create() local
91 bo = calloc(1, sizeof(*bo)); in dumb_bo_create()
92 if (!bo) in dumb_bo_create()
106 bo->base.kms = kms; in dumb_bo_create()
107 bo->base.handle = arg.handle; in dumb_bo_create()
108 bo->base.size = arg.size; in dumb_bo_create()
109 bo->base.pitch = arg.pitch; in dumb_bo_create()
111 *out = &bo->base; in dumb_bo_create()
116 free(bo); in dumb_bo_create()
121 dumb_bo_get_prop(struct kms_bo *bo, unsigned key, unsigned *out) in dumb_bo_get_prop() argument
[all …]
/external/libdrm/radeon/
Dradeon_bo.c39 void radeon_bo_debug(struct radeon_bo *bo, const char *op) in radeon_bo_debug() argument
41 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; in radeon_bo_debug()
44 op, bo, bo->handle, boi->size, boi->cref); in radeon_bo_debug()
51 struct radeon_bo *bo; in radeon_bo_open() local
52 bo = bom->funcs->bo_open(bom, handle, size, alignment, domains, flags); in radeon_bo_open()
53 return bo; in radeon_bo_open()
56 void radeon_bo_ref(struct radeon_bo *bo) in radeon_bo_ref() argument
58 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; in radeon_bo_ref()
63 struct radeon_bo *radeon_bo_unref(struct radeon_bo *bo) in radeon_bo_unref() argument
65 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; in radeon_bo_unref()
[all …]
/external/mesa3d/src/gallium/winsys/intel/drm/
Dintel_drm_winsys.c65 gem_bo(const struct intel_bo *bo) in gem_bo() argument
67 return (drm_intel_bo *) bo; in gem_bo()
94 drm_intel_bo *bo; in test_address_swizzling() local
98 bo = drm_intel_bo_alloc_tiled(winsys->bufmgr, in test_address_swizzling()
100 if (bo) { in test_address_swizzling()
101 drm_intel_bo_get_tiling(bo, &tiling, &swizzle); in test_address_swizzling()
102 drm_intel_bo_unreference(bo); in test_address_swizzling()
282 drm_intel_bo *bo; in intel_winsys_alloc_bo() local
285 bo = drm_intel_bo_alloc(winsys->bufmgr, name, size, alignment); in intel_winsys_alloc_bo()
287 bo = drm_intel_bo_alloc_for_render(winsys->bufmgr, in intel_winsys_alloc_bo()
[all …]

12345678910>>...29