/drivers/virtio/ |
D | virtio_balloon.c | 70 struct virtio_balloon *vb; in balloon_ack() local 73 vb = vq->vq_ops->get_buf(vq, &len); in balloon_ack() 74 if (vb) in balloon_ack() 75 complete(&vb->acked); in balloon_ack() 78 static void tell_host(struct virtio_balloon *vb, struct virtqueue *vq) in tell_host() argument 82 sg_init_one(&sg, vb->pfns, sizeof(vb->pfns[0]) * vb->num_pfns); in tell_host() 84 init_completion(&vb->acked); in tell_host() 87 if (vq->vq_ops->add_buf(vq, &sg, 1, 0, vb) != 0) in tell_host() 92 wait_for_completion(&vb->acked); in tell_host() 95 static void fill_balloon(struct virtio_balloon *vb, size_t num) in fill_balloon() argument [all …]
|
/drivers/media/video/cx23885/ |
D | cx23885-vbi.c | 72 buf->vb.width, buf->risc.dma); in cx23885_start_vbi_dma() 98 buf = list_entry(q->active.next, struct cx23885_buffer, vb.queue); in cx23885_restart_vbi_queue() 100 buf, buf->vb.i); in cx23885_restart_vbi_queue() 103 buf = list_entry(item, struct cx23885_buffer, vb.queue); in cx23885_restart_vbi_queue() 124 vb.queue); in cx23885_vbi_timeout() 125 list_del(&buf->vb.queue); in cx23885_vbi_timeout() 126 buf->vb.state = VIDEOBUF_ERROR; in cx23885_vbi_timeout() 127 wake_up(&buf->vb.done); in cx23885_vbi_timeout() 129 buf, buf->vb.i, (unsigned long)buf->risc.dma); in cx23885_vbi_timeout() 153 vbi_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb, in vbi_prepare() argument [all …]
|
D | cx23885-video.c | 273 struct cx23885_buffer, vb.queue); in cx23885_video_wakeup() 281 do_gettimeofday(&buf->vb.ts); in cx23885_video_wakeup() 282 dprintk(2, "[%p/%d] wakeup reg=%d buf=%d\n", buf, buf->vb.i, in cx23885_video_wakeup() 284 buf->vb.state = VIDEOBUF_DONE; in cx23885_video_wakeup() 285 list_del(&buf->vb.queue); in cx23885_video_wakeup() 286 wake_up(&buf->vb.done); in cx23885_video_wakeup() 440 cx23885_set_scale(dev, buf->vb.width, buf->vb.height, buf->vb.field); in cx23885_start_video_dma() 467 vb.queue); in cx23885_restart_video_queue() 469 buf, buf->vb.i); in cx23885_restart_video_queue() 473 vb.queue); in cx23885_restart_video_queue() [all …]
|
D | cx23885-core.c | 352 struct cx23885_buffer, vb.queue); in cx23885_wakeup() 360 do_gettimeofday(&buf->vb.ts); in cx23885_wakeup() 361 dprintk(2, "[%p/%d] wakeup reg=%d buf=%d\n", buf, buf->vb.i, in cx23885_wakeup() 363 buf->vb.state = VIDEOBUF_DONE; in cx23885_wakeup() 364 list_del(&buf->vb.queue); in cx23885_wakeup() 365 wake_up(&buf->vb.done); in cx23885_wakeup() 1101 struct videobuf_dmabuf *dma = videobuf_to_dma(&buf->vb); in cx23885_free_buffer() 1104 videobuf_waiton(&buf->vb, 0, 0); in cx23885_free_buffer() 1108 buf->vb.state = VIDEOBUF_NEEDS_INIT; in cx23885_free_buffer() 1171 buf->vb.width, buf->vb.height, buf->vb.field); in cx23885_start_dma() [all …]
|
/drivers/media/video/cx88/ |
D | cx88-vbi.c | 58 buf->vb.width, buf->risc.dma); in cx8800_start_vbi_dma() 106 buf = list_entry(q->active.next, struct cx88_buffer, vb.queue); in cx8800_restart_vbi_queue() 108 buf, buf->vb.i); in cx8800_restart_vbi_queue() 110 list_for_each_entry(buf, &q->active, vb.queue) in cx8800_restart_vbi_queue() 131 buf = list_entry(q->active.next, struct cx88_buffer, vb.queue); in cx8800_vbi_timeout() 132 list_del(&buf->vb.queue); in cx8800_vbi_timeout() 133 buf->vb.state = VIDEOBUF_ERROR; in cx8800_vbi_timeout() 134 wake_up(&buf->vb.done); in cx8800_vbi_timeout() 136 buf, buf->vb.i, (unsigned long)buf->risc.dma); in cx8800_vbi_timeout() 158 vbi_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb, in vbi_prepare() argument [all …]
|
D | cx88-mpeg.c | 83 buf->vb.width, buf->vb.height, buf->vb.field); in cx8802_start_dma() 90 cx_write(MO_TS_LNGTH, buf->vb.width); in cx8802_start_dma() 202 buf = list_entry(q->queued.next, struct cx88_buffer, vb.queue); in cx8802_restart_queue() 204 list_del(&buf->vb.queue); in cx8802_restart_queue() 205 list_add_tail(&buf->vb.queue,&q->active); in cx8802_restart_queue() 207 buf->vb.state = VIDEOBUF_ACTIVE; in cx8802_restart_queue() 211 buf,buf->vb.i); in cx8802_restart_queue() 213 } else if (prev->vb.width == buf->vb.width && in cx8802_restart_queue() 214 prev->vb.height == buf->vb.height && in cx8802_restart_queue() 216 list_del(&buf->vb.queue); in cx8802_restart_queue() [all …]
|
D | cx88-video.c | 470 cx88_set_scale(core, buf->vb.width, buf->vb.height, buf->vb.field); in start_video_dma() 524 buf = list_entry(q->active.next, struct cx88_buffer, vb.queue); in restart_video_queue() 526 buf, buf->vb.i); in restart_video_queue() 528 list_for_each_entry(buf, &q->active, vb.queue) in restart_video_queue() 538 buf = list_entry(q->queued.next, struct cx88_buffer, vb.queue); in restart_video_queue() 540 list_move_tail(&buf->vb.queue, &q->active); in restart_video_queue() 542 buf->vb.state = VIDEOBUF_ACTIVE; in restart_video_queue() 546 buf,buf->vb.i); in restart_video_queue() 548 } else if (prev->vb.width == buf->vb.width && in restart_video_queue() 549 prev->vb.height == buf->vb.height && in restart_video_queue() [all …]
|
/drivers/media/video/saa7134/ |
D | saa7134-vbi.c | 71 saa_writeb(SAA7134_VBI_H_LEN1(task), buf->vb.width & 0xff); in task_init() 72 saa_writeb(SAA7134_VBI_H_LEN2(task), buf->vb.width >> 8); in task_init() 73 saa_writeb(SAA7134_VBI_V_LEN1(task), buf->vb.height & 0xff); in task_init() 74 saa_writeb(SAA7134_VBI_V_LEN2(task), buf->vb.height >> 8); in task_init() 88 buf->vb.state = VIDEOBUF_ACTIVE; in buffer_activate() 102 saa_writel(SAA7134_RS_BA2(2),base + buf->vb.size/2); in buffer_activate() 103 saa_writel(SAA7134_RS_PITCH(2),buf->vb.width); in buffer_activate() 106 saa_writel(SAA7134_RS_BA2(3),base + buf->vb.size/2); in buffer_activate() 107 saa_writel(SAA7134_RS_PITCH(3),buf->vb.width); in buffer_activate() 118 struct videobuf_buffer *vb, in buffer_prepare() argument [all …]
|
D | saa7134-ts.c | 50 buf->vb.state = VIDEOBUF_ACTIVE; in buffer_activate() 55 if (V4L2_FIELD_TOP == buf->vb.field) { in buffer_activate() 90 static int buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb, in buffer_prepare() argument 94 struct saa7134_buf *buf = container_of(vb,struct saa7134_buf,vb); in buffer_prepare() 105 if (0 != buf->vb.baddr && buf->vb.bsize < size) in buffer_prepare() 108 if (buf->vb.size != size) { in buffer_prepare() 112 if (VIDEOBUF_NEEDS_INIT == buf->vb.state) { in buffer_prepare() 113 struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb); in buffer_prepare() 115 buf->vb.width = llength; in buffer_prepare() 116 buf->vb.height = lines; in buffer_prepare() [all …]
|
/drivers/media/video/ |
D | sh_mobile_ceu_camera.c | 79 struct videobuf_buffer vb; /* v4l buffer must be first */ member 148 &buf->vb, buf->vb.baddr, buf->vb.bsize); in free_buffer() 153 videobuf_dma_contig_free(vq, &buf->vb); in free_buffer() 155 buf->vb.state = VIDEOBUF_NEEDS_INIT; in free_buffer() 207 struct videobuf_buffer *vb, in sh_mobile_ceu_videobuf_prepare() argument 214 buf = container_of(vb, struct sh_mobile_ceu_buffer, vb); in sh_mobile_ceu_videobuf_prepare() 217 vb, vb->baddr, vb->bsize); in sh_mobile_ceu_videobuf_prepare() 220 WARN_ON(!list_empty(&vb->queue)); in sh_mobile_ceu_videobuf_prepare() 225 memset((void *)vb->baddr, 0xaa, vb->bsize); in sh_mobile_ceu_videobuf_prepare() 231 vb->width != icd->width || in sh_mobile_ceu_videobuf_prepare() [all …]
|
D | pxa_camera.c | 186 struct videobuf_buffer vb; member 268 struct videobuf_dmabuf *dma = videobuf_to_dma(&buf->vb); in free_buffer() 274 &buf->vb, buf->vb.baddr, buf->vb.bsize); in free_buffer() 278 videobuf_waiton(&buf->vb, 0, 0); in free_buffer() 290 buf->vb.state = VIDEOBUF_NEEDS_INIT; in free_buffer() 339 struct videobuf_buffer *vb, enum v4l2_field field) in pxa_videobuf_prepare() argument 344 struct pxa_buffer *buf = container_of(vb, struct pxa_buffer, vb); in pxa_videobuf_prepare() 350 vb, vb->baddr, vb->bsize); in pxa_videobuf_prepare() 353 WARN_ON(!list_empty(&vb->queue)); in pxa_videobuf_prepare() 358 memset((void *)vb->baddr, 0xaa, vb->bsize); in pxa_videobuf_prepare() [all …]
|
D | omap24xxcam.c | 228 static void omap24xxcam_vbq_free_mmap_buffer(struct videobuf_buffer *vb) in omap24xxcam_vbq_free_mmap_buffer() argument 230 struct videobuf_dmabuf *dma = videobuf_to_dma(vb); in omap24xxcam_vbq_free_mmap_buffer() 281 static int omap24xxcam_vbq_alloc_mmap_buffer(struct videobuf_buffer *vb) in omap24xxcam_vbq_alloc_mmap_buffer() argument 284 size_t alloc_size, size = vb->bsize; /* vb->bsize is page aligned */ in omap24xxcam_vbq_alloc_mmap_buffer() 287 struct videobuf_dmabuf *dma = videobuf_to_dma(vb); in omap24xxcam_vbq_alloc_mmap_buffer() 293 max_pages = vb->bsize >> PAGE_SHIFT; in omap24xxcam_vbq_alloc_mmap_buffer() 347 omap24xxcam_vbq_free_mmap_buffer(vb); in omap24xxcam_vbq_alloc_mmap_buffer() 392 struct videobuf_buffer *vb = (struct videobuf_buffer *)arg; in omap24xxcam_vbq_complete() local 403 do_gettimeofday(&vb->ts); in omap24xxcam_vbq_complete() 404 vb->field_count = atomic_add_return(2, &fh->field_count); in omap24xxcam_vbq_complete() [all …]
|
D | videobuf-vmalloc.c | 138 struct videobuf_buffer *vb; in __videobuf_alloc() local 140 vb = kzalloc(size+sizeof(*mem),GFP_KERNEL); in __videobuf_alloc() 142 mem = vb->priv = ((char *)vb)+size; in __videobuf_alloc() 146 __func__,vb,(long)sizeof(*vb),(long)size-sizeof(*vb), in __videobuf_alloc() 149 return vb; in __videobuf_alloc() 153 struct videobuf_buffer *vb, in __videobuf_iolock() argument 156 struct videobuf_vmalloc_memory *mem = vb->priv; in __videobuf_iolock() 163 switch (vb->memory) { in __videobuf_iolock() 174 pages = PAGE_ALIGN(vb->size); in __videobuf_iolock() 179 if (vb->baddr) { in __videobuf_iolock() [all …]
|
D | videobuf-core.c | 49 struct videobuf_buffer *vb; in videobuf_alloc() local 51 BUG_ON(q->msize < sizeof(*vb)); in videobuf_alloc() 58 vb = q->int_ops->alloc(q->msize); in videobuf_alloc() 60 if (NULL != vb) { in videobuf_alloc() 61 init_waitqueue_head(&vb->done); in videobuf_alloc() 62 vb->magic = MAGIC_BUFFER; in videobuf_alloc() 65 return vb; in videobuf_alloc() 68 #define WAITON_CONDITION (vb->state != VIDEOBUF_ACTIVE &&\ 69 vb->state != VIDEOBUF_QUEUED) 70 int videobuf_waiton(struct videobuf_buffer *vb, int non_blocking, int intr) in videobuf_waiton() argument [all …]
|
D | vivi.c | 189 struct videobuf_buffer vb; member 426 int hmax = buf->vb.height; in vivi_fillbuff() 427 int wmax = buf->vb.width; in vivi_fillbuff() 430 void *vbuf = videobuf_to_vmalloc(&buf->vb); in vivi_fillbuff() 475 buf->vb.field_count++; in vivi_fillbuff() 477 buf->vb.ts = ts; in vivi_fillbuff() 478 buf->vb.state = VIDEOBUF_DONE; in vivi_fillbuff() 498 struct vivi_buffer, vb.queue); in vivi_thread_tick() 501 if (!waitqueue_active(&buf->vb.done)) in vivi_thread_tick() 504 list_del(&buf->vb.queue); in vivi_thread_tick() [all …]
|
D | videobuf-dma-sg.c | 416 struct videobuf_buffer *vb; in __videobuf_alloc() local 418 vb = kzalloc(size+sizeof(*mem),GFP_KERNEL); in __videobuf_alloc() 420 mem = vb->priv = ((char *)vb)+size; in __videobuf_alloc() 426 __func__,vb,(long)sizeof(*vb),(long)size-sizeof(*vb), in __videobuf_alloc() 429 return vb; in __videobuf_alloc() 443 struct videobuf_buffer *vb, in __videobuf_iolock() argument 448 struct videobuf_dma_sg_memory *mem = vb->priv; in __videobuf_iolock() 453 switch (vb->memory) { in __videobuf_iolock() 456 if (0 == vb->baddr) { in __videobuf_iolock() 458 pages = PAGE_ALIGN(vb->size) >> PAGE_SHIFT; in __videobuf_iolock() [all …]
|
D | videobuf-dma-contig.c | 114 struct videobuf_buffer *vb; in __videobuf_alloc() local 116 vb = kzalloc(size + sizeof(*mem), GFP_KERNEL); in __videobuf_alloc() 117 if (vb) { in __videobuf_alloc() 118 mem = vb->priv = ((char *)vb) + size; in __videobuf_alloc() 122 return vb; in __videobuf_alloc() 136 struct videobuf_buffer *vb, in __videobuf_iolock() argument 139 struct videobuf_dma_contig_memory *mem = vb->priv; in __videobuf_iolock() 144 switch (vb->memory) { in __videobuf_iolock() 160 if (vb->baddr) in __videobuf_iolock() 163 mem->size = PAGE_ALIGN(vb->size); in __videobuf_iolock()
|
D | s2255drv.c | 282 struct videobuf_buffer vb; member 596 struct s2255_buffer, vb.queue); in s2255_got_frame() 598 if (!waitqueue_active(&buf->vb.done)) { in s2255_got_frame() 603 list_del(&buf->vb.queue); in s2255_got_frame() 604 do_gettimeofday(&buf->vb.ts); in s2255_got_frame() 605 dprintk(100, "[%p/%d] wakeup\n", buf, buf->vb.i); in s2255_got_frame() 607 wake_up(&buf->vb.done); in s2255_got_frame() 608 dprintk(2, "wakeup [buf/i] [%p/%d]\n", buf, buf->vb.i); in s2255_got_frame() 645 char *vbuf = videobuf_to_vmalloc(&buf->vb); in s2255_fillbuff() 661 vbuf, buf->vb.width, in s2255_fillbuff() [all …]
|
/drivers/media/video/bt8xx/ |
D | bttv-risc.c | 581 struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb); in bttv_dma_free() 584 videobuf_waiton(&buf->vb,0,0); in bttv_dma_free() 589 buf->vb.state = VIDEOBUF_NEEDS_INIT; in bttv_dma_free() 609 vbi->vb.state = VIDEOBUF_ACTIVE; in bttv_buffer_activate_vbi() 610 list_del(&vbi->vb.queue); in bttv_buffer_activate_vbi() 651 set->top->vb.state = VIDEOBUF_ACTIVE; in bttv_buffer_activate_video() 652 if (set->top->vb.queue.next) in bttv_buffer_activate_video() 653 list_del(&set->top->vb.queue); in bttv_buffer_activate_video() 655 set->top->vb.state = VIDEOBUF_ACTIVE; in bttv_buffer_activate_video() 656 set->bottom->vb.state = VIDEOBUF_ACTIVE; in bttv_buffer_activate_video() [all …]
|
D | bttv-vbi.c | 99 struct videobuf_buffer *vb, in vbi_buffer_prepare() argument 104 struct bttv_buffer *buf = container_of(vb,struct bttv_buffer,vb); in vbi_buffer_prepare() 110 buf->vb.size = IMAGE_SIZE(&fh->vbi_fmt.fmt); in vbi_buffer_prepare() 111 if (0 != buf->vb.baddr && buf->vb.bsize < buf->vb.size) in vbi_buffer_prepare() 146 if (VIDEOBUF_NEEDS_INIT == buf->vb.state) { in vbi_buffer_prepare() 148 if (0 != (rc = videobuf_iolock(q, &buf->vb, NULL))) in vbi_buffer_prepare() 154 struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb); in vbi_buffer_prepare() 193 buf->vb.state = VIDEOBUF_PREPARED; in vbi_buffer_prepare() 194 buf->vb.field = field; in vbi_buffer_prepare() 196 vb, &buf->top, &buf->bottom, in vbi_buffer_prepare() [all …]
|
/drivers/media/common/ |
D | saa7146_vbi.c | 208 buf->vb.state = VIDEOBUF_ACTIVE; in buffer_activate() 217 static int buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,enum v4l2_field fiel… in buffer_prepare() argument 222 struct saa7146_buf *buf = (struct saa7146_buf *)vb; in buffer_prepare() 231 DEB_VBI(("vb:%p\n",vb)); in buffer_prepare() 233 if (0 != buf->vb.baddr && buf->vb.bsize < size) { in buffer_prepare() 238 if (buf->vb.size != size) in buffer_prepare() 241 if (VIDEOBUF_NEEDS_INIT == buf->vb.state) { in buffer_prepare() 242 struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb); in buffer_prepare() 244 buf->vb.width = llength; in buffer_prepare() 245 buf->vb.height = lines; in buffer_prepare() [all …]
|
D | saa7146_video.c | 598 struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb); in saa7146_pgtable_build() 1235 buf->vb.state = VIDEOBUF_ACTIVE; in buffer_activate() 1243 struct videobuf_buffer *vb, enum v4l2_field field) in buffer_prepare() argument 1249 struct saa7146_buf *buf = (struct saa7146_buf *)vb; in buffer_prepare() 1252 DEB_CAP(("vbuf:%p\n",vb)); in buffer_prepare() 1264 if (0 != buf->vb.baddr && buf->vb.bsize < size) { in buffer_prepare() 1271 if (buf->vb.width != fh->video_fmt.width || in buffer_prepare() 1272 buf->vb.bytesperline != fh->video_fmt.bytesperline || in buffer_prepare() 1273 buf->vb.height != fh->video_fmt.height || in buffer_prepare() 1274 buf->vb.size != size || in buffer_prepare() [all …]
|
/drivers/gpu/drm/via/ |
D | via_dma.c | 58 *((uint32_t *)(vb)) = ((nReg) >> 2) | HALCYON_HEADER1; \ 59 *((uint32_t *)(vb) + 1) = (nData); \ 60 vb = ((uint32_t *)vb) + 2; \ 67 *vb++ = (w1); \ 68 *vb++ = (w2); \ 264 uint32_t *vb; in via_dispatch_cmdbuffer() local 293 vb = via_check_dma(dev_priv, (cmd->size < 0x100) ? 0x102 : cmd->size); in via_dispatch_cmdbuffer() 294 if (vb == NULL) { in via_dispatch_cmdbuffer() 298 memcpy(vb, dev_priv->pci_buf, cmd->size); in via_dispatch_cmdbuffer() 391 uint32_t * vb, int qw_count) in via_align_buffer() argument [all …]
|
/drivers/media/video/em28xx/ |
D | em28xx-video.c | 136 em28xx_isocdbg("[%p/%d] wakeup\n", buf, buf->vb.i); in buffer_filled() 137 buf->vb.state = VIDEOBUF_DONE; in buffer_filled() 138 buf->vb.field_count++; in buffer_filled() 139 do_gettimeofday(&buf->vb.ts); in buffer_filled() 143 list_del(&buf->vb.queue); in buffer_filled() 144 wake_up(&buf->vb.done); in buffer_filled() 160 if (dma_q->pos + len > buf->vb.size) in em28xx_copy_video() 161 len = buf->vb.size - dma_q->pos; in em28xx_copy_video() 185 if ((char *)startwrite + lencopy > (char *)outp + buf->vb.size) { in em28xx_copy_video() 188 ((char *)outp + buf->vb.size)); in em28xx_copy_video() [all …]
|
/drivers/media/video/usbvision/ |
D | usbvision-video.c | 785 void *priv, struct v4l2_buffer *vb) in vidioc_querybuf() argument 792 if(vb->type != V4L2_CAP_VIDEO_CAPTURE) { in vidioc_querybuf() 795 if(vb->index>=usbvision->num_frames) { in vidioc_querybuf() 799 vb->flags = 0; in vidioc_querybuf() 800 frame = &usbvision->frame[vb->index]; in vidioc_querybuf() 802 vb->flags |= V4L2_BUF_FLAG_QUEUED; in vidioc_querybuf() 804 vb->flags |= V4L2_BUF_FLAG_DONE; in vidioc_querybuf() 806 vb->flags |= V4L2_BUF_FLAG_MAPPED; in vidioc_querybuf() 807 vb->memory = V4L2_MEMORY_MMAP; in vidioc_querybuf() 809 vb->m.offset = vb->index*PAGE_ALIGN(usbvision->max_frame_size); in vidioc_querybuf() [all …]
|