Lines Matching refs:vd
59 struct virt_dma_desc *vd, unsigned long tx_flags) in vchan_tx_prep() argument
63 dma_async_tx_descriptor_init(&vd->tx, &vc->chan); in vchan_tx_prep()
64 vd->tx.flags = tx_flags; in vchan_tx_prep()
65 vd->tx.tx_submit = vchan_tx_submit; in vchan_tx_prep()
66 vd->tx.desc_free = vchan_tx_desc_free; in vchan_tx_prep()
69 list_add_tail(&vd->node, &vc->desc_allocated); in vchan_tx_prep()
72 return &vd->tx; in vchan_tx_prep()
93 static inline void vchan_cookie_complete(struct virt_dma_desc *vd) in vchan_cookie_complete() argument
95 struct virt_dma_chan *vc = to_virt_chan(vd->tx.chan); in vchan_cookie_complete()
98 cookie = vd->tx.cookie; in vchan_cookie_complete()
99 dma_cookie_complete(&vd->tx); in vchan_cookie_complete()
101 vd, cookie); in vchan_cookie_complete()
102 list_add_tail(&vd->node, &vc->desc_completed); in vchan_cookie_complete()
111 static inline void vchan_vdesc_fini(struct virt_dma_desc *vd) in vchan_vdesc_fini() argument
113 struct virt_dma_chan *vc = to_virt_chan(vd->tx.chan); in vchan_vdesc_fini()
115 if (dmaengine_desc_test_reuse(&vd->tx)) in vchan_vdesc_fini()
116 list_add(&vd->node, &vc->desc_allocated); in vchan_vdesc_fini()
118 vc->desc_free(vd); in vchan_vdesc_fini()
125 static inline void vchan_cyclic_callback(struct virt_dma_desc *vd) in vchan_cyclic_callback() argument
127 struct virt_dma_chan *vc = to_virt_chan(vd->tx.chan); in vchan_cyclic_callback()
129 vc->cyclic = vd; in vchan_cyclic_callback()
139 static inline void vchan_terminate_vdesc(struct virt_dma_desc *vd) in vchan_terminate_vdesc() argument
141 struct virt_dma_chan *vc = to_virt_chan(vd->tx.chan); in vchan_terminate_vdesc()
147 vc->vd_terminated = vd; in vchan_terminate_vdesc()
148 if (vc->cyclic == vd) in vchan_terminate_vdesc()
185 struct virt_dma_desc *vd; in vchan_free_chan_resources() local
191 list_for_each_entry(vd, &head, node) in vchan_free_chan_resources()
192 dmaengine_desc_clear_reuse(&vd->tx); in vchan_free_chan_resources()