Lines Matching refs:vc
21 struct virt_dma_chan *vc = to_virt_chan(tx->chan); in vchan_tx_submit() local
26 spin_lock_irqsave(&vc->lock, flags); in vchan_tx_submit()
29 list_move_tail(&vd->node, &vc->desc_submitted); in vchan_tx_submit()
30 spin_unlock_irqrestore(&vc->lock, flags); in vchan_tx_submit()
32 dev_dbg(vc->chan.device->dev, "vchan %p: txd %p[%x]: submitted\n", in vchan_tx_submit()
33 vc, vd, cookie); in vchan_tx_submit()
51 struct virt_dma_chan *vc = to_virt_chan(tx->chan); in vchan_tx_desc_free() local
55 spin_lock_irqsave(&vc->lock, flags); in vchan_tx_desc_free()
57 spin_unlock_irqrestore(&vc->lock, flags); in vchan_tx_desc_free()
59 dev_dbg(vc->chan.device->dev, "vchan %p: txd %p[%x]: freeing\n", in vchan_tx_desc_free()
60 vc, vd, vd->tx.cookie); in vchan_tx_desc_free()
61 vc->desc_free(vd); in vchan_tx_desc_free()
66 struct virt_dma_desc *vchan_find_desc(struct virt_dma_chan *vc, in vchan_find_desc() argument
71 list_for_each_entry(vd, &vc->desc_issued, node) in vchan_find_desc()
85 struct virt_dma_chan *vc = from_tasklet(vc, t, task); in vchan_complete() local
90 spin_lock_irq(&vc->lock); in vchan_complete()
91 list_splice_tail_init(&vc->desc_completed, &head); in vchan_complete()
92 vd = vc->cyclic; in vchan_complete()
94 vc->cyclic = NULL; in vchan_complete()
99 spin_unlock_irq(&vc->lock); in vchan_complete()
112 void vchan_dma_desc_free_list(struct virt_dma_chan *vc, struct list_head *head) in vchan_dma_desc_free_list() argument
123 void vchan_init(struct virt_dma_chan *vc, struct dma_device *dmadev) in vchan_init() argument
125 dma_cookie_init(&vc->chan); in vchan_init()
127 spin_lock_init(&vc->lock); in vchan_init()
128 INIT_LIST_HEAD(&vc->desc_allocated); in vchan_init()
129 INIT_LIST_HEAD(&vc->desc_submitted); in vchan_init()
130 INIT_LIST_HEAD(&vc->desc_issued); in vchan_init()
131 INIT_LIST_HEAD(&vc->desc_completed); in vchan_init()
132 INIT_LIST_HEAD(&vc->desc_terminated); in vchan_init()
134 tasklet_setup(&vc->task, vchan_complete); in vchan_init()
136 vc->chan.device = dmadev; in vchan_init()
137 list_add_tail(&vc->chan.device_node, &dmadev->channels); in vchan_init()