Lines Matching refs:sgt
145 struct sg_table *sgt; in amdgpu_dma_buf_map() local
170 sgt = drm_prime_pages_to_sg(obj->dev, in amdgpu_dma_buf_map()
173 if (IS_ERR(sgt)) in amdgpu_dma_buf_map()
174 return sgt; in amdgpu_dma_buf_map()
176 if (dma_map_sgtable(attach->dev, sgt, dir, in amdgpu_dma_buf_map()
184 dir, &sgt); in amdgpu_dma_buf_map()
192 return sgt; in amdgpu_dma_buf_map()
195 sg_free_table(sgt); in amdgpu_dma_buf_map()
196 kfree(sgt); in amdgpu_dma_buf_map()
210 struct sg_table *sgt, in amdgpu_dma_buf_unmap() argument
213 if (sgt->sgl->page_link) { in amdgpu_dma_buf_unmap()
214 dma_unmap_sgtable(attach->dev, sgt, dir, 0); in amdgpu_dma_buf_unmap()
215 sg_free_table(sgt); in amdgpu_dma_buf_unmap()
216 kfree(sgt); in amdgpu_dma_buf_unmap()
218 amdgpu_vram_mgr_free_sgt(attach->dev, dir, sgt); in amdgpu_dma_buf_unmap()