Lines Matching refs:gntdev_dmabuf_attach
228 struct gntdev_dmabuf_attachment *gntdev_dmabuf_attach; in dmabuf_exp_ops_attach() local
230 gntdev_dmabuf_attach = kzalloc(sizeof(*gntdev_dmabuf_attach), in dmabuf_exp_ops_attach()
232 if (!gntdev_dmabuf_attach) in dmabuf_exp_ops_attach()
235 gntdev_dmabuf_attach->dir = DMA_NONE; in dmabuf_exp_ops_attach()
236 attach->priv = gntdev_dmabuf_attach; in dmabuf_exp_ops_attach()
243 struct gntdev_dmabuf_attachment *gntdev_dmabuf_attach = attach->priv; in dmabuf_exp_ops_detach() local
245 if (gntdev_dmabuf_attach) { in dmabuf_exp_ops_detach()
246 struct sg_table *sgt = gntdev_dmabuf_attach->sgt; in dmabuf_exp_ops_detach()
249 if (gntdev_dmabuf_attach->dir != DMA_NONE) in dmabuf_exp_ops_detach()
251 gntdev_dmabuf_attach->dir, in dmabuf_exp_ops_detach()
257 kfree(gntdev_dmabuf_attach); in dmabuf_exp_ops_detach()
266 struct gntdev_dmabuf_attachment *gntdev_dmabuf_attach = attach->priv; in dmabuf_exp_ops_map_dma_buf() local
273 if (dir == DMA_NONE || !gntdev_dmabuf_attach) in dmabuf_exp_ops_map_dma_buf()
277 if (gntdev_dmabuf_attach->dir == dir) in dmabuf_exp_ops_map_dma_buf()
278 return gntdev_dmabuf_attach->sgt; in dmabuf_exp_ops_map_dma_buf()
284 if (gntdev_dmabuf_attach->dir != DMA_NONE) in dmabuf_exp_ops_map_dma_buf()
296 gntdev_dmabuf_attach->sgt = sgt; in dmabuf_exp_ops_map_dma_buf()
297 gntdev_dmabuf_attach->dir = dir; in dmabuf_exp_ops_map_dma_buf()