Lines Matching full:sg

18 	struct scatterlist *sg, *new_sg;  in i915_sg_trim()  local
28 for_each_sg(orig_st->sgl, sg, orig_st->nents, i) { in i915_sg_trim()
29 sg_set_page(new_sg, sg_page(sg), sg->length, 0); in i915_sg_trim()
30 sg_dma_address(new_sg) = sg_dma_address(sg); in i915_sg_trim()
31 sg_dma_len(new_sg) = sg_dma_len(sg); in i915_sg_trim()
70 * @region_start: An offset to add to the dma addresses of the sg list.
71 * @page_alignment: Required page alignment for each sg entry. Power of two.
89 struct scatterlist *sg; in i915_rsgt_from_mm_node() local
112 sg = st->sgl; in i915_rsgt_from_mm_node()
121 if (offset != prev_end || sg->length >= max_segment) { in i915_rsgt_from_mm_node()
123 sg = __sg_next(sg); in i915_rsgt_from_mm_node()
125 sg_dma_address(sg) = region_start + offset; in i915_rsgt_from_mm_node()
126 GEM_BUG_ON(!IS_ALIGNED(sg_dma_address(sg), in i915_rsgt_from_mm_node()
128 sg_dma_len(sg) = 0; in i915_rsgt_from_mm_node()
129 sg->length = 0; in i915_rsgt_from_mm_node()
133 len = min_t(u64, block_size, max_segment - sg->length); in i915_rsgt_from_mm_node()
134 sg->length += len; in i915_rsgt_from_mm_node()
135 sg_dma_len(sg) += len; in i915_rsgt_from_mm_node()
143 sg_mark_end(sg); in i915_rsgt_from_mm_node()
153 * @region_start: An offset to add to the dma addresses of the sg list.
154 * @page_alignment: Required page alignment for each sg entry. Power of two.
174 struct scatterlist *sg; in i915_rsgt_from_buddy_resource() local
198 sg = st->sgl; in i915_rsgt_from_buddy_resource()
211 if (offset != prev_end || sg->length >= max_segment) { in i915_rsgt_from_buddy_resource()
213 sg = __sg_next(sg); in i915_rsgt_from_buddy_resource()
215 sg_dma_address(sg) = region_start + offset; in i915_rsgt_from_buddy_resource()
216 GEM_BUG_ON(!IS_ALIGNED(sg_dma_address(sg), in i915_rsgt_from_buddy_resource()
218 sg_dma_len(sg) = 0; in i915_rsgt_from_buddy_resource()
219 sg->length = 0; in i915_rsgt_from_buddy_resource()
223 len = min_t(u64, block_size, max_segment - sg->length); in i915_rsgt_from_buddy_resource()
224 sg->length += len; in i915_rsgt_from_buddy_resource()
225 sg_dma_len(sg) += len; in i915_rsgt_from_buddy_resource()
234 sg_mark_end(sg); in i915_rsgt_from_buddy_resource()