Lines Matching refs:vd
57 struct virt_dma_desc *vd, unsigned long tx_flags) in vchan_tx_prep() argument
61 dma_async_tx_descriptor_init(&vd->tx, &vc->chan); in vchan_tx_prep()
62 vd->tx.flags = tx_flags; in vchan_tx_prep()
63 vd->tx.tx_submit = vchan_tx_submit; in vchan_tx_prep()
64 vd->tx.desc_free = vchan_tx_desc_free; in vchan_tx_prep()
66 vd->tx_result.result = DMA_TRANS_NOERROR; in vchan_tx_prep()
67 vd->tx_result.residue = 0; in vchan_tx_prep()
70 list_add_tail(&vd->node, &vc->desc_allocated); in vchan_tx_prep()
73 return &vd->tx; in vchan_tx_prep()
94 static inline void vchan_cookie_complete(struct virt_dma_desc *vd) in vchan_cookie_complete() argument
96 struct virt_dma_chan *vc = to_virt_chan(vd->tx.chan); in vchan_cookie_complete()
99 cookie = vd->tx.cookie; in vchan_cookie_complete()
100 dma_cookie_complete(&vd->tx); in vchan_cookie_complete()
102 vd, cookie); in vchan_cookie_complete()
103 list_add_tail(&vd->node, &vc->desc_completed); in vchan_cookie_complete()
112 static inline void vchan_vdesc_fini(struct virt_dma_desc *vd) in vchan_vdesc_fini() argument
114 struct virt_dma_chan *vc = to_virt_chan(vd->tx.chan); in vchan_vdesc_fini()
116 if (dmaengine_desc_test_reuse(&vd->tx)) { in vchan_vdesc_fini()
120 list_add(&vd->node, &vc->desc_allocated); in vchan_vdesc_fini()
123 vc->desc_free(vd); in vchan_vdesc_fini()
131 static inline void vchan_cyclic_callback(struct virt_dma_desc *vd) in vchan_cyclic_callback() argument
133 struct virt_dma_chan *vc = to_virt_chan(vd->tx.chan); in vchan_cyclic_callback()
135 vc->cyclic = vd; in vchan_cyclic_callback()
145 static inline void vchan_terminate_vdesc(struct virt_dma_desc *vd) in vchan_terminate_vdesc() argument
147 struct virt_dma_chan *vc = to_virt_chan(vd->tx.chan); in vchan_terminate_vdesc()
149 list_add_tail(&vd->node, &vc->desc_terminated); in vchan_terminate_vdesc()
151 if (vc->cyclic == vd) in vchan_terminate_vdesc()
189 struct virt_dma_desc *vd; in vchan_free_chan_resources() local
195 list_for_each_entry(vd, &head, node) in vchan_free_chan_resources()
196 dmaengine_desc_clear_reuse(&vd->tx); in vchan_free_chan_resources()