/drivers/virtio/ |
D | virtio_balloon.c | 98 struct virtio_balloon *vb = vq->vdev->priv; in balloon_ack() local 100 wake_up(&vb->acked); in balloon_ack() 103 static void tell_host(struct virtio_balloon *vb, struct virtqueue *vq) in tell_host() argument 108 sg_init_one(&sg, vb->pfns, sizeof(vb->pfns[0]) * vb->num_pfns); in tell_host() 111 if (virtqueue_add_outbuf(vq, &sg, 1, vb, GFP_KERNEL) < 0) in tell_host() 116 wait_event(vb->acked, virtqueue_get_buf(vq, &len)); in tell_host() 129 static void fill_balloon(struct virtio_balloon *vb, size_t num) in fill_balloon() argument 131 struct balloon_dev_info *vb_dev_info = vb->vb_dev_info; in fill_balloon() 134 num = min(num, ARRAY_SIZE(vb->pfns)); in fill_balloon() 136 mutex_lock(&vb->balloon_lock); in fill_balloon() [all …]
|
/drivers/media/v4l2-core/ |
D | videobuf2-core.c | 51 static int __vb2_buf_mem_alloc(struct vb2_buffer *vb) in __vb2_buf_mem_alloc() argument 53 struct vb2_queue *q = vb->vb2_queue; in __vb2_buf_mem_alloc() 61 for (plane = 0; plane < vb->num_planes; ++plane) { in __vb2_buf_mem_alloc() 70 vb->planes[plane].mem_priv = mem_priv; in __vb2_buf_mem_alloc() 71 vb->v4l2_planes[plane].length = q->plane_sizes[plane]; in __vb2_buf_mem_alloc() 78 call_memop(q, put, vb->planes[plane - 1].mem_priv); in __vb2_buf_mem_alloc() 79 vb->planes[plane - 1].mem_priv = NULL; in __vb2_buf_mem_alloc() 88 static void __vb2_buf_mem_free(struct vb2_buffer *vb) in __vb2_buf_mem_free() argument 90 struct vb2_queue *q = vb->vb2_queue; in __vb2_buf_mem_free() 93 for (plane = 0; plane < vb->num_planes; ++plane) { in __vb2_buf_mem_free() [all …]
|
D | videobuf-vmalloc.c | 141 struct videobuf_buffer *vb; in __videobuf_alloc_vb() local 143 vb = kzalloc(size + sizeof(*mem), GFP_KERNEL); in __videobuf_alloc_vb() 144 if (!vb) in __videobuf_alloc_vb() 145 return vb; in __videobuf_alloc_vb() 147 mem = vb->priv = ((char *)vb) + size; in __videobuf_alloc_vb() 151 __func__, vb, (long)sizeof(*vb), (long)size - sizeof(*vb), in __videobuf_alloc_vb() 154 return vb; in __videobuf_alloc_vb() 158 struct videobuf_buffer *vb, in __videobuf_iolock() argument 161 struct videobuf_vmalloc_memory *mem = vb->priv; in __videobuf_iolock() 168 switch (vb->memory) { in __videobuf_iolock() [all …]
|
D | videobuf-dma-contig.c | 161 struct videobuf_buffer *vb) in videobuf_dma_contig_user_get() argument 170 offset = vb->baddr & ~PAGE_MASK; in videobuf_dma_contig_user_get() 171 mem->size = PAGE_ALIGN(vb->size + offset); in videobuf_dma_contig_user_get() 176 vma = find_vma(mm, vb->baddr); in videobuf_dma_contig_user_get() 180 if ((vb->baddr + mem->size) > vma->vm_end) in videobuf_dma_contig_user_get() 185 user_address = vb->baddr; in videobuf_dma_contig_user_get() 214 struct videobuf_buffer *vb; in __videobuf_alloc() local 216 vb = kzalloc(size + sizeof(*mem), GFP_KERNEL); in __videobuf_alloc() 217 if (vb) { in __videobuf_alloc() 218 vb->priv = ((char *)vb) + size; in __videobuf_alloc() [all …]
|
/drivers/gpio/ |
D | gpio-viperboard.c | 75 struct vprbrd *vb; member 93 struct vprbrd *vb = gpio->vb; in vprbrd_gpioa_get() local 94 struct vprbrd_gpioa_msg *gamsg = (struct vprbrd_gpioa_msg *)vb->buf; in vprbrd_gpioa_get() 100 mutex_lock(&vb->lock); in vprbrd_gpioa_get() 114 ret = usb_control_msg(vb->usb_dev, usb_sndctrlpipe(vb->usb_dev, 0), in vprbrd_gpioa_get() 121 ret = usb_control_msg(vb->usb_dev, usb_rcvctrlpipe(vb->usb_dev, 0), in vprbrd_gpioa_get() 127 mutex_unlock(&vb->lock); in vprbrd_gpioa_get() 144 struct vprbrd *vb = gpio->vb; in vprbrd_gpioa_set() local 145 struct vprbrd_gpioa_msg *gamsg = (struct vprbrd_gpioa_msg *)vb->buf; in vprbrd_gpioa_set() 153 mutex_lock(&vb->lock); in vprbrd_gpioa_set() [all …]
|
/drivers/mfd/ |
D | viperboard.c | 55 struct vprbrd *vb; in vprbrd_probe() local 61 vb = kzalloc(sizeof(*vb), GFP_KERNEL); in vprbrd_probe() 62 if (vb == NULL) { in vprbrd_probe() 67 mutex_init(&vb->lock); in vprbrd_probe() 69 vb->usb_dev = usb_get_dev(interface_to_usbdev(interface)); in vprbrd_probe() 72 usb_set_intfdata(interface, vb); in vprbrd_probe() 73 dev_set_drvdata(&vb->pdev.dev, vb); in vprbrd_probe() 76 pipe = usb_rcvctrlpipe(vb->usb_dev, 0); in vprbrd_probe() 77 ret = usb_control_msg(vb->usb_dev, pipe, VPRBRD_USB_REQUEST_MAJOR, in vprbrd_probe() 78 VPRBRD_USB_TYPE_IN, 0x0000, 0x0000, vb->buf, 1, in vprbrd_probe() [all …]
|
/drivers/staging/media/go7007/ |
D | go7007-driver.c | 378 static inline void store_byte(struct go7007_buffer *vb, u8 byte) in store_byte() argument 380 if (vb && vb->vb.v4l2_planes[0].bytesused < GO7007_BUF_SIZE) { in store_byte() 381 u8 *ptr = vb2_plane_vaddr(&vb->vb, 0); in store_byte() 383 ptr[vb->vb.v4l2_planes[0].bytesused++] = byte; in store_byte() 390 static struct go7007_buffer *frame_boundary(struct go7007 *go, struct go7007_buffer *vb) in frame_boundary() argument 393 u32 *bytesused = &vb->vb.v4l2_planes[0].bytesused; in frame_boundary() 396 if (vb) { in frame_boundary() 397 if (vb->modet_active) { in frame_boundary() 400 store_byte(vb, go->active_map[i]); in frame_boundary() 403 vb->modet_active = 0; in frame_boundary() [all …]
|
/drivers/media/pci/cx88/ |
D | cx88-vbi.c | 57 buf->vb.width, buf->risc.dma); in cx8800_start_vbi_dma() 105 buf = list_entry(q->active.next, struct cx88_buffer, vb.queue); in cx8800_restart_vbi_queue() 107 buf, buf->vb.i); in cx8800_restart_vbi_queue() 109 list_for_each_entry(buf, &q->active, vb.queue) in cx8800_restart_vbi_queue() 130 buf = list_entry(q->active.next, struct cx88_buffer, vb.queue); in cx8800_vbi_timeout() 131 list_del(&buf->vb.queue); in cx8800_vbi_timeout() 132 buf->vb.state = VIDEOBUF_ERROR; in cx8800_vbi_timeout() 133 wake_up(&buf->vb.done); in cx8800_vbi_timeout() 135 buf, buf->vb.i, (unsigned long)buf->risc.dma); in cx8800_vbi_timeout() 157 vbi_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb, in vbi_prepare() argument [all …]
|
D | cx88-mpeg.c | 96 buf->vb.width, buf->vb.height, buf->vb.field); in cx8802_start_dma() 103 cx_write(MO_TS_LNGTH, buf->vb.width); in cx8802_start_dma() 222 buf = list_entry(q->queued.next, struct cx88_buffer, vb.queue); in cx8802_restart_queue() 224 list_move_tail(&buf->vb.queue, &q->active); in cx8802_restart_queue() 226 buf->vb.state = VIDEOBUF_ACTIVE; in cx8802_restart_queue() 230 buf,buf->vb.i); in cx8802_restart_queue() 232 } else if (prev->vb.width == buf->vb.width && in cx8802_restart_queue() 233 prev->vb.height == buf->vb.height && in cx8802_restart_queue() 235 list_move_tail(&buf->vb.queue, &q->active); in cx8802_restart_queue() 236 buf->vb.state = VIDEOBUF_ACTIVE; in cx8802_restart_queue() [all …]
|
/drivers/media/pci/cx23885/ |
D | cx23885-vbi.c | 117 buf->vb.width, buf->risc.dma); in cx23885_start_vbi_dma() 146 buf = list_entry(q->active.next, struct cx23885_buffer, vb.queue); in cx23885_restart_vbi_queue() 148 buf, buf->vb.i); in cx23885_restart_vbi_queue() 151 buf = list_entry(item, struct cx23885_buffer, vb.queue); in cx23885_restart_vbi_queue() 171 vb.queue); in cx23885_vbi_timeout() 172 list_del(&buf->vb.queue); in cx23885_vbi_timeout() 173 buf->vb.state = VIDEOBUF_ERROR; in cx23885_vbi_timeout() 174 wake_up(&buf->vb.done); in cx23885_vbi_timeout() 176 buf, buf->vb.i, (unsigned long)buf->risc.dma); in cx23885_vbi_timeout() 200 vbi_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb, in vbi_prepare() argument [all …]
|
/drivers/media/usb/au0828/ |
D | au0828-vbi.c | 60 videobuf_vmalloc_free(&buf->vb); in free_buffer() 61 buf->vb.state = VIDEOBUF_NEEDS_INIT; in free_buffer() 82 vbi_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb, in vbi_prepare() argument 87 struct au0828_buffer *buf = container_of(vb, struct au0828_buffer, vb); in vbi_prepare() 90 buf->vb.size = dev->vbi_width * dev->vbi_height * 2; in vbi_prepare() 92 if (0 != buf->vb.baddr && buf->vb.bsize < buf->vb.size) in vbi_prepare() 95 buf->vb.width = dev->vbi_width; in vbi_prepare() 96 buf->vb.height = dev->vbi_height; in vbi_prepare() 97 buf->vb.field = field; in vbi_prepare() 99 if (VIDEOBUF_NEEDS_INIT == buf->vb.state) { in vbi_prepare() [all …]
|
/drivers/media/platform/soc_camera/ |
D | mx1_camera.c | 95 struct videobuf_buffer vb; member 146 struct videobuf_buffer *vb = &buf->vb; in free_buffer() local 151 vb, vb->baddr, vb->bsize); in free_buffer() 157 videobuf_waiton(vq, vb, 0, 0); in free_buffer() 158 videobuf_dma_contig_free(vq, vb); in free_buffer() 160 vb->state = VIDEOBUF_NEEDS_INIT; in free_buffer() 164 struct videobuf_buffer *vb, enum v4l2_field field) in mx1_videobuf_prepare() argument 167 struct mx1_buffer *buf = container_of(vb, struct mx1_buffer, vb); in mx1_videobuf_prepare() 171 vb, vb->baddr, vb->bsize); in mx1_videobuf_prepare() 174 WARN_ON(!list_empty(&vb->queue)); in mx1_videobuf_prepare() [all …]
|
D | pxa_camera.c | 188 struct videobuf_buffer vb; member 262 struct videobuf_dmabuf *dma = videobuf_to_dma(&buf->vb); in free_buffer() 268 &buf->vb, buf->vb.baddr, buf->vb.bsize); in free_buffer() 274 videobuf_waiton(vq, &buf->vb, 0, 0); in free_buffer() 287 buf->vb.state = VIDEOBUF_NEEDS_INIT; in free_buffer() 425 struct videobuf_buffer *vb, enum v4l2_field field) in pxa_videobuf_prepare() argument 431 struct pxa_buffer *buf = container_of(vb, struct pxa_buffer, vb); in pxa_videobuf_prepare() 436 vb, vb->baddr, vb->bsize); in pxa_videobuf_prepare() 439 WARN_ON(!list_empty(&vb->queue)); in pxa_videobuf_prepare() 446 memset((void *)vb->baddr, 0xaa, vb->bsize); in pxa_videobuf_prepare() [all …]
|
/drivers/media/pci/saa7134/ |
D | saa7134-vbi.c | 70 saa_writeb(SAA7134_VBI_H_LEN1(task), buf->vb.width & 0xff); in task_init() 71 saa_writeb(SAA7134_VBI_H_LEN2(task), buf->vb.width >> 8); in task_init() 72 saa_writeb(SAA7134_VBI_V_LEN1(task), buf->vb.height & 0xff); in task_init() 73 saa_writeb(SAA7134_VBI_V_LEN2(task), buf->vb.height >> 8); in task_init() 87 buf->vb.state = VIDEOBUF_ACTIVE; in buffer_activate() 101 saa_writel(SAA7134_RS_BA2(2),base + buf->vb.size/2); in buffer_activate() 102 saa_writel(SAA7134_RS_PITCH(2),buf->vb.width); in buffer_activate() 105 saa_writel(SAA7134_RS_BA2(3),base + buf->vb.size/2); in buffer_activate() 106 saa_writel(SAA7134_RS_PITCH(3),buf->vb.width); in buffer_activate() 117 struct videobuf_buffer *vb, in buffer_prepare() argument [all …]
|
D | saa7134-ts.c | 49 buf->vb.state = VIDEOBUF_ACTIVE; in buffer_activate() 54 if (V4L2_FIELD_TOP == buf->vb.field) { in buffer_activate() 75 static int buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb, in buffer_prepare() argument 79 struct saa7134_buf *buf = container_of(vb,struct saa7134_buf,vb); in buffer_prepare() 89 if (0 != buf->vb.baddr && buf->vb.bsize < size) in buffer_prepare() 92 if (buf->vb.size != size) { in buffer_prepare() 96 if (VIDEOBUF_NEEDS_INIT == buf->vb.state) { in buffer_prepare() 98 struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb); in buffer_prepare() 102 buf->vb.width = llength; in buffer_prepare() 103 buf->vb.height = lines; in buffer_prepare() [all …]
|
/drivers/media/platform/ |
D | fsl-viu.c | 122 struct videobuf_buffer vb; member 333 buf = list_entry(vidq->active.next, struct viu_buf, vb.queue); in restart_video_queue() 335 buf, buf->vb.i); in restart_video_queue() 340 list_for_each_entry_safe(buf, prev, &vidq->active, vb.queue) { in restart_video_queue() 341 list_del(&buf->vb.queue); in restart_video_queue() 342 buf->vb.state = VIDEOBUF_ERROR; in restart_video_queue() 343 wake_up(&buf->vb.done); in restart_video_queue() 353 buf = list_entry(vidq->queued.next, struct viu_buf, vb.queue); in restart_video_queue() 355 list_move_tail(&buf->vb.queue, &vidq->active); in restart_video_queue() 361 buf->vb.state = VIDEOBUF_ACTIVE; in restart_video_queue() [all …]
|
D | timblogiw.c | 75 struct videobuf_buffer vb; member 122 struct videobuf_buffer *vb = &buf->vb; in timblogiw_dma_cb() local 131 if (vb->state != VIDEOBUF_ERROR) { in timblogiw_dma_cb() 132 list_del(&vb->queue); in timblogiw_dma_cb() 133 v4l2_get_timestamp(&vb->ts); in timblogiw_dma_cb() 134 vb->field_count = fh->frame_count * 2; in timblogiw_dma_cb() 135 vb->state = VIDEOBUF_DONE; in timblogiw_dma_cb() 137 wake_up(&vb->done); in timblogiw_dma_cb() 141 vb = list_entry(fh->capture.next, struct videobuf_buffer, in timblogiw_dma_cb() 143 vb->state = VIDEOBUF_ACTIVE; in timblogiw_dma_cb() [all …]
|
/drivers/media/pci/cx25821/ |
D | cx25821-video.c | 92 vb.queue); in cx25821_video_wakeup() 100 v4l2_get_timestamp(&buf->vb.ts); in cx25821_video_wakeup() 101 buf->vb.state = VIDEOBUF_DONE; in cx25821_video_wakeup() 102 list_del(&buf->vb.queue); in cx25821_video_wakeup() 103 wake_up(&buf->vb.done); in cx25821_video_wakeup() 151 vb.queue); in cx25821_restart_video_queue() 156 buf = list_entry(item, struct cx25821_buffer, vb.queue); in cx25821_restart_video_queue() 170 vb.queue); in cx25821_restart_video_queue() 173 list_move_tail(&buf->vb.queue, &q->active); in cx25821_restart_video_queue() 175 buf->vb.state = VIDEOBUF_ACTIVE; in cx25821_restart_video_queue() [all …]
|
/drivers/media/pci/bt8xx/ |
D | bttv-risc.c | 583 struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb); in bttv_dma_free() 586 videobuf_waiton(q, &buf->vb, 0, 0); in bttv_dma_free() 591 buf->vb.state = VIDEOBUF_NEEDS_INIT; in bttv_dma_free() 611 vbi->vb.state = VIDEOBUF_ACTIVE; in bttv_buffer_activate_vbi() 612 list_del(&vbi->vb.queue); in bttv_buffer_activate_vbi() 653 set->top->vb.state = VIDEOBUF_ACTIVE; in bttv_buffer_activate_video() 654 if (set->top->vb.queue.next) in bttv_buffer_activate_video() 655 list_del(&set->top->vb.queue); in bttv_buffer_activate_video() 657 set->top->vb.state = VIDEOBUF_ACTIVE; in bttv_buffer_activate_video() 658 set->bottom->vb.state = VIDEOBUF_ACTIVE; in bttv_buffer_activate_video() [all …]
|
D | bttv-vbi.c | 104 struct videobuf_buffer *vb, in vbi_buffer_prepare() argument 109 struct bttv_buffer *buf = container_of(vb,struct bttv_buffer,vb); in vbi_buffer_prepare() 115 buf->vb.size = IMAGE_SIZE(&fh->vbi_fmt.fmt); in vbi_buffer_prepare() 116 if (0 != buf->vb.baddr && buf->vb.bsize < buf->vb.size) in vbi_buffer_prepare() 151 if (VIDEOBUF_NEEDS_INIT == buf->vb.state) { in vbi_buffer_prepare() 153 if (0 != (rc = videobuf_iolock(q, &buf->vb, NULL))) in vbi_buffer_prepare() 159 struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb); in vbi_buffer_prepare() 198 buf->vb.state = VIDEOBUF_PREPARED; in vbi_buffer_prepare() 199 buf->vb.field = field; in vbi_buffer_prepare() 201 vb, &buf->top, &buf->bottom, in vbi_buffer_prepare() [all …]
|
/drivers/gpu/drm/radeon/ |
D | r600_blit.c | 568 u32 *vb; in r600_blit_copy() local 570 vb = r600_nomm_get_vb_ptr(dev); in r600_blit_copy() 607 vb = r600_nomm_get_vb_ptr(dev); in r600_blit_copy() 610 vb[0] = int2float(dst_x); in r600_blit_copy() 611 vb[1] = 0; in r600_blit_copy() 612 vb[2] = int2float(src_x); in r600_blit_copy() 613 vb[3] = 0; in r600_blit_copy() 615 vb[4] = int2float(dst_x); in r600_blit_copy() 616 vb[5] = int2float(h); in r600_blit_copy() 617 vb[6] = int2float(src_x); in r600_blit_copy() [all …]
|
/drivers/media/usb/em28xx/ |
D | em28xx-vbi.c | 69 static int vbi_buffer_prepare(struct vb2_buffer *vb) in vbi_buffer_prepare() argument 71 struct em28xx *dev = vb2_get_drv_priv(vb->vb2_queue); in vbi_buffer_prepare() 72 struct em28xx_buffer *buf = container_of(vb, struct em28xx_buffer, vb); in vbi_buffer_prepare() 77 if (vb2_plane_size(vb, 0) < size) { in vbi_buffer_prepare() 79 __func__, vb2_plane_size(vb, 0), size); in vbi_buffer_prepare() 82 vb2_set_plane_payload(&buf->vb, 0, size); in vbi_buffer_prepare() 88 vbi_buffer_queue(struct vb2_buffer *vb) in vbi_buffer_queue() argument 90 struct em28xx *dev = vb2_get_drv_priv(vb->vb2_queue); in vbi_buffer_queue() 91 struct em28xx_buffer *buf = container_of(vb, struct em28xx_buffer, vb); in vbi_buffer_queue() 95 buf->mem = vb2_plane_vaddr(vb, 0); in vbi_buffer_queue() [all …]
|
/drivers/i2c/busses/ |
D | i2c-viperboard.c | 45 struct vprbrd *vb = (struct vprbrd *)i2c->algo_data; in vprbrd_i2c_status() local 50 ret = usb_control_msg(vb->usb_dev, usb_rcvctrlpipe(vb->usb_dev, 0), in vprbrd_i2c_status() 118 static int vprbrd_i2c_read(struct vprbrd *vb, struct i2c_msg *msg) in vprbrd_i2c_read() argument 124 (struct vprbrd_i2c_read_msg *)vb->buf; in vprbrd_i2c_read() 207 ret = vprbrd_i2c_receive(vb->usb_dev, rmsg, len1); in vprbrd_i2c_read() 215 ret = vprbrd_i2c_receive(vb->usb_dev, rmsg, len2); in vprbrd_i2c_read() 225 static int vprbrd_i2c_write(struct vprbrd *vb, struct i2c_msg *msg) in vprbrd_i2c_write() argument 231 (struct vprbrd_i2c_write_msg *)vb->buf; in vprbrd_i2c_write() 262 ret = usb_bulk_msg(vb->usb_dev, in vprbrd_i2c_write() 263 usb_sndbulkpipe(vb->usb_dev, in vprbrd_i2c_write() [all …]
|
/drivers/media/usb/cx231xx/ |
D | cx231xx-vbi.c | 213 videobuf_vmalloc_free(&buf->vb); in free_buffer() 214 buf->vb.state = VIDEOBUF_NEEDS_INIT; in free_buffer() 218 vbi_buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb, in vbi_buffer_prepare() argument 223 container_of(vb, struct cx231xx_buffer, vb); in vbi_buffer_prepare() 230 buf->vb.size = ((dev->width << 1) * height * 2); in vbi_buffer_prepare() 232 if (0 != buf->vb.baddr && buf->vb.bsize < buf->vb.size) in vbi_buffer_prepare() 235 buf->vb.width = dev->width; in vbi_buffer_prepare() 236 buf->vb.height = height; in vbi_buffer_prepare() 237 buf->vb.field = field; in vbi_buffer_prepare() 238 buf->vb.field = V4L2_FIELD_SEQ_TB; in vbi_buffer_prepare() [all …]
|
/drivers/iio/adc/ |
D | viperboard_adc.c | 37 struct vprbrd *vb; member 68 struct vprbrd *vb = adc->vb; in vprbrd_iio_read_raw() local 69 struct vprbrd_adc_msg *admsg = (struct vprbrd_adc_msg *)vb->buf; in vprbrd_iio_read_raw() 73 mutex_lock(&vb->lock); in vprbrd_iio_read_raw() 79 ret = usb_control_msg(vb->usb_dev, in vprbrd_iio_read_raw() 80 usb_sndctrlpipe(vb->usb_dev, 0), VPRBRD_USB_REQUEST_ADC, in vprbrd_iio_read_raw() 88 ret = usb_control_msg(vb->usb_dev, in vprbrd_iio_read_raw() 89 usb_rcvctrlpipe(vb->usb_dev, 0), VPRBRD_USB_REQUEST_ADC, in vprbrd_iio_read_raw() 95 mutex_unlock(&vb->lock); in vprbrd_iio_read_raw() 121 struct vprbrd *vb = dev_get_drvdata(pdev->dev.parent); in vprbrd_adc_probe() local [all …]
|