Lines Matching refs:hl_dmabuf
1686 struct hl_dmabuf_priv *hl_dmabuf; in hl_dmabuf_attach() local
1690 hl_dmabuf = dmabuf->priv; in hl_dmabuf_attach()
1691 hdev = hl_dmabuf->ctx->hdev; in hl_dmabuf_attach()
1705 struct hl_dmabuf_priv *hl_dmabuf; in hl_map_dmabuf() local
1709 hl_dmabuf = dma_buf->priv; in hl_map_dmabuf()
1710 hdev = hl_dmabuf->ctx->hdev; in hl_map_dmabuf()
1711 phys_pg_pack = hl_dmabuf->phys_pg_pack; in hl_map_dmabuf()
1728 &hl_dmabuf->device_address, in hl_map_dmabuf()
1730 hl_dmabuf->dmabuf->size, in hl_map_dmabuf()
1806 struct hl_dmabuf_priv *hl_dmabuf = dmabuf->priv; in hl_release_dmabuf() local
1809 if (!hl_dmabuf) in hl_release_dmabuf()
1812 ctx = hl_dmabuf->ctx; in hl_release_dmabuf()
1814 if (hl_dmabuf->memhash_hnode) in hl_release_dmabuf()
1815 memhash_node_export_put(ctx, hl_dmabuf->memhash_hnode); in hl_release_dmabuf()
1823 kfree(hl_dmabuf); in hl_release_dmabuf()
1834 struct hl_dmabuf_priv *hl_dmabuf, in export_dmabuf() argument
1844 exp_info.priv = hl_dmabuf; in export_dmabuf()
1846 hl_dmabuf->dmabuf = dma_buf_export(&exp_info); in export_dmabuf()
1847 if (IS_ERR(hl_dmabuf->dmabuf)) { in export_dmabuf()
1849 return PTR_ERR(hl_dmabuf->dmabuf); in export_dmabuf()
1852 fd = dma_buf_fd(hl_dmabuf->dmabuf, flags); in export_dmabuf()
1859 hl_dmabuf->ctx = ctx; in export_dmabuf()
1860 hl_ctx_get(hl_dmabuf->ctx); in export_dmabuf()
1874 hl_dmabuf->dmabuf->priv = NULL; in export_dmabuf()
1875 dma_buf_put(hl_dmabuf->dmabuf); in export_dmabuf()
2013 struct hl_dmabuf_priv *hl_dmabuf; in export_dmabuf_from_addr() local
2029 hl_dmabuf = kzalloc(sizeof(*hl_dmabuf), GFP_KERNEL); in export_dmabuf_from_addr()
2030 if (!hl_dmabuf) in export_dmabuf_from_addr()
2049 hl_dmabuf->phys_pg_pack = phys_pg_pack; in export_dmabuf_from_addr()
2050 hl_dmabuf->memhash_hnode = hnode; in export_dmabuf_from_addr()
2057 hl_dmabuf->device_address = export_addr; in export_dmabuf_from_addr()
2059 rc = export_dmabuf(ctx, hl_dmabuf, size, flags, dmabuf_fd); in export_dmabuf_from_addr()
2069 kfree(hl_dmabuf); in export_dmabuf_from_addr()