• Home
  • Raw
  • Download

Lines Matching refs:vc

44 void vchan_dma_desc_free_list(struct virt_dma_chan *vc, struct list_head *head);
45 void vchan_init(struct virt_dma_chan *vc, struct dma_device *dmadev);
56 static inline struct dma_async_tx_descriptor *vchan_tx_prep(struct virt_dma_chan *vc, in vchan_tx_prep() argument
61 dma_async_tx_descriptor_init(&vd->tx, &vc->chan); in vchan_tx_prep()
69 spin_lock_irqsave(&vc->lock, flags); in vchan_tx_prep()
70 list_add_tail(&vd->node, &vc->desc_allocated); in vchan_tx_prep()
71 spin_unlock_irqrestore(&vc->lock, flags); in vchan_tx_prep()
82 static inline bool vchan_issue_pending(struct virt_dma_chan *vc) in vchan_issue_pending() argument
84 list_splice_tail_init(&vc->desc_submitted, &vc->desc_issued); in vchan_issue_pending()
85 return !list_empty(&vc->desc_issued); in vchan_issue_pending()
96 struct virt_dma_chan *vc = to_virt_chan(vd->tx.chan); in vchan_cookie_complete() local
101 dev_vdbg(vc->chan.device->dev, "txd %p[%x]: marked complete\n", in vchan_cookie_complete()
103 list_add_tail(&vd->node, &vc->desc_completed); in vchan_cookie_complete()
105 tasklet_schedule(&vc->task); in vchan_cookie_complete()
114 struct virt_dma_chan *vc = to_virt_chan(vd->tx.chan); in vchan_vdesc_fini() local
119 spin_lock_irqsave(&vc->lock, flags); in vchan_vdesc_fini()
120 list_add(&vd->node, &vc->desc_allocated); in vchan_vdesc_fini()
121 spin_unlock_irqrestore(&vc->lock, flags); in vchan_vdesc_fini()
123 vc->desc_free(vd); in vchan_vdesc_fini()
133 struct virt_dma_chan *vc = to_virt_chan(vd->tx.chan); in vchan_cyclic_callback() local
135 vc->cyclic = vd; in vchan_cyclic_callback()
136 tasklet_schedule(&vc->task); in vchan_cyclic_callback()
147 struct virt_dma_chan *vc = to_virt_chan(vd->tx.chan); in vchan_terminate_vdesc() local
149 list_add_tail(&vd->node, &vc->desc_terminated); in vchan_terminate_vdesc()
151 if (vc->cyclic == vd) in vchan_terminate_vdesc()
152 vc->cyclic = NULL; in vchan_terminate_vdesc()
161 static inline struct virt_dma_desc *vchan_next_desc(struct virt_dma_chan *vc) in vchan_next_desc() argument
163 return list_first_entry_or_null(&vc->desc_issued, in vchan_next_desc()
177 static inline void vchan_get_all_descriptors(struct virt_dma_chan *vc, in vchan_get_all_descriptors() argument
180 list_splice_tail_init(&vc->desc_allocated, head); in vchan_get_all_descriptors()
181 list_splice_tail_init(&vc->desc_submitted, head); in vchan_get_all_descriptors()
182 list_splice_tail_init(&vc->desc_issued, head); in vchan_get_all_descriptors()
183 list_splice_tail_init(&vc->desc_completed, head); in vchan_get_all_descriptors()
184 list_splice_tail_init(&vc->desc_terminated, head); in vchan_get_all_descriptors()
187 static inline void vchan_free_chan_resources(struct virt_dma_chan *vc) in vchan_free_chan_resources() argument
193 spin_lock_irqsave(&vc->lock, flags); in vchan_free_chan_resources()
194 vchan_get_all_descriptors(vc, &head); in vchan_free_chan_resources()
197 spin_unlock_irqrestore(&vc->lock, flags); in vchan_free_chan_resources()
199 vchan_dma_desc_free_list(vc, &head); in vchan_free_chan_resources()
211 static inline void vchan_synchronize(struct virt_dma_chan *vc) in vchan_synchronize() argument
216 tasklet_kill(&vc->task); in vchan_synchronize()
218 spin_lock_irqsave(&vc->lock, flags); in vchan_synchronize()
220 list_splice_tail_init(&vc->desc_terminated, &head); in vchan_synchronize()
222 spin_unlock_irqrestore(&vc->lock, flags); in vchan_synchronize()
224 vchan_dma_desc_free_list(vc, &head); in vchan_synchronize()