Lines Matching refs:sg
50 static inline int __sg_page_count(const struct scatterlist *sg) in __sg_page_count() argument
52 return sg->length >> PAGE_SHIFT; in __sg_page_count()
55 static inline int __sg_dma_page_count(const struct scatterlist *sg) in __sg_dma_page_count() argument
57 return sg_dma_len(sg) >> PAGE_SHIFT; in __sg_dma_page_count()
60 static inline struct scatterlist *____sg_next(struct scatterlist *sg) in ____sg_next() argument
62 ++sg; in ____sg_next()
63 if (unlikely(sg_is_chain(sg))) in ____sg_next()
64 sg = sg_chain_ptr(sg); in ____sg_next()
65 return sg; in ____sg_next()
77 static inline struct scatterlist *__sg_next(struct scatterlist *sg) in __sg_next() argument
79 return sg_is_last(sg) ? NULL : ____sg_next(sg); in __sg_next()
116 static inline unsigned int i915_sg_dma_sizes(struct scatterlist *sg) in i915_sg_dma_sizes() argument
121 while (sg && sg_dma_len(sg)) { in i915_sg_dma_sizes()
122 GEM_BUG_ON(sg->offset); in i915_sg_dma_sizes()
123 GEM_BUG_ON(!IS_ALIGNED(sg_dma_len(sg), PAGE_SIZE)); in i915_sg_dma_sizes()
124 page_sizes |= sg_dma_len(sg); in i915_sg_dma_sizes()
125 sg = __sg_next(sg); in i915_sg_dma_sizes()