• Home
  • Raw
  • Download

Lines Matching refs:itv

80 void ivtv_udma_alloc(struct ivtv *itv)  in ivtv_udma_alloc()  argument
82 if (itv->udma.SG_handle == 0) { in ivtv_udma_alloc()
84 itv->udma.SG_handle = pci_map_single(itv->pdev, itv->udma.SGarray, in ivtv_udma_alloc()
85 sizeof(itv->udma.SGarray), PCI_DMA_TODEVICE); in ivtv_udma_alloc()
86 ivtv_udma_sync_for_cpu(itv); in ivtv_udma_alloc()
90 int ivtv_udma_setup(struct ivtv *itv, unsigned long ivtv_dest_addr, in ivtv_udma_setup() argument
94 struct ivtv_user_dma *dma = &itv->udma; in ivtv_udma_setup()
138 dma->SG_length = pci_map_sg(itv->pdev, dma->SGlist, dma->page_count, PCI_DMA_TODEVICE); in ivtv_udma_setup()
146 ivtv_udma_sync_for_device(itv); in ivtv_udma_setup()
150 void ivtv_udma_unmap(struct ivtv *itv) in ivtv_udma_unmap() argument
152 struct ivtv_user_dma *dma = &itv->udma; in ivtv_udma_unmap()
162 pci_unmap_sg(itv->pdev, dma->SGlist, dma->page_count, PCI_DMA_TODEVICE); in ivtv_udma_unmap()
166 ivtv_udma_sync_for_cpu(itv); in ivtv_udma_unmap()
172 void ivtv_udma_free(struct ivtv *itv) in ivtv_udma_free() argument
177 if (itv->udma.SG_handle) { in ivtv_udma_free()
178 pci_unmap_single(itv->pdev, itv->udma.SG_handle, in ivtv_udma_free()
179 sizeof(itv->udma.SGarray), PCI_DMA_TODEVICE); in ivtv_udma_free()
183 if (itv->udma.SG_length) { in ivtv_udma_free()
184 pci_unmap_sg(itv->pdev, itv->udma.SGlist, itv->udma.page_count, PCI_DMA_TODEVICE); in ivtv_udma_free()
188 if (itv->udma.bouncemap[i]) in ivtv_udma_free()
189 __free_page(itv->udma.bouncemap[i]); in ivtv_udma_free()
193 void ivtv_udma_start(struct ivtv *itv) in ivtv_udma_start() argument
196 write_reg(itv->udma.SG_handle, IVTV_REG_DECDMAADDR); in ivtv_udma_start()
198 set_bit(IVTV_F_I_DMA, &itv->i_flags); in ivtv_udma_start()
199 set_bit(IVTV_F_I_UDMA, &itv->i_flags); in ivtv_udma_start()
200 clear_bit(IVTV_F_I_UDMA_PENDING, &itv->i_flags); in ivtv_udma_start()
203 void ivtv_udma_prepare(struct ivtv *itv) in ivtv_udma_prepare() argument
207 spin_lock_irqsave(&itv->dma_reg_lock, flags); in ivtv_udma_prepare()
208 if (!test_bit(IVTV_F_I_DMA, &itv->i_flags)) in ivtv_udma_prepare()
209 ivtv_udma_start(itv); in ivtv_udma_prepare()
211 set_bit(IVTV_F_I_UDMA_PENDING, &itv->i_flags); in ivtv_udma_prepare()
212 spin_unlock_irqrestore(&itv->dma_reg_lock, flags); in ivtv_udma_prepare()