bo->dev = fd_device_ref(dev);
bo->size = size;
bo->handle = handle;
+ bo->iova = bo->funcs->iova(bo);
+
p_atomic_set(&bo->refcnt, 1);
list_inithead(&bo->list);
/* add ourself into the handle table: */
uint64_t fd_bo_get_iova(struct fd_bo *bo)
{
- if (!bo->iova)
- bo->iova = bo->funcs->iova(bo);
return bo->iova;
}
-void fd_bo_put_iova(struct fd_bo *bo)
-{
- /* currently a no-op */
-}
-
struct fd_bo * fd_bo_ref(struct fd_bo *bo)
{
p_atomic_inc(&bo->refcnt);
struct fd_bo * fd_bo_from_name(struct fd_device *dev, uint32_t name);
struct fd_bo * fd_bo_from_dmabuf(struct fd_device *dev, int fd);
uint64_t fd_bo_get_iova(struct fd_bo *bo);
-void fd_bo_put_iova(struct fd_bo *bo);
struct fd_bo * fd_bo_ref(struct fd_bo *bo);
void fd_bo_del(struct fd_bo *bo);
int fd_bo_get_name(struct fd_bo *bo, uint32_t *name);
pipe = msm_ring->u.submit->pipe;
}
- uint64_t iova = fd_bo_get_iova(reloc->bo) + reloc->offset;
+ uint64_t iova = reloc->bo->iova + reloc->offset;
int shift = reloc->shift;
if (shift < 0)
for (unsigned i = 0; i < count; i++) {
unsigned n = i + first;
- if (so->buf[n]) {
- struct fd_resource *rsc = fd_resource(so->buf[n]);
- fd_bo_put_iova(rsc->bo);
- }
pipe_resource_reference(&so->buf[n], NULL);
}