Lines Matching refs:sgt
146 struct sg_table *sgt; in amdgpu_dma_buf_map() local
171 sgt = drm_prime_pages_to_sg(obj->dev, in amdgpu_dma_buf_map()
174 if (IS_ERR(sgt)) in amdgpu_dma_buf_map()
175 return sgt; in amdgpu_dma_buf_map()
177 if (dma_map_sgtable(attach->dev, sgt, dir, in amdgpu_dma_buf_map()
185 dir, &sgt); in amdgpu_dma_buf_map()
193 return sgt; in amdgpu_dma_buf_map()
196 sg_free_table(sgt); in amdgpu_dma_buf_map()
197 kfree(sgt); in amdgpu_dma_buf_map()
211 struct sg_table *sgt, in amdgpu_dma_buf_unmap() argument
214 if (sgt->sgl->page_link) { in amdgpu_dma_buf_unmap()
215 dma_unmap_sgtable(attach->dev, sgt, dir, 0); in amdgpu_dma_buf_unmap()
216 sg_free_table(sgt); in amdgpu_dma_buf_unmap()
217 kfree(sgt); in amdgpu_dma_buf_unmap()
219 amdgpu_vram_mgr_free_sgt(attach->dev, dir, sgt); in amdgpu_dma_buf_unmap()