Lines Matching refs:sgt
104 struct sg_table *sgt;
145 sgt = &buf->sg_table;
150 if (dma_map_sgtable(buf->dev, sgt, buf->dma_dir,
181 struct sg_table *sgt = &buf->sg_table;
187 dma_unmap_sgtable(buf->dev, sgt, buf->dma_dir,
203 struct sg_table *sgt = buf->dma_sgt;
205 dma_sync_sgtable_for_device(buf->dev, sgt, buf->dma_dir);
211 struct sg_table *sgt = buf->dma_sgt;
213 dma_sync_sgtable_for_cpu(buf->dev, sgt, buf->dma_dir);
221 struct sg_table *sgt;
251 sgt = &buf->sg_table;
256 if (dma_map_sgtable(buf->dev, sgt, buf->dma_dir,
278 struct sg_table *sgt = &buf->sg_table;
283 dma_unmap_sgtable(buf->dev, sgt, buf->dma_dir, DMA_ATTR_SKIP_CPU_SYNC);
351 struct sg_table sgt;
361 struct sg_table *sgt;
369 sgt = &attach->sgt;
373 ret = sg_alloc_table(sgt, buf->dma_sgt->orig_nents, GFP_KERNEL);
380 wr = sgt->sgl;
381 for (i = 0; i < sgt->orig_nents; ++i) {
397 struct sg_table *sgt;
402 sgt = &attach->sgt;
406 dma_unmap_sgtable(db_attach->dev, sgt, attach->dma_dir, 0);
407 sg_free_table(sgt);
418 struct sg_table *sgt;
422 sgt = &attach->sgt;
426 return sgt;
431 dma_unmap_sgtable(db_attach->dev, sgt, attach->dma_dir, 0);
436 if (dma_map_sgtable(db_attach->dev, sgt, dma_dir, 0)) {
446 return sgt;
450 struct sg_table *sgt, enum dma_data_direction dma_dir)
466 struct sg_table *sgt = buf->dma_sgt;
468 dma_sync_sg_for_cpu(buf->dev, sgt->sgl, sgt->nents, buf->dma_dir);
477 struct sg_table *sgt = buf->dma_sgt;
479 dma_sync_sg_for_device(buf->dev, sgt->sgl, sgt->nents, buf->dma_dir);
539 struct sg_table *sgt;
552 sgt = dma_buf_map_attachment(buf->db_attach, buf->dma_dir);
553 if (IS_ERR(sgt)) {
558 buf->dma_sgt = sgt;
567 struct sg_table *sgt = buf->dma_sgt;
574 if (WARN_ON(!sgt)) {
583 dma_buf_unmap_attachment(buf->db_attach, sgt, buf->dma_dir);