Lines Matching refs:chan

83  * @client: ptr to the client user of this chan, will be %NULL when unused
91 * @client_node: used to add this to the client chan list
92 * @device_node: used to add this to the device chan list
115 static inline void dma_chan_get(struct dma_chan *chan)
117 if (unlikely(chan->slow_ref))
118 kref_get(&chan->refcount);
120 local_inc(&(per_cpu_ptr(chan->local, get_cpu())->refcount));
125 static inline void dma_chan_put(struct dma_chan *chan)
127 if (unlikely(chan->slow_ref))
128 kref_put(&chan->refcount, dma_chan_cleanup);
130 local_dec(&(per_cpu_ptr(chan->local, get_cpu())->refcount));
139 struct dma_chan *chan, enum dma_event event);
188 int (*device_alloc_chan_resources)(struct dma_chan *chan);
189 void (*device_free_chan_resources)(struct dma_chan *chan);
190 dma_cookie_t (*device_memcpy_buf_to_buf)(struct dma_chan *chan,
192 dma_cookie_t (*device_memcpy_buf_to_pg)(struct dma_chan *chan,
195 dma_cookie_t (*device_memcpy_pg_to_pg)(struct dma_chan *chan,
198 enum dma_status (*device_memcpy_complete)(struct dma_chan *chan,
201 void (*device_memcpy_issue_pending)(struct dma_chan *chan);
213 * @chan: DMA channel to offload copy to
223 static inline dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan,
227 per_cpu_ptr(chan->local, cpu)->bytes_transferred += len;
228 per_cpu_ptr(chan->local, cpu)->memcpy_count++;
231 return chan->device->device_memcpy_buf_to_buf(chan, dest, src, len);
236 * @chan: DMA channel to offload copy to
247 static inline dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan,
251 per_cpu_ptr(chan->local, cpu)->bytes_transferred += len;
252 per_cpu_ptr(chan->local, cpu)->memcpy_count++;
255 return chan->device->device_memcpy_buf_to_pg(chan, page, offset,
261 * @chan: DMA channel to offload copy to
273 static inline dma_cookie_t dma_async_memcpy_pg_to_pg(struct dma_chan *chan,
278 per_cpu_ptr(chan->local, cpu)->bytes_transferred += len;
279 per_cpu_ptr(chan->local, cpu)->memcpy_count++;
282 return chan->device->device_memcpy_pg_to_pg(chan, dest_pg, dest_off,
288 * @chan: target DMA channel
293 static inline void dma_async_memcpy_issue_pending(struct dma_chan *chan)
295 return chan->device->device_memcpy_issue_pending(chan);
300 * @chan: DMA channel
309 static inline enum dma_status dma_async_memcpy_complete(struct dma_chan *chan,
312 return chan->device->device_memcpy_complete(chan, cookie, last, used);
316 * dma_async_is_complete - test a cookie against chan state
359 dma_cookie_t dma_memcpy_to_iovec(struct dma_chan *chan, struct iovec *iov,
361 dma_cookie_t dma_memcpy_pg_to_iovec(struct dma_chan *chan, struct iovec *iov,