Lines Matching refs:sg
23 struct sg_table *sg; in omap_gem_map_dma_buf() local
27 sg = kzalloc(sizeof(*sg), GFP_KERNEL); in omap_gem_map_dma_buf()
28 if (!sg) in omap_gem_map_dma_buf()
38 ret = sg_alloc_table(sg, 1, GFP_KERNEL); in omap_gem_map_dma_buf()
42 sg_init_table(sg->sgl, 1); in omap_gem_map_dma_buf()
43 sg_dma_len(sg->sgl) = obj->size; in omap_gem_map_dma_buf()
44 sg_set_page(sg->sgl, pfn_to_page(PFN_DOWN(dma_addr)), obj->size, 0); in omap_gem_map_dma_buf()
45 sg_dma_address(sg->sgl) = dma_addr; in omap_gem_map_dma_buf()
50 return sg; in omap_gem_map_dma_buf()
52 kfree(sg); in omap_gem_map_dma_buf()
57 struct sg_table *sg, enum dma_data_direction dir) in omap_gem_unmap_dma_buf() argument
61 sg_free_table(sg); in omap_gem_unmap_dma_buf()
62 kfree(sg); in omap_gem_unmap_dma_buf()