Lines Matching refs:sg
49 static inline int __sg_page_count(const struct scatterlist *sg) in __sg_page_count() argument
51 return sg->length >> PAGE_SHIFT; in __sg_page_count()
54 static inline int __sg_dma_page_count(const struct scatterlist *sg) in __sg_dma_page_count() argument
56 return sg_dma_len(sg) >> PAGE_SHIFT; in __sg_dma_page_count()
59 static inline struct scatterlist *____sg_next(struct scatterlist *sg) in ____sg_next() argument
61 ++sg; in ____sg_next()
62 if (unlikely(sg_is_chain(sg))) in ____sg_next()
63 sg = sg_chain_ptr(sg); in ____sg_next()
64 return sg; in ____sg_next()
76 static inline struct scatterlist *__sg_next(struct scatterlist *sg) in __sg_next() argument
78 return sg_is_last(sg) ? NULL : ____sg_next(sg); in __sg_next()
115 static inline unsigned int i915_sg_dma_sizes(struct scatterlist *sg) in i915_sg_dma_sizes() argument
120 while (sg && sg_dma_len(sg)) { in i915_sg_dma_sizes()
121 GEM_BUG_ON(sg->offset); in i915_sg_dma_sizes()
122 GEM_BUG_ON(!IS_ALIGNED(sg_dma_len(sg), PAGE_SIZE)); in i915_sg_dma_sizes()
123 page_sizes |= sg_dma_len(sg); in i915_sg_dma_sizes()
124 sg = __sg_next(sg); in i915_sg_dma_sizes()