Lines Matching refs:page_count
33 dma_page->page_count = dma_page->last - dma_page->first + 1; in ivtv_udma_get_page_info()
34 if (dma_page->page_count == 1) dma_page->tail -= dma_page->offset; in ivtv_udma_get_page_info()
48 for (i = 0; i < dma_page->page_count; i++) { in ivtv_udma_fill_sg_list()
49 unsigned int len = (i == dma_page->page_count - 1) ? in ivtv_udma_fill_sg_list()
112 if (dma->SG_length || dma->page_count) { in ivtv_udma_setup()
114 dma->SG_length, dma->page_count); in ivtv_udma_setup()
120 if (user_dma.page_count <= 0) { in ivtv_udma_setup()
122 user_dma.page_count, size_in_bytes, user_dma.offset); in ivtv_udma_setup()
127 err = get_user_pages_unlocked(user_dma.uaddr, user_dma.page_count, in ivtv_udma_setup()
130 if (user_dma.page_count != err) { in ivtv_udma_setup()
132 err, user_dma.page_count); in ivtv_udma_setup()
141 dma->page_count = user_dma.page_count; in ivtv_udma_setup()
145 for (i = 0; i < dma->page_count; i++) { in ivtv_udma_setup()
148 dma->page_count = 0; in ivtv_udma_setup()
153 dma->SG_length = pci_map_sg(itv->pdev, dma->SGlist, dma->page_count, PCI_DMA_TODEVICE); in ivtv_udma_setup()
162 return dma->page_count; in ivtv_udma_setup()
173 if (dma->page_count == 0) in ivtv_udma_unmap()
178 pci_unmap_sg(itv->pdev, dma->SGlist, dma->page_count, PCI_DMA_TODEVICE); in ivtv_udma_unmap()
185 for (i = 0; i < dma->page_count; i++) { in ivtv_udma_unmap()
188 dma->page_count = 0; in ivtv_udma_unmap()
203 pci_unmap_sg(itv->pdev, itv->udma.SGlist, itv->udma.page_count, PCI_DMA_TODEVICE); in ivtv_udma_free()