Lines Matching refs:sgt
29 struct sg_table sgt; in lima_heap_alloc() local
67 ret = sg_alloc_table_from_pages(&sgt, pages, i, 0, in lima_heap_alloc()
72 if (bo->base.sgt) { in lima_heap_alloc()
73 dma_unmap_sgtable(dev, bo->base.sgt, DMA_BIDIRECTIONAL, 0); in lima_heap_alloc()
74 sg_free_table(bo->base.sgt); in lima_heap_alloc()
76 bo->base.sgt = kmalloc(sizeof(*bo->base.sgt), GFP_KERNEL); in lima_heap_alloc()
77 if (!bo->base.sgt) { in lima_heap_alloc()
83 ret = dma_map_sgtable(dev, &sgt, DMA_BIDIRECTIONAL, 0); in lima_heap_alloc()
87 *bo->base.sgt = sgt; in lima_heap_alloc()
99 dma_unmap_sgtable(dev, &sgt, DMA_BIDIRECTIONAL, 0); in lima_heap_alloc()
101 kfree(bo->base.sgt); in lima_heap_alloc()
102 bo->base.sgt = NULL; in lima_heap_alloc()
104 sg_free_table(&sgt); in lima_heap_alloc()
136 struct sg_table *sgt = drm_gem_shmem_get_pages_sgt(shmem); in lima_gem_create_handle() local
138 if (IS_ERR(sgt)) { in lima_gem_create_handle()
139 err = PTR_ERR(sgt); in lima_gem_create_handle()