/external/libdrm/freedreno/ |
D | freedreno_bo.c | 38 static void bo_del(struct fd_bo *bo); 41 static void set_name(struct fd_bo *bo, uint32_t name) in set_name() argument 43 bo->name = name; in set_name() 45 drmHashInsert(bo->dev->name_table, name, bo); in set_name() 51 struct fd_bo *bo = NULL; in lookup_bo() local 52 if (!drmHashLookup(tbl, key, (void **)&bo)) { in lookup_bo() 54 bo = fd_bo_ref(bo); in lookup_bo() 56 return bo; in lookup_bo() 63 struct fd_bo *bo; in bo_from_handle() local 65 bo = dev->funcs->bo_from_handle(dev, size, handle); in bo_from_handle() [all …]
|
/external/libdrm/tests/planetest/ |
D | bo.c | 16 void fill_bo(struct sp_bo *bo, uint8_t a, uint8_t r, uint8_t g, uint8_t b) in fill_bo() argument 18 draw_rect(bo, 0, 0, bo->width, bo->height, a, r, g, b); in fill_bo() 21 void draw_rect(struct sp_bo *bo, uint32_t x, uint32_t y, uint32_t width, in draw_rect() argument 26 if (xmax > bo->width) in draw_rect() 27 xmax = bo->width; in draw_rect() 28 if (ymax > bo->height) in draw_rect() 29 ymax = bo->height; in draw_rect() 32 uint8_t *row = bo->map_addr + i * bo->pitch; in draw_rect() 37 if (bo->format == DRM_FORMAT_ARGB8888 || in draw_rect() 38 bo->format == DRM_FORMAT_XRGB8888) in draw_rect() [all …]
|
/external/libdrm/omap/ |
D | omap_drm.c | 167 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 atomic_set(&bo->refcnt, 1); in bo_from_handle() 191 drmHashInsert(dev->handle_table, handle, bo); in bo_from_handle() [all …]
|
/external/libdrm/intel/ |
D | intel_bufmgr.c | 88 drm_intel_bo_reference(drm_intel_bo *bo) in drm_intel_bo_reference() argument 90 bo->bufmgr->bo_reference(bo); in drm_intel_bo_reference() 94 drm_intel_bo_unreference(drm_intel_bo *bo) in drm_intel_bo_unreference() argument 96 if (bo == NULL) in drm_intel_bo_unreference() 99 bo->bufmgr->bo_unreference(bo); in drm_intel_bo_unreference() 115 drm_intel_bo_subdata(drm_intel_bo *bo, unsigned long offset, in drm_intel_bo_subdata() argument 118 return bo->bufmgr->bo_subdata(bo, offset, size, data); in drm_intel_bo_subdata() 122 drm_intel_bo_get_subdata(drm_intel_bo *bo, unsigned long offset, in drm_intel_bo_get_subdata() argument 126 if (bo->bufmgr->bo_get_subdata) in drm_intel_bo_get_subdata() 127 return bo->bufmgr->bo_get_subdata(bo, offset, size, data); in drm_intel_bo_get_subdata() [all …]
|
D | intel_bufmgr_fake.c | 114 drm_intel_bo *bo; member 173 int (*exec) (drm_intel_bo *bo, unsigned int used, void *priv); 191 drm_intel_bo bo; member 228 void (*invalidate_cb) (drm_intel_bo *bo, void *ptr); 427 alloc_block(drm_intel_bo *bo) in alloc_block() argument 429 drm_intel_bo_fake *bo_fake = (drm_intel_bo_fake *) bo; in alloc_block() 431 (drm_intel_bufmgr_fake *) bo->bufmgr; in alloc_block() 439 sz = (bo->size + bo_fake->alignment - 1) & ~(bo_fake->alignment - 1); in alloc_block() 454 block->bo = bo; in alloc_block() 474 bo_fake = (drm_intel_bo_fake *) block->bo; in free_block() [all …]
|
D | intel_bufmgr_gem.c | 143 drm_intel_bo *bo; member 148 drm_intel_bo bo; member 267 drm_intel_gem_bo_get_tiling(drm_intel_bo *bo, uint32_t * tiling_mode, 271 drm_intel_gem_bo_set_tiling_internal(drm_intel_bo *bo, 275 static void drm_intel_gem_bo_unreference_locked_timed(drm_intel_bo *bo, 278 static void drm_intel_gem_bo_unreference(drm_intel_bo *bo); 280 static void drm_intel_gem_bo_free(drm_intel_bo *bo); 387 drm_intel_bo *bo = bufmgr_gem->exec_bos[i]; in drm_intel_gem_dump_validation_list() local 388 drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo; in drm_intel_gem_dump_validation_list() 397 drm_intel_bo *target_bo = bo_gem->reloc_target_info[j].bo; in drm_intel_gem_dump_validation_list() [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/tegra/ |
D | tegra.c | 42 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() 115 struct drm_tegra_bo *bo; in drm_tegra_bo_new() local 121 bo = calloc(1, sizeof(*bo)); in drm_tegra_bo_new() 122 if (!bo) in drm_tegra_bo_new() 125 atomic_set(&bo->ref, 1); in drm_tegra_bo_new() [all …]
|
/external/drm_gralloc/ |
D | gralloc_drm.cpp | 165 struct gralloc_drm_bo_t *bo; in validate_handle() local 175 bo = drm->drv->alloc(drm->drv, handle); in validate_handle() 177 bo = NULL; in validate_handle() 178 if (bo) { in validate_handle() 179 bo->drm = drm; in validate_handle() 180 bo->imported = 1; in validate_handle() 181 bo->handle = handle; in validate_handle() 182 bo->refcount = 1; in validate_handle() 186 handle->data = bo; in validate_handle() 205 struct gralloc_drm_bo_t *bo; in gralloc_drm_handle_unregister() local [all …]
|
/external/libdrm/exynos/ |
D | exynos_drm.c | 94 struct exynos_bo *bo; in exynos_bo_create() local 105 bo = calloc(sizeof(*bo), 1); in exynos_bo_create() 106 if (!bo) { in exynos_bo_create() 112 bo->dev = dev; in exynos_bo_create() 120 bo->handle = req.handle; in exynos_bo_create() 121 bo->size = size; in exynos_bo_create() 122 bo->flags = flags; in exynos_bo_create() 124 return bo; in exynos_bo_create() 127 free(bo); in exynos_bo_create() 171 drm_public void exynos_bo_destroy(struct exynos_bo *bo) in exynos_bo_destroy() argument [all …]
|
/external/mesa3d/src/gallium/winsys/radeon/drm/ |
D | radeon_drm_bo.c | 97 static INLINE struct radeon_bo *radeon_bo(struct pb_buffer *bo) in radeon_bo() argument 99 assert(bo->vtbl == &radeon_bo_vtbl); in radeon_bo() 100 return (struct radeon_bo *)bo; in radeon_bo() 134 struct radeon_bo *bo = NULL; in get_radeon_bo() local 137 bo = radeon_bo(_buf); in get_radeon_bo() 144 bo = radeon_bo(base_buf); in get_radeon_bo() 147 return bo; in get_radeon_bo() 152 struct radeon_bo *bo = get_radeon_bo(_buf); in radeon_bo_wait() local 154 while (p_atomic_read(&bo->num_active_ioctls)) { in radeon_bo_wait() 168 args.handle = bo->handle; in radeon_bo_wait() [all …]
|
/external/libdrm/libkms/ |
D | radeon.c | 82 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 …]
|
D | vmwgfx.c | 75 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 …]
|
D | intel.c | 79 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 …]
|
D | nouveau.c | 80 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 …]
|
D | dumb.c | 76 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 …]
|
D | exynos.c | 64 struct exynos_bo *bo; in exynos_bo_create() local 78 bo = calloc(1, sizeof(*bo)); in exynos_bo_create() 79 if (!bo) in exynos_bo_create() 100 bo->base.kms = kms; in exynos_bo_create() 101 bo->base.handle = arg.handle; in exynos_bo_create() 102 bo->base.size = size; in exynos_bo_create() 103 bo->base.pitch = pitch; in exynos_bo_create() 105 *out = &bo->base; in exynos_bo_create() 110 free(bo); in exynos_bo_create() 115 exynos_bo_get_prop(struct kms_bo *bo, unsigned key, unsigned *out) in exynos_bo_get_prop() argument [all …]
|
/external/libdrm/radeon/ |
D | radeon_bo.c | 39 drm_public 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 drm_public 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 drm_public 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 …]
|
D | radeon_bo_gem.c | 70 struct radeon_bo_gem *bo; in bo_open() local 73 bo = (struct radeon_bo_gem*)calloc(1, sizeof(struct radeon_bo_gem)); in bo_open() 74 if (bo == NULL) { in bo_open() 78 bo->base.bom = bom; in bo_open() 79 bo->base.handle = 0; in bo_open() 80 bo->base.size = size; in bo_open() 81 bo->base.alignment = alignment; in bo_open() 82 bo->base.domains = domains; in bo_open() 83 bo->base.flags = flags; in bo_open() 84 bo->base.ptr = NULL; in bo_open() [all …]
|
D | radeon_cs_space.c | 48 struct radeon_bo_int *bo; in radeon_cs_setup_bo() local 50 bo = sc->bo; in radeon_cs_setup_bo() 56 if (radeon_bo_is_static((struct radeon_bo *)sc->bo)) { in radeon_cs_setup_bo() 57 bo->space_accounted = sc->new_accounted = (read_domains << 16) | write_domain; in radeon_cs_setup_bo() 62 if (write_domain && (write_domain == bo->space_accounted)) { in radeon_cs_setup_bo() 63 sc->new_accounted = bo->space_accounted; in radeon_cs_setup_bo() 66 if (read_domains && ((read_domains << 16) == bo->space_accounted)) { in radeon_cs_setup_bo() 67 sc->new_accounted = bo->space_accounted; in radeon_cs_setup_bo() 71 if (bo->space_accounted == 0) { in radeon_cs_setup_bo() 74 sizes->op_vram_write += bo->size; in radeon_cs_setup_bo() [all …]
|
/external/drm_hwcomposer/ |
D | nvimporter.cpp | 70 int NvImporter::ImportBuffer(buffer_handle_t handle, hwc_drm_bo_t *bo) { in ImportBuffer() argument 71 memset(bo, 0, sizeof(hwc_drm_bo_t)); in ImportBuffer() 75 *bo = buf->bo; in ImportBuffer() 84 buf->bo.priv = buf; in ImportBuffer() 93 drm_->fd(), handle, &buf->bo); in ImportBuffer() 100 ret = drmModeAddFB2(drm_->fd(), buf->bo.width, buf->bo.height, buf->bo.format, in ImportBuffer() 101 buf->bo.gem_handles, buf->bo.pitches, buf->bo.offsets, in ImportBuffer() 102 &buf->bo.fb_id, 0); in ImportBuffer() 105 ReleaseBufferImpl(&buf->bo); in ImportBuffer() 116 ReleaseBufferImpl(&buf->bo); in ImportBuffer() [all …]
|
D | drmgenericimporter.cpp | 88 int DrmGenericImporter::ImportBuffer(buffer_handle_t handle, hwc_drm_bo_t *bo) { in ImportBuffer() argument 106 memset(bo, 0, sizeof(hwc_drm_bo_t)); in ImportBuffer() 107 bo->width = gr_handle->width; in ImportBuffer() 108 bo->height = gr_handle->height; in ImportBuffer() 109 bo->format = ConvertHalFormatToDrm(gr_handle->format); in ImportBuffer() 110 bo->pitches[0] = gr_handle->stride; in ImportBuffer() 111 bo->gem_handles[0] = gem_handle; in ImportBuffer() 112 bo->offsets[0] = 0; in ImportBuffer() 114 ret = drmModeAddFB2(drm_->fd(), bo->width, bo->height, bo->format, in ImportBuffer() 115 bo->gem_handles, bo->pitches, bo->offsets, &bo->fb_id, 0); in ImportBuffer() [all …]
|
/external/libdrm/freedreno/kgsl/ |
D | kgsl_bo.c | 50 struct fd_bo *bo = &kgsl_bo->base; in bo_alloc() local 53 .handle = bo->handle, in bo_alloc() 61 ret = drmCommandWriteRead(bo->dev->fd, DRM_KGSL_GEM_ALLOC, in bo_alloc() 74 static int kgsl_bo_offset(struct fd_bo *bo, uint64_t *offset) in kgsl_bo_offset() argument 76 struct kgsl_bo *kgsl_bo = to_kgsl_bo(bo); in kgsl_bo_offset() 84 static int kgsl_bo_cpu_prep(struct fd_bo *bo, struct fd_pipe *pipe, uint32_t op) in kgsl_bo_cpu_prep() argument 86 uint32_t timestamp = kgsl_bo_get_timestamp(to_kgsl_bo(bo)); in kgsl_bo_cpu_prep() 115 static void kgsl_bo_cpu_fini(struct fd_bo *bo) in kgsl_bo_cpu_fini() argument 119 static void kgsl_bo_destroy(struct fd_bo *bo) in kgsl_bo_destroy() argument 121 struct kgsl_bo *kgsl_bo = to_kgsl_bo(bo); in kgsl_bo_destroy() [all …]
|
/external/mesa3d/src/gbm/main/ |
D | gbm.c | 177 gbm_bo_get_width(struct gbm_bo *bo) in gbm_bo_get_width() argument 179 return bo->width; in gbm_bo_get_width() 188 gbm_bo_get_height(struct gbm_bo *bo) in gbm_bo_get_height() argument 190 return bo->height; in gbm_bo_get_height() 202 gbm_bo_get_stride(struct gbm_bo *bo) in gbm_bo_get_stride() argument 204 return bo->stride; in gbm_bo_get_stride() 215 gbm_bo_get_format(struct gbm_bo *bo) in gbm_bo_get_format() argument 217 return bo->format; in gbm_bo_get_format() 229 gbm_bo_get_handle(struct gbm_bo *bo) in gbm_bo_get_handle() argument 231 return bo->handle; in gbm_bo_get_handle() [all …]
|