Lines Matching refs:tb
128 struct tegra_m2m_buffer *tb = vb_to_tegra_buf(vb); in __tegra_buf_cleanup() local
131 if (tb->a[i]) { in __tegra_buf_cleanup()
132 tegra_vde_dmabuf_cache_unmap(ctx->vde, tb->a[i], true); in __tegra_buf_cleanup()
133 tb->a[i] = NULL; in __tegra_buf_cleanup()
136 if (tb->iova[i]) { in __tegra_buf_cleanup()
137 tegra_vde_iommu_unmap(ctx->vde, tb->iova[i]); in __tegra_buf_cleanup()
138 tb->iova[i] = NULL; in __tegra_buf_cleanup()
142 if (tb->aux) { in __tegra_buf_cleanup()
143 tegra_vde_free_bo(tb->aux); in __tegra_buf_cleanup()
144 tb->aux = NULL; in __tegra_buf_cleanup()
152 struct tegra_m2m_buffer *tb = vb_to_tegra_buf(vb); in tegra_buf_init() local
164 err = tegra_vde_alloc_bo(vde, &tb->aux, DMA_FROM_DEVICE, in tegra_buf_init()
180 dma_dir, &tb->a[i], in tegra_buf_init()
181 &tb->dma_base[i]); in tegra_buf_init()
193 err = tegra_vde_iommu_map(vde, sgt, &tb->iova[i], in tegra_buf_init()
198 tb->dma_base[i] = iova_dma_addr(&vde->iova, tb->iova[i]); in tegra_buf_init()
200 tb->dma_base[i] = vb2_dma_contig_plane_dma_addr(vb, i); in tegra_buf_init()
221 struct tegra_m2m_buffer *tb = vb_to_tegra_buf(vb); in tegra_buf_prepare() local
269 tb->dma_addr[i] = tb->dma_base[i] + offset; in tegra_buf_prepare()
274 swap(tb->dma_addr[1], tb->dma_addr[2]); in tegra_buf_prepare()