Lines Matching refs:hvc

496 					  struct mtk_hsdma_vchan *hvc)  in mtk_hsdma_issue_vchan_pending()  argument
501 lockdep_assert_held(&hvc->vc.lock); in mtk_hsdma_issue_vchan_pending()
503 list_for_each_entry_safe(vd, vd2, &hvc->vc.desc_issued, node) { in mtk_hsdma_issue_vchan_pending()
529 list_move_tail(&vd->node, &hvc->desc_hw_processing); in mtk_hsdma_issue_vchan_pending()
535 struct mtk_hsdma_vchan *hvc; in mtk_hsdma_free_rooms_in_ring() local
584 hvc = to_hsdma_vchan(cb->vd->tx.chan); in mtk_hsdma_free_rooms_in_ring()
586 spin_lock(&hvc->vc.lock); in mtk_hsdma_free_rooms_in_ring()
594 if (hvc->issue_synchronize && in mtk_hsdma_free_rooms_in_ring()
595 list_empty(&hvc->desc_hw_processing)) { in mtk_hsdma_free_rooms_in_ring()
596 complete(&hvc->issue_completion); in mtk_hsdma_free_rooms_in_ring()
597 hvc->issue_synchronize = false; in mtk_hsdma_free_rooms_in_ring()
599 spin_unlock(&hvc->vc.lock); in mtk_hsdma_free_rooms_in_ring()
634 hvc = &hsdma->vc[i]; in mtk_hsdma_free_rooms_in_ring()
635 spin_lock(&hvc->vc.lock); in mtk_hsdma_free_rooms_in_ring()
636 mtk_hsdma_issue_vchan_pending(hsdma, hvc); in mtk_hsdma_free_rooms_in_ring()
637 spin_unlock(&hvc->vc.lock); in mtk_hsdma_free_rooms_in_ring()
663 struct mtk_hsdma_vchan *hvc = to_hsdma_vchan(c); in mtk_hsdma_find_active_desc() local
666 list_for_each_entry(vd, &hvc->desc_hw_processing, node) in mtk_hsdma_find_active_desc()
670 list_for_each_entry(vd, &hvc->vc.desc_issued, node) in mtk_hsdma_find_active_desc()
681 struct mtk_hsdma_vchan *hvc = to_hsdma_vchan(c); in mtk_hsdma_tx_status() local
692 spin_lock_irqsave(&hvc->vc.lock, flags); in mtk_hsdma_tx_status()
694 spin_unlock_irqrestore(&hvc->vc.lock, flags); in mtk_hsdma_tx_status()
709 struct mtk_hsdma_vchan *hvc = to_hsdma_vchan(c); in mtk_hsdma_issue_pending() local
712 spin_lock_irqsave(&hvc->vc.lock, flags); in mtk_hsdma_issue_pending()
714 if (vchan_issue_pending(&hvc->vc)) in mtk_hsdma_issue_pending()
715 mtk_hsdma_issue_vchan_pending(hsdma, hvc); in mtk_hsdma_issue_pending()
717 spin_unlock_irqrestore(&hvc->vc.lock, flags); in mtk_hsdma_issue_pending()
758 struct mtk_hsdma_vchan *hvc = to_hsdma_vchan(c); in mtk_hsdma_free_active_desc() local
766 spin_lock(&hvc->vc.lock); in mtk_hsdma_free_active_desc()
767 if (!list_empty(&hvc->desc_hw_processing)) { in mtk_hsdma_free_active_desc()
768 hvc->issue_synchronize = true; in mtk_hsdma_free_active_desc()
771 spin_unlock(&hvc->vc.lock); in mtk_hsdma_free_active_desc()
774 wait_for_completion(&hvc->issue_completion); in mtk_hsdma_free_active_desc()
779 WARN_ONCE(!list_empty(&hvc->desc_hw_processing), in mtk_hsdma_free_active_desc()
783 vchan_synchronize(&hvc->vc); in mtk_hsdma_free_active_desc()
785 WARN_ONCE(!list_empty(&hvc->vc.desc_completed), in mtk_hsdma_free_active_desc()