/third_party/mesa3d/src/freedreno/drm/ |
D | freedreno_bo.c | 33 void bo_del(struct fd_bo *bo); 37 set_name(struct fd_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() 48 struct fd_bo *bo = NULL; in lookup_bo() local 52 bo = fd_bo_ref(entry->data); in lookup_bo() 55 list_delinit(&bo->list); in lookup_bo() 57 return bo; in lookup_bo() 61 fd_bo_init_common(struct fd_bo *bo, struct fd_device *dev) in fd_bo_init_common() argument 64 assert(bo->size); in fd_bo_init_common() [all …]
|
/third_party/mesa3d/src/etnaviv/drm/ |
D | etnaviv_bo.c | 36 static void set_name(struct etna_bo *bo, uint32_t name) in set_name() argument 40 bo->name = name; in set_name() 42 _mesa_hash_table_insert(bo->dev->name_table, &bo->name, bo); in set_name() 45 int etna_bo_is_idle(struct etna_bo *bo) in etna_bo_is_idle() argument 47 return etna_bo_cpu_prep(bo, in etna_bo_is_idle() 54 static void _etna_bo_free(struct etna_bo *bo) in _etna_bo_free() argument 56 DEBUG_BO("Del bo:", bo); in _etna_bo_free() 57 VG_BO_FREE(bo); in _etna_bo_free() 61 if (bo->va) in _etna_bo_free() 62 util_vma_heap_free(&bo->dev->address_space, bo->va, bo->size); in _etna_bo_free() [all …]
|
/third_party/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 …]
|
/third_party/mesa3d/src/gallium/drivers/crocus/ |
D | crocus_bufmgr.c | 173 static int bo_set_tiling_internal(struct crocus_bo *bo, uint32_t tiling_mode, 176 static void bo_free(struct crocus_bo *bo); 194 struct crocus_bo *bo = entry ? entry->data : NULL; in find_and_ref_external_bo() local 196 if (bo) { in find_and_ref_external_bo() 197 assert(bo->external); in find_and_ref_external_bo() 198 assert(!bo->reusable); in find_and_ref_external_bo() 205 if (bo->head.prev || bo->head.next) in find_and_ref_external_bo() 206 list_del(&bo->head); in find_and_ref_external_bo() 208 crocus_bo_reference(bo); in find_and_ref_external_bo() 211 return bo; in find_and_ref_external_bo() [all …]
|
/third_party/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 …]
|
/third_party/mesa3d/src/gallium/drivers/v3d/ |
D | v3d_bufmgr.c | 50 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 …]
|
/third_party/mesa3d/src/gallium/drivers/iris/ |
D | iris_bufmgr.c | 180 struct iris_bo *bo; member 256 static void bo_free(struct iris_bo *bo); 262 struct iris_bo *bo = entry ? entry->data : NULL; in find_and_ref_external_bo() local 264 if (bo) { in find_and_ref_external_bo() 265 assert(iris_bo_is_external(bo)); in find_and_ref_external_bo() 266 assert(iris_bo_is_real(bo)); in find_and_ref_external_bo() 267 assert(!bo->real.reusable); in find_and_ref_external_bo() 274 if (list_is_linked(&bo->head)) in find_and_ref_external_bo() 275 list_del(&bo->head); in find_and_ref_external_bo() 277 iris_bo_reference(bo); in find_and_ref_external_bo() [all …]
|
D | iris_bufmgr.h | 324 iris_bo_reference(struct iris_bo *bo) in iris_bo_reference() argument 326 p_atomic_inc(&bo->refcount); in iris_bo_reference() 333 void iris_bo_unreference(struct iris_bo *bo); 354 struct iris_bo *bo, unsigned flags); 360 static inline int iris_bo_unmap(struct iris_bo *bo) { return 0; } in iris_bo_unmap() argument 369 void iris_bo_wait_rendering(struct iris_bo *bo); 383 int iris_bo_flink(struct iris_bo *bo, uint32_t *name); 390 iris_bo_is_real(struct iris_bo *bo) in iris_bo_is_real() argument 392 return bo->gem_handle != 0; in iris_bo_is_real() 400 iris_get_backing_bo(struct iris_bo *bo) in iris_get_backing_bo() argument [all …]
|
/third_party/mesa3d/src/gallium/drivers/lima/ |
D | lima_bo.c | 79 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 …]
|
/third_party/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 …]
|
/third_party/mesa3d/src/panfrost/lib/ |
D | pan_bo.c | 63 struct panfrost_bo *bo; in panfrost_bo_alloc() local 80 bo = pan_lookup_bo(dev, create_bo.handle); in panfrost_bo_alloc() 81 assert(!memcmp(bo, &((struct panfrost_bo){}), sizeof(*bo))); in panfrost_bo_alloc() 83 bo->size = create_bo.size; in panfrost_bo_alloc() 84 bo->ptr.gpu = create_bo.offset; in panfrost_bo_alloc() 85 bo->gem_handle = create_bo.handle; in panfrost_bo_alloc() 86 bo->flags = flags; in panfrost_bo_alloc() 87 bo->dev = dev; in panfrost_bo_alloc() 88 bo->label = label; in panfrost_bo_alloc() 89 return bo; in panfrost_bo_alloc() [all …]
|
/third_party/mesa3d/src/gallium/winsys/radeon/drm/ |
D | radeon_drm_bo.c | 51 static inline struct radeon_bo *radeon_bo(struct pb_buffer *bo) in radeon_bo() argument 53 return (struct radeon_bo *)bo; in radeon_bo() 62 static bool radeon_real_bo_is_busy(struct radeon_bo *bo) in radeon_real_bo_is_busy() argument 66 args.handle = bo->handle; in radeon_real_bo_is_busy() 67 return drmCommandWriteRead(bo->rws->fd, DRM_RADEON_GEM_BUSY, in radeon_real_bo_is_busy() 71 static bool radeon_bo_is_busy(struct radeon_bo *bo) in radeon_bo_is_busy() argument 76 if (bo->handle) in radeon_bo_is_busy() 77 return radeon_real_bo_is_busy(bo); in radeon_bo_is_busy() 79 mtx_lock(&bo->rws->bo_fence_lock); in radeon_bo_is_busy() 80 for (num_idle = 0; num_idle < bo->u.slab.num_fences; ++num_idle) { in radeon_bo_is_busy() [all …]
|
/third_party/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 …]
|
/third_party/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() 180 bo->dev = omap_device_ref(dev); in bo_from_handle() 181 bo->handle = handle; in bo_from_handle() 182 bo->fd = -1; in bo_from_handle() 183 atomic_set(&bo->refcnt, 1); in bo_from_handle() [all …]
|
/third_party/mesa3d/src/gallium/winsys/amdgpu/drm/ |
D | amdgpu_bo.c | 55 struct amdgpu_winsys_bo *bo = amdgpu_winsys_bo(_buf); in amdgpu_bo_wait() local 59 if (p_atomic_read(&bo->num_active_ioctls)) in amdgpu_bo_wait() 66 if (!os_wait_until_zero_abs_timeout(&bo->num_active_ioctls, abs_timeout)) in amdgpu_bo_wait() 70 if (bo->bo && bo->u.real.is_shared) { in amdgpu_bo_wait() 78 r = amdgpu_bo_wait_for_idle(bo->bo, timeout, &buffer_busy); in amdgpu_bo_wait() 91 for (idle_fences = 0; idle_fences < bo->num_fences; ++idle_fences) { in amdgpu_bo_wait() 92 if (!amdgpu_fence_wait(bo->fences[idle_fences], 0, false)) in amdgpu_bo_wait() 98 amdgpu_fence_reference(&bo->fences[i], NULL); in amdgpu_bo_wait() 100 memmove(&bo->fences[0], &bo->fences[idle_fences], in amdgpu_bo_wait() 101 (bo->num_fences - idle_fences) * sizeof(*bo->fences)); in amdgpu_bo_wait() [all …]
|
/third_party/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() 42 if (bo->map) in drm_tegra_bo_free() 43 munmap(bo->map, bo->size); in drm_tegra_bo_free() 45 drmCloseBufferHandle(drm->fd, bo->handle); in drm_tegra_bo_free() 47 free(bo); in drm_tegra_bo_free() 105 struct drm_tegra_bo *bo; in drm_tegra_bo_alloc() local 107 bo = calloc(1, sizeof(*bo)); in drm_tegra_bo_alloc() 108 if (!bo) in drm_tegra_bo_alloc() 111 atomic_set(&bo->ref, 1); in drm_tegra_bo_alloc() [all …]
|
/third_party/mesa3d/src/broadcom/vulkan/ |
D | v3dv_bo.c | 85 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() 120 bo->name = name; in bo_from_cache() 121 p_atomic_set(&bo->refcnt, 1); in bo_from_cache() [all …]
|
/third_party/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 …]
|
/third_party/libdrm/amdgpu/ |
D | amdgpu_bo.c | 47 struct amdgpu_bo *bo; in amdgpu_bo_create() local 50 bo = calloc(1, sizeof(struct amdgpu_bo)); in amdgpu_bo_create() 51 if (!bo) in amdgpu_bo_create() 54 r = handle_table_insert(&dev->bo_handles, handle, bo); in amdgpu_bo_create() 56 free(bo); in amdgpu_bo_create() 60 atomic_set(&bo->refcount, 1); in amdgpu_bo_create() 61 bo->dev = dev; in amdgpu_bo_create() 62 bo->alloc_size = size; in amdgpu_bo_create() 63 bo->handle = handle; in amdgpu_bo_create() 64 pthread_mutex_init(&bo->cpu_access_mutex, NULL); in amdgpu_bo_create() [all …]
|
/third_party/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 …]
|
/third_party/mesa3d/src/freedreno/drm/virtio/ |
D | virtio_bo.c | 31 struct fd_bo *bo = &virtio_bo->base; in bo_allocate() local 34 .handle = bo->handle, in bo_allocate() 38 ret = drmIoctl(bo->dev->fd, DRM_IOCTL_VIRTGPU_MAP, &req); in bo_allocate() 51 virtio_bo_offset(struct fd_bo *bo, uint64_t *offset) in virtio_bo_offset() argument 53 struct virtio_bo *virtio_bo = to_virtio_bo(bo); in virtio_bo_offset() 62 virtio_bo_cpu_prep_guest(struct fd_bo *bo) in virtio_bo_cpu_prep_guest() argument 65 .handle = bo->handle, in virtio_bo_cpu_prep_guest() 70 ret = drmIoctl(bo->dev->fd, DRM_IOCTL_VIRTGPU_WAIT, &args); in virtio_bo_cpu_prep_guest() 78 virtio_bo_cpu_prep(struct fd_bo *bo, struct fd_pipe *pipe, uint32_t op) in virtio_bo_cpu_prep() argument 89 ret = virtio_bo_cpu_prep_guest(bo); in virtio_bo_cpu_prep() [all …]
|
/third_party/mesa3d/src/amd/vulkan/winsys/amdgpu/ |
D | radv_amdgpu_bo.c | 48 radv_amdgpu_bo_va_op(struct radv_amdgpu_winsys *ws, amdgpu_bo_handle bo, uint64_t offset, in radv_amdgpu_bo_va_op() argument 53 if (bo) { in radv_amdgpu_bo_va_op() 65 return amdgpu_bo_va_op_raw(ws->dev, bo, offset, size, addr, flags, ops); in radv_amdgpu_bo_va_op() 77 radv_amdgpu_winsys_rebuild_bo_list(struct radv_amdgpu_winsys_bo *bo) in radv_amdgpu_winsys_rebuild_bo_list() argument 79 if (bo->bo_capacity < bo->range_count) { in radv_amdgpu_winsys_rebuild_bo_list() 80 uint32_t new_count = MAX2(bo->bo_capacity * 2, bo->range_count); in radv_amdgpu_winsys_rebuild_bo_list() 82 realloc(bo->bos, new_count * sizeof(struct radv_amdgpu_winsys_bo *)); in radv_amdgpu_winsys_rebuild_bo_list() 85 bo->bos = bos; in radv_amdgpu_winsys_rebuild_bo_list() 86 bo->bo_capacity = new_count; in radv_amdgpu_winsys_rebuild_bo_list() 90 for (uint32_t i = 0; i < bo->range_count; ++i) in radv_amdgpu_winsys_rebuild_bo_list() [all …]
|
/third_party/mesa3d/src/freedreno/vulkan/ |
D | tu_suballoc.c | 35 suballoc->bo = NULL; in tu_bo_suballocator_init() 42 if (suballoc->bo) in tu_bo_suballocator_finish() 43 tu_bo_finish(suballoc->dev, suballoc->bo); in tu_bo_suballocator_finish() 53 struct tu_bo *bo = suballoc->bo; in tu_suballoc_bo_alloc() local 54 if (bo) { in tu_suballoc_bo_alloc() 56 if (offset + size <= bo->size) { in tu_suballoc_bo_alloc() 57 suballoc_bo->bo = tu_bo_get_ref(bo); in tu_suballoc_bo_alloc() 58 suballoc_bo->iova = bo->iova + offset; in tu_suballoc_bo_alloc() 64 tu_bo_finish(suballoc->dev, bo); in tu_suballoc_bo_alloc() 65 suballoc->bo = NULL; in tu_suballoc_bo_alloc() [all …]
|
/third_party/mesa3d/src/gbm/main/ |
D | gbm.c | 154 gbm_bo_get_width(struct gbm_bo *bo) in gbm_bo_get_width() argument 156 return bo->v0.width; in gbm_bo_get_width() 165 gbm_bo_get_height(struct gbm_bo *bo) in gbm_bo_get_height() argument 167 return bo->v0.height; in gbm_bo_get_height() 179 gbm_bo_get_stride(struct gbm_bo *bo) in gbm_bo_get_stride() argument 181 return gbm_bo_get_stride_for_plane(bo, 0); in gbm_bo_get_stride() 192 gbm_bo_get_stride_for_plane(struct gbm_bo *bo, int plane) in gbm_bo_get_stride_for_plane() argument 194 return bo->gbm->v0.bo_get_stride(bo, plane); in gbm_bo_get_stride_for_plane() 205 gbm_bo_get_format(struct gbm_bo *bo) in gbm_bo_get_format() argument 207 return bo->v0.format; in gbm_bo_get_format() [all …]
|