Lines Matching refs:sgt
23 struct sg_table *sgt = etnaviv_obj->sgt; in etnaviv_gem_scatter_map() local
30 dma_map_sgtable(dev->dev, sgt, DMA_BIDIRECTIONAL, 0); in etnaviv_gem_scatter_map()
36 struct sg_table *sgt = etnaviv_obj->sgt; in etnaviv_gem_scatterlist_unmap() local
54 dma_unmap_sgtable(dev->dev, sgt, DMA_BIDIRECTIONAL, 0); in etnaviv_gem_scatterlist_unmap()
75 if (etnaviv_obj->sgt) { in put_pages()
77 sg_free_table(etnaviv_obj->sgt); in put_pages()
78 kfree(etnaviv_obj->sgt); in put_pages()
79 etnaviv_obj->sgt = NULL; in put_pages()
101 if (!etnaviv_obj->sgt) { in etnaviv_gem_get_pages()
104 struct sg_table *sgt; in etnaviv_gem_get_pages() local
106 sgt = drm_prime_pages_to_sg(etnaviv_obj->base.dev, in etnaviv_gem_get_pages()
108 if (IS_ERR(sgt)) { in etnaviv_gem_get_pages()
110 PTR_ERR(sgt)); in etnaviv_gem_get_pages()
111 return ERR_CAST(sgt); in etnaviv_gem_get_pages()
114 etnaviv_obj->sgt = sgt; in etnaviv_gem_get_pages()
374 if (!etnaviv_obj->sgt) { in etnaviv_gem_cpu_prep()
398 dma_sync_sgtable_for_cpu(dev->dev, etnaviv_obj->sgt, in etnaviv_gem_cpu_prep()
414 dma_sync_sgtable_for_device(dev->dev, etnaviv_obj->sgt, in etnaviv_gem_cpu_fini()
681 if (etnaviv_obj->sgt) { in etnaviv_gem_userptr_release()
683 sg_free_table(etnaviv_obj->sgt); in etnaviv_gem_userptr_release()
684 kfree(etnaviv_obj->sgt); in etnaviv_gem_userptr_release()