Lines Matching refs:sg
50 static inline int __sg_page_count(const struct scatterlist *sg)
52 return sg->length >> PAGE_SHIFT;
55 static inline int __sg_dma_page_count(const struct scatterlist *sg)
57 return sg_dma_len(sg) >> PAGE_SHIFT;
60 static inline struct scatterlist *____sg_next(struct scatterlist *sg)
62 ++sg;
63 if (unlikely(sg_is_chain(sg)))
64 sg = sg_chain_ptr(sg);
65 return sg;
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)
79 return sg_is_last(sg) ? NULL : ____sg_next(sg);
120 * @sg: The scatterlist
126 static inline unsigned int i915_sg_dma_sizes(struct scatterlist *sg)
131 while (sg && sg_dma_len(sg)) {
132 GEM_BUG_ON(sg->offset);
133 GEM_BUG_ON(!IS_ALIGNED(sg_dma_len(sg), PAGE_SIZE));
134 page_sizes |= sg_dma_len(sg);
135 sg = __sg_next(sg);
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