Lines Matching refs:pb

50 			    unsigned int pb)  in tw686x_buf_done()  argument
52 struct tw686x_dma_desc *desc = &vc->dma_descs[pb]; in tw686x_buf_done()
57 if (vc->curr_bufs[pb]) { in tw686x_buf_done()
58 vb = &vc->curr_bufs[pb]->vb; in tw686x_buf_done()
71 vc->pb = !pb; in tw686x_buf_done()
78 unsigned int pb) in tw686x_memcpy_dma_free() argument
80 struct tw686x_dma_desc *desc = &vc->dma_descs[pb]; in tw686x_memcpy_dma_free()
102 unsigned int pb) in tw686x_memcpy_dma_alloc() argument
105 u32 reg = pb ? VDMA_B_ADDR[vc->ch] : VDMA_P_ADDR[vc->ch]; in tw686x_memcpy_dma_alloc()
109 WARN(vc->dma_descs[pb].virt, in tw686x_memcpy_dma_alloc()
114 &vc->dma_descs[pb].phys, GFP_KERNEL); in tw686x_memcpy_dma_alloc()
118 vc->ch, pb ? "B" : "P"); in tw686x_memcpy_dma_alloc()
121 vc->dma_descs[pb].size = len; in tw686x_memcpy_dma_alloc()
122 vc->dma_descs[pb].virt = virt; in tw686x_memcpy_dma_alloc()
123 reg_write(dev, reg, vc->dma_descs[pb].phys); in tw686x_memcpy_dma_alloc()
129 unsigned int pb) in tw686x_memcpy_buf_refill() argument
139 vc->curr_bufs[pb] = buf; in tw686x_memcpy_buf_refill()
142 vc->curr_bufs[pb] = NULL; in tw686x_memcpy_buf_refill()
155 unsigned int pb) in tw686x_contig_buf_refill() argument
160 u32 reg = pb ? VDMA_B_ADDR[vc->ch] : VDMA_P_ADDR[vc->ch]; in tw686x_contig_buf_refill()
171 vc->curr_bufs[pb] = buf; in tw686x_contig_buf_refill()
174 vc->curr_bufs[pb] = NULL; in tw686x_contig_buf_refill()
225 unsigned int pb) in tw686x_sg_buf_refill() argument
238 if (tw686x_sg_desc_fill(vc->sg_descs[pb], buf, buf_len)) { in tw686x_sg_buf_refill()
241 vc->ch, pb ? "B" : "P"); in tw686x_sg_buf_refill()
247 vc->curr_bufs[pb] = buf; in tw686x_sg_buf_refill()
251 vc->curr_bufs[pb] = NULL; in tw686x_sg_buf_refill()
255 unsigned int pb) in tw686x_sg_dma_free() argument
257 struct tw686x_dma_desc *desc = &vc->dma_descs[pb]; in tw686x_sg_dma_free()
266 vc->sg_descs[pb] = NULL; in tw686x_sg_dma_free()
270 unsigned int pb) in tw686x_sg_dma_alloc() argument
272 struct tw686x_dma_desc *desc = &vc->dma_descs[pb]; in tw686x_sg_dma_alloc()
274 u32 reg = pb ? DMA_PAGE_TABLE1_ADDR[vc->ch] : in tw686x_sg_dma_alloc()
284 vc->ch, pb ? "B" : "P"); in tw686x_sg_dma_alloc()
290 virt = dev->video_channels[0].dma_descs[pb].virt + in tw686x_sg_dma_alloc()
294 vc->sg_descs[pb] = virt; in tw686x_sg_dma_alloc()
300 unsigned int sg_table_size, pb, ch, channels; in tw686x_sg_setup() local
322 for (pb = 0; pb < 2; pb++) in tw686x_sg_setup()
323 vc->dma_descs[pb].size = sg_table_size; in tw686x_sg_setup()
474 unsigned int pb; in tw686x_clear_queue() local
485 for (pb = 0; pb < 2; pb++) { in tw686x_clear_queue()
486 if (vc->curr_bufs[pb]) in tw686x_clear_queue()
487 vb2_buffer_done(&vc->curr_bufs[pb]->vb.vb2_buf, state); in tw686x_clear_queue()
488 vc->curr_bufs[pb] = NULL; in tw686x_clear_queue()
498 int pb, err; in tw686x_start_streaming() local
522 for (pb = 0; pb < 2; pb++) in tw686x_start_streaming()
523 dev->dma_ops->buf_refill(vc, pb); in tw686x_start_streaming()
527 vc->pb = 0; in tw686x_start_streaming()
676 int err, pb; in tw686x_set_format() local
684 for (pb = 0; pb < 2; pb++) in tw686x_set_format()
685 dev->dma_ops->free(vc, pb); in tw686x_set_format()
687 for (pb = 0; pb < 2; pb++) { in tw686x_set_format()
688 err = dev->dma_ops->alloc(vc, pb); in tw686x_set_format()
690 if (pb > 0) in tw686x_set_format()
1090 unsigned int ch, pb; in tw686x_video_irq() local
1105 vc->pb = 0; in tw686x_video_irq()
1121 vc->pb = 0; in tw686x_video_irq()
1126 pb = !!(pb_status & BIT(ch)); in tw686x_video_irq()
1127 if (vc->pb != pb) { in tw686x_video_irq()
1133 vc->pb = 0; in tw686x_video_irq()
1138 tw686x_buf_done(vc, pb); in tw686x_video_irq()
1139 dev->dma_ops->buf_refill(vc, pb); in tw686x_video_irq()
1146 unsigned int ch, pb; in tw686x_video_free() local
1154 for (pb = 0; pb < 2; pb++) in tw686x_video_free()
1155 dev->dma_ops->free(vc, pb); in tw686x_video_free()