Lines Matching refs:pb
50 unsigned int pb)
52 struct tw686x_dma_desc *desc = &vc->dma_descs[pb];
57 if (vc->curr_bufs[pb]) {
58 vb = &vc->curr_bufs[pb]->vb;
71 vc->pb = !pb;
78 unsigned int pb)
80 struct tw686x_dma_desc *desc = &vc->dma_descs[pb];
102 unsigned int pb)
105 u32 reg = pb ? VDMA_B_ADDR[vc->ch] : VDMA_P_ADDR[vc->ch];
109 WARN(vc->dma_descs[pb].virt,
114 &vc->dma_descs[pb].phys);
118 vc->ch, pb ? "B" : "P");
121 vc->dma_descs[pb].size = len;
122 vc->dma_descs[pb].virt = virt;
123 reg_write(dev, reg, vc->dma_descs[pb].phys);
129 unsigned int pb)
139 vc->curr_bufs[pb] = buf;
142 vc->curr_bufs[pb] = NULL;
155 unsigned int pb)
160 u32 reg = pb ? VDMA_B_ADDR[vc->ch] : VDMA_P_ADDR[vc->ch];
171 vc->curr_bufs[pb] = buf;
174 vc->curr_bufs[pb] = NULL;
225 unsigned int pb)
238 if (tw686x_sg_desc_fill(vc->sg_descs[pb], buf, buf_len)) {
241 vc->ch, pb ? "B" : "P");
247 vc->curr_bufs[pb] = buf;
251 vc->curr_bufs[pb] = NULL;
255 unsigned int pb)
257 struct tw686x_dma_desc *desc = &vc->dma_descs[pb];
266 vc->sg_descs[pb] = NULL;
270 unsigned int pb)
272 struct tw686x_dma_desc *desc = &vc->dma_descs[pb];
274 u32 reg = pb ? DMA_PAGE_TABLE1_ADDR[vc->ch] :
285 vc->ch, pb ? "B" : "P");
291 virt = dev->video_channels[0].dma_descs[pb].virt +
295 vc->sg_descs[pb] = virt;
301 unsigned int sg_table_size, pb, ch, channels;
323 for (pb = 0; pb < 2; pb++)
324 vc->dma_descs[pb].size = sg_table_size;
475 unsigned int pb;
486 for (pb = 0; pb < 2; pb++) {
487 if (vc->curr_bufs[pb])
488 vb2_buffer_done(&vc->curr_bufs[pb]->vb.vb2_buf, state);
489 vc->curr_bufs[pb] = NULL;
499 int pb, err;
523 for (pb = 0; pb < 2; pb++)
524 dev->dma_ops->buf_refill(vc, pb);
528 vc->pb = 0;
677 int err, pb;
685 for (pb = 0; pb < 2; pb++)
686 dev->dma_ops->free(vc, pb);
688 for (pb = 0; pb < 2; pb++) {
689 err = dev->dma_ops->alloc(vc, pb);
691 if (pb > 0)
1093 unsigned int ch, pb;
1108 vc->pb = 0;
1124 vc->pb = 0;
1129 pb = !!(pb_status & BIT(ch));
1130 if (vc->pb != pb) {
1136 vc->pb = 0;
1141 tw686x_buf_done(vc, pb);
1142 dev->dma_ops->buf_refill(vc, pb);
1149 unsigned int ch, pb;
1157 for (pb = 0; pb < 2; pb++)
1158 dev->dma_ops->free(vc, pb);