Lines Matching full:vc
192 * channel (VC)
193 * @vc: An instance for struct virt_dma_chan
197 * which is protected by vc.lock
200 struct virt_dma_chan vc; member
224 * @vc: The pointer to all available VCs
238 struct mtk_hsdma_vchan *vc; member
255 return container_of(chan, struct mtk_hsdma_vchan, vc.chan); in to_hsdma_vchan()
500 lockdep_assert_held(&hvc->vc.lock); in mtk_hsdma_issue_vchan_pending()
502 list_for_each_entry_safe(vd, vd2, &hvc->vc.desc_issued, node) { in mtk_hsdma_issue_vchan_pending()
585 spin_lock(&hvc->vc.lock); in mtk_hsdma_free_rooms_in_ring()
598 spin_unlock(&hvc->vc.lock); in mtk_hsdma_free_rooms_in_ring()
633 hvc = &hsdma->vc[i]; in mtk_hsdma_free_rooms_in_ring()
634 spin_lock(&hvc->vc.lock); in mtk_hsdma_free_rooms_in_ring()
636 spin_unlock(&hvc->vc.lock); in mtk_hsdma_free_rooms_in_ring()
669 list_for_each_entry(vd, &hvc->vc.desc_issued, node) in mtk_hsdma_find_active_desc()
691 spin_lock_irqsave(&hvc->vc.lock, flags); in mtk_hsdma_tx_status()
693 spin_unlock_irqrestore(&hvc->vc.lock, flags); in mtk_hsdma_tx_status()
711 spin_lock_irqsave(&hvc->vc.lock, flags); in mtk_hsdma_issue_pending()
713 if (vchan_issue_pending(&hvc->vc)) in mtk_hsdma_issue_pending()
716 spin_unlock_irqrestore(&hvc->vc.lock, flags); in mtk_hsdma_issue_pending()
739 struct virt_dma_chan *vc = to_virt_chan(c); in mtk_hsdma_free_inactive_desc() local
743 spin_lock_irqsave(&vc->lock, flags); in mtk_hsdma_free_inactive_desc()
744 list_splice_tail_init(&vc->desc_allocated, &head); in mtk_hsdma_free_inactive_desc()
745 list_splice_tail_init(&vc->desc_submitted, &head); in mtk_hsdma_free_inactive_desc()
746 list_splice_tail_init(&vc->desc_issued, &head); in mtk_hsdma_free_inactive_desc()
747 spin_unlock_irqrestore(&vc->lock, flags); in mtk_hsdma_free_inactive_desc()
749 /* At the point, we don't expect users put descriptor into VC again */ in mtk_hsdma_free_inactive_desc()
750 vchan_dma_desc_free_list(vc, &head); in mtk_hsdma_free_inactive_desc()
765 spin_lock(&hvc->vc.lock); in mtk_hsdma_free_active_desc()
770 spin_unlock(&hvc->vc.lock); in mtk_hsdma_free_active_desc()
782 vchan_synchronize(&hvc->vc); in mtk_hsdma_free_active_desc()
784 WARN_ONCE(!list_empty(&hvc->vc.desc_completed), in mtk_hsdma_free_active_desc()
814 * when the first VC is being created and the other VCs would run on in mtk_hsdma_alloc_chan_resources()
837 /* Free all descriptors in all lists on the VC */ in mtk_hsdma_free_chan_resources()
896 struct mtk_hsdma_vchan *vc; in mtk_hsdma_probe() local
961 hsdma->vc = devm_kcalloc(&pdev->dev, hsdma->dma_requests, in mtk_hsdma_probe()
962 sizeof(*hsdma->vc), GFP_KERNEL); in mtk_hsdma_probe()
963 if (!hsdma->vc) in mtk_hsdma_probe()
967 vc = &hsdma->vc[i]; in mtk_hsdma_probe()
968 vc->vc.desc_free = mtk_hsdma_vdesc_free; in mtk_hsdma_probe()
969 vchan_init(&vc->vc, dd); in mtk_hsdma_probe()
970 init_completion(&vc->issue_completion); in mtk_hsdma_probe()
971 INIT_LIST_HEAD(&vc->desc_hw_processing); in mtk_hsdma_probe()
1015 struct mtk_hsdma_vchan *vc; in mtk_hsdma_remove() local
1018 /* Kill VC task */ in mtk_hsdma_remove()
1020 vc = &hsdma->vc[i]; in mtk_hsdma_remove()
1022 list_del(&vc->vc.chan.device_node); in mtk_hsdma_remove()
1023 tasklet_kill(&vc->vc.task); in mtk_hsdma_remove()