• Home
  • Raw
  • Download

Lines Matching refs:sgt

103 	struct sg_table *sgt;  in vb2_dma_sg_alloc()  local
139 sgt = &buf->sg_table; in vb2_dma_sg_alloc()
144 sgt->nents = dma_map_sg_attrs(buf->dev, sgt->sgl, sgt->orig_nents, in vb2_dma_sg_alloc()
146 if (!sgt->nents) in vb2_dma_sg_alloc()
176 struct sg_table *sgt = &buf->sg_table; in vb2_dma_sg_put() local
182 dma_unmap_sg_attrs(buf->dev, sgt->sgl, sgt->orig_nents, in vb2_dma_sg_put()
198 struct sg_table *sgt = buf->dma_sgt; in vb2_dma_sg_prepare() local
204 dma_sync_sg_for_device(buf->dev, sgt->sgl, sgt->orig_nents, in vb2_dma_sg_prepare()
211 struct sg_table *sgt = buf->dma_sgt; in vb2_dma_sg_finish() local
217 dma_sync_sg_for_cpu(buf->dev, sgt->sgl, sgt->orig_nents, buf->dma_dir); in vb2_dma_sg_finish()
225 struct sg_table *sgt; in vb2_dma_sg_get_userptr() local
255 sgt = &buf->sg_table; in vb2_dma_sg_get_userptr()
260 sgt->nents = dma_map_sg_attrs(buf->dev, sgt->sgl, sgt->orig_nents, in vb2_dma_sg_get_userptr()
262 if (!sgt->nents) in vb2_dma_sg_get_userptr()
283 struct sg_table *sgt = &buf->sg_table; in vb2_dma_sg_put_userptr() local
288 dma_unmap_sg_attrs(buf->dev, sgt->sgl, sgt->orig_nents, buf->dma_dir, in vb2_dma_sg_put_userptr()
368 struct sg_table sgt; member
378 struct sg_table *sgt; in vb2_dma_sg_dmabuf_ops_attach() local
386 sgt = &attach->sgt; in vb2_dma_sg_dmabuf_ops_attach()
390 ret = sg_alloc_table(sgt, buf->dma_sgt->orig_nents, GFP_KERNEL); in vb2_dma_sg_dmabuf_ops_attach()
397 wr = sgt->sgl; in vb2_dma_sg_dmabuf_ops_attach()
398 for (i = 0; i < sgt->orig_nents; ++i) { in vb2_dma_sg_dmabuf_ops_attach()
414 struct sg_table *sgt; in vb2_dma_sg_dmabuf_ops_detach() local
419 sgt = &attach->sgt; in vb2_dma_sg_dmabuf_ops_detach()
423 dma_unmap_sg(db_attach->dev, sgt->sgl, sgt->orig_nents, in vb2_dma_sg_dmabuf_ops_detach()
425 sg_free_table(sgt); in vb2_dma_sg_dmabuf_ops_detach()
436 struct sg_table *sgt; in vb2_dma_sg_dmabuf_ops_map() local
440 sgt = &attach->sgt; in vb2_dma_sg_dmabuf_ops_map()
444 return sgt; in vb2_dma_sg_dmabuf_ops_map()
449 dma_unmap_sg(db_attach->dev, sgt->sgl, sgt->orig_nents, in vb2_dma_sg_dmabuf_ops_map()
455 sgt->nents = dma_map_sg(db_attach->dev, sgt->sgl, sgt->orig_nents, in vb2_dma_sg_dmabuf_ops_map()
457 if (!sgt->nents) { in vb2_dma_sg_dmabuf_ops_map()
467 return sgt; in vb2_dma_sg_dmabuf_ops_map()
471 struct sg_table *sgt, enum dma_data_direction dma_dir) in vb2_dma_sg_dmabuf_ops_unmap() argument
545 struct sg_table *sgt; in vb2_dma_sg_map_dmabuf() local
558 sgt = dma_buf_map_attachment(buf->db_attach, buf->dma_dir); in vb2_dma_sg_map_dmabuf()
559 if (IS_ERR(sgt)) { in vb2_dma_sg_map_dmabuf()
564 buf->dma_sgt = sgt; in vb2_dma_sg_map_dmabuf()
573 struct sg_table *sgt = buf->dma_sgt; in vb2_dma_sg_unmap_dmabuf() local
580 if (WARN_ON(!sgt)) { in vb2_dma_sg_unmap_dmabuf()
589 dma_buf_unmap_attachment(buf->db_attach, sgt, buf->dma_dir); in vb2_dma_sg_unmap_dmabuf()