Home
last modified time | relevance | path

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

12345678910>>...45

/external/mesa3d/src/freedreno/drm/
Dfreedreno_bo.c33 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 _mesa_hash_table_insert(bo->dev->name_table, &bo->name, bo); in set_name()
46 struct fd_bo *bo = NULL; in lookup_bo() local
50 bo = fd_bo_ref(entry->data); in lookup_bo()
53 list_delinit(&bo->list); in lookup_bo()
55 return bo; in lookup_bo()
62 struct fd_bo *bo; in bo_from_handle() local
64 bo = dev->funcs->bo_from_handle(dev, size, handle); in bo_from_handle()
[all …]
/external/libdrm/freedreno/
Dfreedreno_bo.c33 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/mesa3d/src/etnaviv/drm/
Detnaviv_bo.c34 void _etna_bo_del(struct etna_bo *bo);
37 static void set_name(struct etna_bo *bo, uint32_t name) in set_name() argument
39 bo->name = name; in set_name()
41 _mesa_hash_table_insert(bo->dev->name_table, &bo->name, bo); in set_name()
45 void _etna_bo_del(struct etna_bo *bo) in _etna_bo_del() argument
47 VG_BO_FREE(bo); in _etna_bo_del()
49 if (bo->va) in _etna_bo_del()
50 util_vma_heap_free(&bo->dev->address_space, bo->va, bo->size); in _etna_bo_del()
52 if (bo->map) in _etna_bo_del()
53 os_munmap(bo->map, bo->size); in _etna_bo_del()
[all …]
/external/libdrm/etnaviv/
Detnaviv_bo.c31 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/gallium/drivers/iris/
Diris_bufmgr.c189 static int bo_set_tiling_internal(struct iris_bo *bo, uint32_t tiling_mode,
192 static void bo_free(struct iris_bo *bo);
198 struct iris_bo *bo = entry ? entry->data : NULL; in find_and_ref_external_bo() local
200 if (bo) { in find_and_ref_external_bo()
201 assert(bo->external); in find_and_ref_external_bo()
202 assert(!bo->reusable); in find_and_ref_external_bo()
209 if (bo->head.prev || bo->head.next) in find_and_ref_external_bo()
210 list_del(&bo->head); in find_and_ref_external_bo()
212 iris_bo_reference(bo); in find_and_ref_external_bo()
215 return bo; in find_and_ref_external_bo()
[all …]
/external/minigbm/
Ddrv.c213 struct bo *drv_bo_new(struct driver *drv, uint32_t width, uint32_t height, uint32_t format, in drv_bo_new()
217 struct bo *bo; in drv_bo_new() local
218 bo = (struct bo *)calloc(1, sizeof(*bo)); in drv_bo_new()
220 if (!bo) in drv_bo_new()
223 bo->drv = drv; in drv_bo_new()
224 bo->meta.width = width; in drv_bo_new()
225 bo->meta.height = height; in drv_bo_new()
226 bo->meta.format = format; in drv_bo_new()
227 bo->meta.use_flags = use_flags; in drv_bo_new()
228 bo->meta.num_planes = drv_num_planes_from_format(format); in drv_bo_new()
[all …]
Dgbm.c101 PUBLIC void gbm_surface_release_buffer(struct gbm_surface *surface, struct gbm_bo *bo) in gbm_surface_release_buffer() argument
117 struct gbm_bo *bo; in gbm_bo_new() local
119 bo = (struct gbm_bo *)calloc(1, sizeof(*bo)); in gbm_bo_new()
120 if (!bo) in gbm_bo_new()
123 bo->gbm = gbm; in gbm_bo_new()
124 bo->gbm_format = format; in gbm_bo_new()
126 return bo; in gbm_bo_new()
132 struct gbm_bo *bo; in gbm_bo_create() local
137 bo = gbm_bo_new(gbm, format); in gbm_bo_create()
139 if (!bo) in gbm_bo_create()
[all …]
/external/mesa3d/src/gallium/drivers/v3d/
Dv3d_bufmgr.c50 list_for_each_entry(struct v3d_bo, bo, &cache->time_list, time_list) { in v3d_bo_dump_stats()
52 cache_size += bo->size; in v3d_bo_dump_stats()
81 v3d_bo_remove_from_cache(struct v3d_bo_cache *cache, struct v3d_bo *bo) in v3d_bo_remove_from_cache() argument
83 list_del(&bo->time_list); in v3d_bo_remove_from_cache()
84 list_del(&bo->size_list); in v3d_bo_remove_from_cache()
96 struct v3d_bo *bo = NULL; in v3d_bo_from_cache() local
99 bo = list_first_entry(&cache->size_list[page_index], in v3d_bo_from_cache()
106 if (!v3d_bo_wait(bo, 0, NULL)) { in v3d_bo_from_cache()
111 pipe_reference_init(&bo->reference, 1); in v3d_bo_from_cache()
112 v3d_bo_remove_from_cache(cache, bo); in v3d_bo_from_cache()
[all …]
/external/mesa3d/src/mesa/drivers/dri/i965/
Dbrw_bufmgr.c192 static int bo_set_tiling_internal(struct brw_bo *bo, uint32_t tiling_mode,
195 static void bo_free(struct brw_bo *bo);
467 brw_bo_busy(struct brw_bo *bo) in brw_bo_busy() argument
469 struct brw_bufmgr *bufmgr = bo->bufmgr; in brw_bo_busy()
470 struct drm_i915_gem_busy busy = { .handle = bo->gem_handle }; in brw_bo_busy()
474 bo->idle = !busy.busy; in brw_bo_busy()
481 brw_bo_madvise(struct brw_bo *bo, int state) in brw_bo_madvise() argument
484 .handle = bo->gem_handle, in brw_bo_madvise()
489 drmIoctl(bo->bufmgr->fd, DRM_IOCTL_I915_GEM_MADVISE, &madv); in brw_bo_madvise()
499 list_for_each_entry_safe(struct brw_bo, bo, &bucket->head, head) { in brw_bo_cache_purge_bucket()
[all …]
/external/mesa3d/src/panfrost/lib/
Dpan_bo.c62 struct panfrost_bo *bo; in panfrost_bo_alloc() local
79 bo = pan_lookup_bo(dev, create_bo.handle); in panfrost_bo_alloc()
80 assert(!memcmp(bo, &((struct panfrost_bo){}), sizeof(*bo))); in panfrost_bo_alloc()
82 bo->size = create_bo.size; in panfrost_bo_alloc()
83 bo->ptr.gpu = create_bo.offset; in panfrost_bo_alloc()
84 bo->gem_handle = create_bo.handle; in panfrost_bo_alloc()
85 bo->flags = flags; in panfrost_bo_alloc()
86 bo->dev = dev; in panfrost_bo_alloc()
87 return bo; in panfrost_bo_alloc()
91 panfrost_bo_free(struct panfrost_bo *bo) in panfrost_bo_free() argument
[all …]
/external/mesa3d/src/gallium/drivers/lima/
Dlima_bo.c79 lima_bo_cache_remove(struct lima_bo *bo) in lima_bo_cache_remove() argument
81 list_del(&bo->size_list); in lima_bo_cache_remove()
82 list_del(&bo->time_list); in lima_bo_cache_remove()
95 lima_bo_free(struct lima_bo *bo) in lima_bo_free() argument
97 struct lima_screen *screen = bo->screen; in lima_bo_free()
101 bo, bo->size); in lima_bo_free()
105 (void *)(uintptr_t)bo->handle); in lima_bo_free()
106 if (bo->flink_name) in lima_bo_free()
108 (void *)(uintptr_t)bo->flink_name); in lima_bo_free()
111 if (bo->map) in lima_bo_free()
[all …]
/external/mesa3d/src/gallium/drivers/vc4/
Dvc4_bufmgr.c52 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/mesa3d/src/gallium/winsys/amdgpu/drm/
Damdgpu_bo.c53 struct amdgpu_winsys_bo *bo = amdgpu_winsys_bo(_buf); in amdgpu_bo_wait() local
54 struct amdgpu_winsys *ws = bo->ws; in amdgpu_bo_wait()
58 if (p_atomic_read(&bo->num_active_ioctls)) in amdgpu_bo_wait()
65 if (!os_wait_until_zero_abs_timeout(&bo->num_active_ioctls, abs_timeout)) in amdgpu_bo_wait()
69 if (bo->is_shared) { in amdgpu_bo_wait()
77 r = amdgpu_bo_wait_for_idle(bo->bo, timeout, &buffer_busy); in amdgpu_bo_wait()
90 for (idle_fences = 0; idle_fences < bo->num_fences; ++idle_fences) { in amdgpu_bo_wait()
91 if (!amdgpu_fence_wait(bo->fences[idle_fences], 0, false)) in amdgpu_bo_wait()
97 amdgpu_fence_reference(&bo->fences[i], NULL); in amdgpu_bo_wait()
99 memmove(&bo->fences[0], &bo->fences[idle_fences], in amdgpu_bo_wait()
[all …]
/external/libdrm/intel/
Dintel_bufmgr.c86 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 …]
/external/libdrm/omap/
Domap_drm.c163 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/tegra/
Dtegra.c38 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/igt-gpu-tools/tests/
Dvc4_purgeable_bo.c55 struct igt_vc4_bo *bo; in igt_vc4_alloc_mmap_max_bo() local
64 bo = malloc(sizeof(*bo)); in igt_vc4_alloc_mmap_max_bo()
65 igt_assert(bo); in igt_vc4_alloc_mmap_max_bo()
66 bo->handle = create.handle; in igt_vc4_alloc_mmap_max_bo()
67 bo->size = create.size; in igt_vc4_alloc_mmap_max_bo()
68 bo->map = igt_vc4_mmap_bo(fd, bo->handle, bo->size, in igt_vc4_alloc_mmap_max_bo()
70 igt_list_add_tail(&bo->node, list); in igt_vc4_alloc_mmap_max_bo()
76 struct igt_vc4_bo *bo; in igt_vc4_unmap_free_bo_pool() local
79 bo = igt_list_first_entry(list, bo, node); in igt_vc4_unmap_free_bo_pool()
80 igt_assert(bo); in igt_vc4_unmap_free_bo_pool()
[all …]
Dvgem_basic.c73 struct vgem_bo bo; in test_create() local
75 bo.width = 0; in test_create()
76 bo.height = 0; in test_create()
77 bo.bpp = 0; in test_create()
78 igt_assert_eq(__vgem_create(fd, &bo), -EINVAL); in test_create()
80 bo.width = 1; in test_create()
81 bo.height = 1; in test_create()
82 bo.bpp = 1; in test_create()
83 vgem_create(fd, &bo); in test_create()
84 igt_assert_eq(bo.size, 4096); in test_create()
[all …]
Deviction_common.c37 void (*close)(int fd, uint32_t bo);
40 void (*clear)(int fd, uint32_t bo, uint64_t size);
63 uint32_t *bo, *sel; in minor_evictions() local
78 bo = malloc((nr_surfaces + total_surfaces)*sizeof(*bo)); in minor_evictions()
79 igt_assert(bo); in minor_evictions()
82 bo[n] = ops->create(fd, surface_size); in minor_evictions()
84 sel = bo + n; in minor_evictions()
89 sel[n] = bo[m%total_surfaces]; in minor_evictions()
93 ret = ops->copy(fd, bo[0], bo[0], bo, total_surfaces); in minor_evictions()
98 ops->close(fd, bo[n]); in minor_evictions()
[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 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/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.c47 amdgpu_bo_handle bo, in radv_amdgpu_bo_va_op() argument
56 if (bo) { in radv_amdgpu_bo_va_op()
70 return amdgpu_bo_va_op_raw(ws->dev, bo, offset, size, addr, in radv_amdgpu_bo_va_op()
75 radv_amdgpu_winsys_virtual_map(struct radv_amdgpu_winsys_bo *bo, in radv_amdgpu_winsys_virtual_map() argument
81 if (!range->bo) { in radv_amdgpu_winsys_virtual_map()
82 if (!bo->ws->info.has_sparse_vm_mappings) in radv_amdgpu_winsys_virtual_map()
87 p_atomic_inc(&range->bo->ref_count); in radv_amdgpu_winsys_virtual_map()
89 int r = radv_amdgpu_bo_va_op(bo->ws, range->bo ? range->bo->bo : NULL, in radv_amdgpu_winsys_virtual_map()
91 range->offset + bo->base.va, 0, in radv_amdgpu_winsys_virtual_map()
98 radv_amdgpu_winsys_virtual_unmap(struct radv_amdgpu_winsys_bo *bo, in radv_amdgpu_winsys_virtual_unmap() argument
[all …]
/external/mesa3d/src/broadcom/vulkan/
Dv3dv_bo.c85 bo_remove_from_cache(struct v3dv_bo_cache *cache, struct v3dv_bo *bo) in bo_remove_from_cache() argument
87 list_del(&bo->time_list); in bo_remove_from_cache()
88 list_del(&bo->size_list); in bo_remove_from_cache()
91 cache->cache_size -= bo->size; in bo_remove_from_cache()
103 struct v3dv_bo *bo = NULL; in bo_from_cache() local
107 bo = list_first_entry(&cache->size_list[page_index], in bo_from_cache()
114 if (!v3dv_bo_wait(device, bo, 0)) { in bo_from_cache()
119 bo_remove_from_cache(cache, bo); in bo_from_cache()
121 bo->name = name; in bo_from_cache()
124 return bo; in bo_from_cache()
[all …]
/external/drm_hwcomposer/drm/
DDrmGenericImporter.cpp43 int DrmGenericImporter::ImportBuffer(hwc_drm_bo_t *bo) { in ImportBuffer() argument
44 int ret = drmPrimeFDToHandle(drm_->fd(), bo->prime_fds[0], in ImportBuffer()
45 &bo->gem_handles[0]); in ImportBuffer()
47 ALOGE("failed to import prime fd %d ret=%d", bo->prime_fds[0], ret); in ImportBuffer()
52 int fd = bo->prime_fds[i]; in ImportBuffer()
54 if (fd != bo->prime_fds[0]) { in ImportBuffer()
58 bo->gem_handles[i] = bo->gem_handles[0]; in ImportBuffer()
62 if (!has_modifier_support_ && bo->modifiers[0]) { in ImportBuffer()
64 bo->modifiers[0]); in ImportBuffer()
68 if (!bo->with_modifiers) in ImportBuffer()
[all …]
/external/libdrm/tests/modetest/
Dbuffers.c43 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 …]

12345678910>>...45