Lines Matching refs: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()
89 struct scatterlist *sg; in i915_rsgt_from_mm_node() local
105 sg = st->sgl; in i915_rsgt_from_mm_node()
114 if (offset != prev_end || sg->length >= max_segment) { in i915_rsgt_from_mm_node()
116 sg = __sg_next(sg); in i915_rsgt_from_mm_node()
118 sg_dma_address(sg) = region_start + offset; in i915_rsgt_from_mm_node()
119 GEM_BUG_ON(!IS_ALIGNED(sg_dma_address(sg), in i915_rsgt_from_mm_node()
121 sg_dma_len(sg) = 0; in i915_rsgt_from_mm_node()
122 sg->length = 0; in i915_rsgt_from_mm_node()
126 len = min_t(u64, block_size, max_segment - sg->length); in i915_rsgt_from_mm_node()
127 sg->length += len; in i915_rsgt_from_mm_node()
128 sg_dma_len(sg) += len; in i915_rsgt_from_mm_node()
136 sg_mark_end(sg); in i915_rsgt_from_mm_node()
167 struct scatterlist *sg; in i915_rsgt_from_buddy_resource() local
185 sg = st->sgl; in i915_rsgt_from_buddy_resource()
198 if (offset != prev_end || sg->length >= max_segment) { in i915_rsgt_from_buddy_resource()
200 sg = __sg_next(sg); in i915_rsgt_from_buddy_resource()
202 sg_dma_address(sg) = region_start + offset; in i915_rsgt_from_buddy_resource()
203 GEM_BUG_ON(!IS_ALIGNED(sg_dma_address(sg), in i915_rsgt_from_buddy_resource()
205 sg_dma_len(sg) = 0; in i915_rsgt_from_buddy_resource()
206 sg->length = 0; in i915_rsgt_from_buddy_resource()
210 len = min_t(u64, block_size, max_segment - sg->length); in i915_rsgt_from_buddy_resource()
211 sg->length += len; in i915_rsgt_from_buddy_resource()
212 sg_dma_len(sg) += len; in i915_rsgt_from_buddy_resource()
221 sg_mark_end(sg); in i915_rsgt_from_buddy_resource()