Lines Matching full: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()
70 * @sg: The current sg entry
74 * element in the array (@sg@+1). If that's a chain pointer, follow it;
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()
120 * @sg: The scatterlist
126 static inline unsigned int i915_sg_dma_sizes(struct scatterlist *sg) in i915_sg_dma_sizes() argument
131 while (sg && sg_dma_len(sg)) { in i915_sg_dma_sizes()
132 GEM_BUG_ON(sg->offset); in i915_sg_dma_sizes()
133 GEM_BUG_ON(!IS_ALIGNED(sg_dma_len(sg), PAGE_SIZE)); in i915_sg_dma_sizes()
134 page_sizes |= sg_dma_len(sg); in i915_sg_dma_sizes()
135 sg = __sg_next(sg); in i915_sg_dma_sizes()
192 * i915_refct_sgt_put - Put a refcounted sg-table
202 * i915_refct_sgt_get - Get a refcounted sg-table
213 * __i915_refct_sgt_init - Initialize a refcounted sg-list with a custom
217 * @ops: A customized operations structure in case the refcounted sg-list