Lines Matching refs:vc
24 struct virt_dma_chan *vc = to_virt_chan(tx->chan); in vchan_tx_submit() local
29 spin_lock_irqsave(&vc->lock, flags); in vchan_tx_submit()
32 list_move_tail(&vd->node, &vc->desc_submitted); in vchan_tx_submit()
33 spin_unlock_irqrestore(&vc->lock, flags); in vchan_tx_submit()
35 dev_dbg(vc->chan.device->dev, "vchan %p: txd %p[%x]: submitted\n", in vchan_tx_submit()
36 vc, vd, cookie); in vchan_tx_submit()
54 struct virt_dma_chan *vc = to_virt_chan(tx->chan); in vchan_tx_desc_free() local
58 spin_lock_irqsave(&vc->lock, flags); in vchan_tx_desc_free()
60 spin_unlock_irqrestore(&vc->lock, flags); in vchan_tx_desc_free()
62 dev_dbg(vc->chan.device->dev, "vchan %p: txd %p[%x]: freeing\n", in vchan_tx_desc_free()
63 vc, vd, vd->tx.cookie); in vchan_tx_desc_free()
64 vc->desc_free(vd); in vchan_tx_desc_free()
69 struct virt_dma_desc *vchan_find_desc(struct virt_dma_chan *vc, in vchan_find_desc() argument
74 list_for_each_entry(vd, &vc->desc_issued, node) in vchan_find_desc()
88 struct virt_dma_chan *vc = (struct virt_dma_chan *)arg; in vchan_complete() local
93 spin_lock_irq(&vc->lock); in vchan_complete()
94 list_splice_tail_init(&vc->desc_completed, &head); in vchan_complete()
95 vd = vc->cyclic; in vchan_complete()
97 vc->cyclic = NULL; in vchan_complete()
102 spin_unlock_irq(&vc->lock); in vchan_complete()
112 list_add(&vd->node, &vc->desc_allocated); in vchan_complete()
114 vc->desc_free(vd); in vchan_complete()
120 void vchan_dma_desc_free_list(struct virt_dma_chan *vc, struct list_head *head) in vchan_dma_desc_free_list() argument
126 list_move_tail(&vd->node, &vc->desc_allocated); in vchan_dma_desc_free_list()
128 dev_dbg(vc->chan.device->dev, "txd %p: freeing\n", vd); in vchan_dma_desc_free_list()
130 vc->desc_free(vd); in vchan_dma_desc_free_list()
136 void vchan_init(struct virt_dma_chan *vc, struct dma_device *dmadev) in vchan_init() argument
138 dma_cookie_init(&vc->chan); in vchan_init()
140 spin_lock_init(&vc->lock); in vchan_init()
141 INIT_LIST_HEAD(&vc->desc_allocated); in vchan_init()
142 INIT_LIST_HEAD(&vc->desc_submitted); in vchan_init()
143 INIT_LIST_HEAD(&vc->desc_issued); in vchan_init()
144 INIT_LIST_HEAD(&vc->desc_completed); in vchan_init()
146 tasklet_init(&vc->task, vchan_complete, (unsigned long)vc); in vchan_init()
148 vc->chan.device = dmadev; in vchan_init()
149 list_add_tail(&vc->chan.device_node, &dmadev->channels); in vchan_init()