Home
last modified time | relevance | path

Searched refs:vq (Results 1 – 123 of 123) sorted by relevance

/linux-4.4.14/drivers/virtio/
Dvirtio_ring.c32 dev_err(&(_vq)->vq.vdev->dev, \
33 "%s:"fmt, (_vq)->vq.name, ##args); \
41 (_vq)->vq.name, (_vq)->in_use); \
49 dev_err(&_vq->vq.vdev->dev, \
50 "%s:"fmt, (_vq)->vq.name, ##args); \
53 #define START_USE(vq) argument
54 #define END_USE(vq) argument
58 struct virtqueue vq; member
90 bool (*notify)(struct virtqueue *vq);
105 #define to_vvq(_vq) container_of(_vq, struct vring_virtqueue, vq)
[all …]
Dvirtio_pci_common.c44 bool vp_notify(struct virtqueue *vq) in vp_notify() argument
48 iowrite16(vq->index, (void __iomem *)vq->priv); in vp_notify()
71 if (vring_interrupt(irq, info->vq) == IRQ_HANDLED) in vp_vring_interrupt()
226 void (*callback)(struct virtqueue *vq), in vp_setup_vq() argument
232 struct virtqueue *vq; in vp_setup_vq() local
239 vq = vp_dev->setup_vq(vp_dev, info, index, callback, name, msix_vec); in vp_setup_vq()
240 if (IS_ERR(vq)) in vp_setup_vq()
243 info->vq = vq; in vp_setup_vq()
253 return vq; in vp_setup_vq()
257 return vq; in vp_setup_vq()
[all …]
Dvirtio_pci_legacy.c117 void (*callback)(struct virtqueue *vq), in setup_vq() argument
121 struct virtqueue *vq; in setup_vq() local
147 vq = vring_new_virtqueue(index, info->num, in setup_vq()
150 if (!vq) { in setup_vq()
155 vq->priv = (void __force *)vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY; in setup_vq()
166 return vq; in setup_vq()
169 vring_del_virtqueue(vq); in setup_vq()
178 struct virtqueue *vq = info->vq; in del_vq() local
179 struct virtio_pci_device *vp_dev = to_vp_device(vq->vdev); in del_vq()
182 iowrite16(vq->index, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_SEL); in del_vq()
[all …]
Dvirtio_mmio.c100 struct virtqueue *vq; member
281 static bool vm_notify(struct virtqueue *vq) in vm_notify() argument
283 struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vq->vdev); in vm_notify()
287 writel(vq->index, vm_dev->base + VIRTIO_MMIO_QUEUE_NOTIFY); in vm_notify()
312 ret |= vring_interrupt(irq, info->vq); in vm_interrupt()
321 static void vm_del_vq(struct virtqueue *vq) in vm_del_vq() argument
323 struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vq->vdev); in vm_del_vq()
324 struct virtio_mmio_vq_info *info = vq->priv; in vm_del_vq()
326 unsigned int index = vq->index; in vm_del_vq()
332 vring_del_virtqueue(vq); in vm_del_vq()
[all …]
Dvirtio_pci_modern.c323 void (*callback)(struct virtqueue *vq), in setup_vq() argument
328 struct virtqueue *vq; in setup_vq() local
359 vq = vring_new_virtqueue(index, info->num, in setup_vq()
362 if (!vq) { in setup_vq()
371 vp_iowrite64_twopart(virt_to_phys(virtqueue_get_avail(vq)), in setup_vq()
373 vp_iowrite64_twopart(virt_to_phys(virtqueue_get_used(vq)), in setup_vq()
388 vq->priv = (void __force *)vp_dev->notify_base + in setup_vq()
391 vq->priv = (void __force *)map_capability(vp_dev->pci_dev, in setup_vq()
397 if (!vq->priv) { in setup_vq()
411 return vq; in setup_vq()
[all …]
Dvirtio_pci_common.h36 struct virtqueue *vq; member
110 void (*callback)(struct virtqueue *vq),
135 bool vp_notify(struct virtqueue *vq);
150 int vp_set_vq_affinity(struct virtqueue *vq, int cpu);
Dvirtio_balloon.c106 static void balloon_ack(struct virtqueue *vq) in balloon_ack() argument
108 struct virtio_balloon *vb = vq->vdev->priv; in balloon_ack()
113 static void tell_host(struct virtio_balloon *vb, struct virtqueue *vq) in tell_host() argument
121 virtqueue_add_outbuf(vq, &sg, 1, vb, GFP_KERNEL); in tell_host()
122 virtqueue_kick(vq); in tell_host()
125 wait_event(vb->acked, virtqueue_get_buf(vq, &len)); in tell_host()
256 static void stats_request(struct virtqueue *vq) in stats_request() argument
258 struct virtio_balloon *vb = vq->vdev->priv; in stats_request()
266 struct virtqueue *vq; in stats_handle_request() local
273 vq = vb->stats_vq; in stats_handle_request()
[all …]
Dvirtio_input.c30 static void virtinput_recv_events(struct virtqueue *vq) in virtinput_recv_events() argument
32 struct virtio_input *vi = vq->vdev->priv; in virtinput_recv_events()
48 virtqueue_kick(vq); in virtinput_recv_events()
88 static void virtinput_recv_status(struct virtqueue *vq) in virtinput_recv_status() argument
90 struct virtio_input *vi = vq->vdev->priv; in virtinput_recv_status()
/linux-4.4.14/drivers/vhost/
Dvhost.c42 #define vhost_used_event(vq) ((__virtio16 __user *)&vq->avail->ring[vq->num]) argument
43 #define vhost_avail_event(vq) ((__virtio16 __user *)&vq->used->ring[vq->num]) argument
46 static void vhost_vq_reset_user_be(struct vhost_virtqueue *vq) in vhost_vq_reset_user_be() argument
48 vq->user_be = !virtio_legacy_is_little_endian(); in vhost_vq_reset_user_be()
51 static long vhost_set_vring_endian(struct vhost_virtqueue *vq, int __user *argp) in vhost_set_vring_endian() argument
55 if (vq->private_data) in vhost_set_vring_endian()
65 vq->user_be = s.num; in vhost_set_vring_endian()
70 static long vhost_get_vring_endian(struct vhost_virtqueue *vq, u32 idx, in vhost_get_vring_endian() argument
75 .num = vq->user_be in vhost_get_vring_endian()
84 static void vhost_init_is_le(struct vhost_virtqueue *vq) in vhost_init_is_le() argument
[all …]
Dnet.c81 struct vhost_virtqueue *vq; member
85 struct vhost_virtqueue vq; member
116 static void vhost_net_enable_zcopy(int vq) in vhost_net_enable_zcopy() argument
118 vhost_net_zcopy_mask |= 0x1 << vq; in vhost_net_enable_zcopy()
122 vhost_net_ubuf_alloc(struct vhost_virtqueue *vq, bool zcopy) in vhost_net_ubuf_alloc() argument
133 ubufs->vq = vq; in vhost_net_ubuf_alloc()
239 struct vhost_virtqueue *vq) in vhost_zerocopy_signal_used() argument
242 container_of(vq, struct vhost_net_virtqueue, vq); in vhost_zerocopy_signal_used()
247 if (vq->heads[i].len == VHOST_DMA_FAILED_LEN) in vhost_zerocopy_signal_used()
249 if (VHOST_DMA_IS_DONE(vq->heads[i].len)) { in vhost_zerocopy_signal_used()
[all …]
Dtest.c40 struct vhost_virtqueue *vq = &n->vqs[VHOST_TEST_VQ]; in handle_vq() local
46 mutex_lock(&vq->mutex); in handle_vq()
47 private = vq->private_data; in handle_vq()
49 mutex_unlock(&vq->mutex); in handle_vq()
53 vhost_disable_notify(&n->dev, vq); in handle_vq()
56 head = vhost_get_vq_desc(vq, vq->iov, in handle_vq()
57 ARRAY_SIZE(vq->iov), in handle_vq()
64 if (head == vq->num) { in handle_vq()
65 if (unlikely(vhost_enable_notify(&n->dev, vq))) { in handle_vq()
66 vhost_disable_notify(&n->dev, vq); in handle_vq()
[all …]
Dvhost.h142 int vhost_vq_access_ok(struct vhost_virtqueue *vq);
163 int vhost_log_write(struct vhost_virtqueue *vq, struct vhost_log *log,
166 #define vq_err(vq, fmt, ...) do { \ argument
168 if ((vq)->error_ctx) \
169 eventfd_signal((vq)->error_ctx, 1);\
181 static inline bool vhost_has_feature(struct vhost_virtqueue *vq, int bit) in vhost_has_feature() argument
183 return vq->acked_features & (1ULL << bit); in vhost_has_feature()
187 static inline bool vhost_is_little_endian(struct vhost_virtqueue *vq) in vhost_is_little_endian() argument
189 return vq->is_le; in vhost_is_little_endian()
192 static inline bool vhost_is_little_endian(struct vhost_virtqueue *vq) in vhost_is_little_endian() argument
[all …]
Dscsi.c175 struct vhost_virtqueue vq; member
231 struct vhost_virtqueue *vq; in vhost_scsi_init_inflight() local
235 vq = &vs->vqs[i].vq; in vhost_scsi_init_inflight()
237 mutex_lock(&vq->mutex); in vhost_scsi_init_inflight()
250 mutex_unlock(&vq->mutex); in vhost_scsi_init_inflight()
255 vhost_scsi_get_inflight(struct vhost_virtqueue *vq) in vhost_scsi_get_inflight() argument
260 svq = container_of(vq, struct vhost_scsi_virtqueue, vq); in vhost_scsi_get_inflight()
418 struct vhost_virtqueue *vq = &vs->vqs[VHOST_SCSI_VQ_EVT].vq; in vhost_scsi_allocate_evt() local
428 vq_err(vq, "Failed to allocate vhost_scsi_evt\n"); in vhost_scsi_allocate_evt()
433 evt->event.event = cpu_to_vhost32(vq, event); in vhost_scsi_allocate_evt()
[all …]
/linux-4.4.14/include/linux/
Dvirtio.h29 void (*callback)(struct virtqueue *vq);
37 int virtqueue_add_outbuf(struct virtqueue *vq,
42 int virtqueue_add_inbuf(struct virtqueue *vq,
47 int virtqueue_add_sgs(struct virtqueue *vq,
54 bool virtqueue_kick(struct virtqueue *vq);
56 bool virtqueue_kick_prepare(struct virtqueue *vq);
58 bool virtqueue_notify(struct virtqueue *vq);
60 void *virtqueue_get_buf(struct virtqueue *vq, unsigned int *len);
62 void virtqueue_disable_cb(struct virtqueue *vq);
64 bool virtqueue_enable_cb(struct virtqueue *vq);
[all …]
Dvirtio_ring.h59 bool (*notify)(struct virtqueue *vq),
60 void (*callback)(struct virtqueue *vq),
62 void vring_del_virtqueue(struct virtqueue *vq);
Dvirtio_config.h78 int (*set_vq_affinity)(struct virtqueue *vq, int cpu);
158 struct virtqueue *vq; in virtio_find_single_vq() local
159 int err = vdev->config->find_vqs(vdev, 1, &vq, callbacks, names); in virtio_find_single_vq()
162 return vq; in virtio_find_single_vq()
200 int virtqueue_set_affinity(struct virtqueue *vq, int cpu) in virtqueue_set_affinity() argument
202 struct virtio_device *vdev = vq->vdev; in virtqueue_set_affinity()
204 return vdev->config->set_vq_affinity(vq, cpu); in virtqueue_set_affinity()
Dremoteproc.h467 struct virtqueue *vq; member
/linux-4.4.14/tools/lguest/
Dlguest.c173 struct virtqueue *vq; member
227 void (*service)(struct virtqueue *vq);
247 #define lg_last_avail(vq) ((vq)->last_avail_idx) argument
266 #define bad_driver_vq(vq, fmt, ...) \ argument
267 errx(1, "%s vq %s: bad driver: " fmt, (vq)->dev->name, \
268 vq->name, ## __VA_ARGS__)
686 static void trigger_irq(struct virtqueue *vq) in trigger_irq() argument
688 unsigned long buf[] = { LHREQ_IRQ, vq->dev->config.irq_line }; in trigger_irq()
691 if (!vq->pending_used) in trigger_irq()
693 vq->pending_used = 0; in trigger_irq()
[all …]
/linux-4.4.14/tools/virtio/linux/
Dvirtio.h15 void (*callback)(struct virtqueue *vq);
24 int virtqueue_add_sgs(struct virtqueue *vq,
31 int virtqueue_add_outbuf(struct virtqueue *vq,
36 int virtqueue_add_inbuf(struct virtqueue *vq,
41 bool virtqueue_kick(struct virtqueue *vq);
43 void *virtqueue_get_buf(struct virtqueue *vq, unsigned int *len);
45 void virtqueue_disable_cb(struct virtqueue *vq);
47 bool virtqueue_enable_cb(struct virtqueue *vq);
48 bool virtqueue_enable_cb_delayed(struct virtqueue *vq);
50 void *virtqueue_detach_unused_buf(struct virtqueue *vq);
[all …]
/linux-4.4.14/tools/virtio/
Dvirtio_test.c31 struct virtqueue *vq; member
45 bool vq_notify(struct virtqueue *vq) in vq_notify() argument
47 struct vq_info *info = vq->priv; in vq_notify()
55 void vq_callback(struct virtqueue *vq) in vq_callback() argument
101 info->vq = vring_new_virtqueue(info->idx, in vq_info_add()
105 assert(info->vq); in vq_info_add()
106 info->vq->priv = info; in vq_info_add()
153 static void run_test(struct vdev_info *dev, struct vq_info *vq, in run_test() argument
165 virtqueue_disable_cb(vq->vq); in run_test()
170 r = virtqueue_add_outbuf(vq->vq, &sl, 1, in run_test()
[all …]
Dvringh_test.c26 static bool never_notify_host(struct virtqueue *vq) in never_notify_host() argument
31 static void never_callback_guest(struct virtqueue *vq) in never_callback_guest() argument
69 static bool parallel_notify_host(struct virtqueue *vq) in parallel_notify_host() argument
74 gvdev = container_of(vq->vdev, struct guest_virtio_device, vdev); in parallel_notify_host()
82 static bool no_notify_host(struct virtqueue *vq) in no_notify_host() argument
293 struct virtqueue *vq; in parallel_test() local
316 vq = vring_new_virtqueue(0, RINGSIZE, ALIGN, &gvdev.vdev, true, in parallel_test()
332 while ((dbuf = virtqueue_get_buf(vq, &len)) != NULL) { in parallel_test()
378 err = virtqueue_add_outbuf(vq, sg, num_sg, dbuf, in parallel_test()
381 err = virtqueue_add_inbuf(vq, sg, num_sg, in parallel_test()
[all …]
/linux-4.4.14/drivers/remoteproc/
Dremoteproc_virtio.c33 static bool rproc_virtio_notify(struct virtqueue *vq) in rproc_virtio_notify() argument
35 struct rproc_vring *rvring = vq->priv; in rproc_virtio_notify()
64 if (!rvring || !rvring->vq) in rproc_vq_interrupt()
67 return vring_interrupt(0, rvring->vq); in rproc_vq_interrupt()
73 void (*callback)(struct virtqueue *vq), in rp_find_vq() argument
80 struct virtqueue *vq; in rp_find_vq() local
110 vq = vring_new_virtqueue(id, len, rvring->align, vdev, false, addr, in rp_find_vq()
112 if (!vq) { in rp_find_vq()
118 rvring->vq = vq; in rp_find_vq()
119 vq->priv = rvring; in rp_find_vq()
[all …]
/linux-4.4.14/drivers/s390/virtio/
Dkvm_virtio.c174 static bool kvm_notify(struct virtqueue *vq) in kvm_notify() argument
177 struct kvm_vqconfig *config = vq->priv; in kvm_notify()
191 void (*callback)(struct virtqueue *vq), in kvm_find_vq() argument
196 struct virtqueue *vq; in kvm_find_vq() local
213 vq = vring_new_virtqueue(index, config->num, KVM_S390_VIRTIO_RING_ALIGN, in kvm_find_vq()
216 if (!vq) { in kvm_find_vq()
225 config->token = (u64) vq; in kvm_find_vq()
227 vq->priv = config; in kvm_find_vq()
228 return vq; in kvm_find_vq()
237 static void kvm_del_vq(struct virtqueue *vq) in kvm_del_vq() argument
[all …]
Dvirtio_ccw.c111 struct virtqueue *vq; member
170 static void drop_airq_indicator(struct virtqueue *vq, struct airq_info *info) in drop_airq_indicator() argument
176 if (vq == (void *)airq_iv_get_ptr(info->aiv, i)) { in drop_airq_indicator()
286 drop_airq_indicator(info->vq, vcdev->airq_info); in virtio_ccw_drop_indicators()
395 static bool virtio_ccw_kvm_notify(struct virtqueue *vq) in virtio_ccw_kvm_notify() argument
397 struct virtio_ccw_vq_info *info = vq->priv; in virtio_ccw_kvm_notify()
401 vcdev = to_vc_device(info->vq->vdev); in virtio_ccw_kvm_notify()
403 info->cookie = do_kvm_notify(schid, vq->index, info->cookie); in virtio_ccw_kvm_notify()
425 static void virtio_ccw_del_vq(struct virtqueue *vq, struct ccw1 *ccw) in virtio_ccw_del_vq() argument
427 struct virtio_ccw_device *vcdev = to_vc_device(vq->vdev); in virtio_ccw_del_vq()
[all …]
/linux-4.4.14/drivers/media/v4l2-core/
Dv4l2-mem2mem.c359 struct vb2_queue *vq; in v4l2_m2m_reqbufs() local
362 vq = v4l2_m2m_get_vq(m2m_ctx, reqbufs->type); in v4l2_m2m_reqbufs()
363 ret = vb2_reqbufs(vq, reqbufs); in v4l2_m2m_reqbufs()
367 vq->owner = reqbufs->count ? file->private_data : NULL; in v4l2_m2m_reqbufs()
381 struct vb2_queue *vq; in v4l2_m2m_querybuf() local
385 vq = v4l2_m2m_get_vq(m2m_ctx, buf->type); in v4l2_m2m_querybuf()
386 ret = vb2_querybuf(vq, buf); in v4l2_m2m_querybuf()
389 if (buf->memory == V4L2_MEMORY_MMAP && !V4L2_TYPE_IS_OUTPUT(vq->type)) { in v4l2_m2m_querybuf()
390 if (V4L2_TYPE_IS_MULTIPLANAR(vq->type)) { in v4l2_m2m_querybuf()
410 struct vb2_queue *vq; in v4l2_m2m_qbuf() local
[all …]
Dvideobuf2-v4l2.c1647 void vb2_ops_wait_prepare(struct vb2_queue *vq) in vb2_ops_wait_prepare() argument
1649 mutex_unlock(vq->lock); in vb2_ops_wait_prepare()
1653 void vb2_ops_wait_finish(struct vb2_queue *vq) in vb2_ops_wait_finish() argument
1655 mutex_lock(vq->lock); in vb2_ops_wait_finish()
/linux-4.4.14/drivers/char/hw_random/
Dvirtio-rng.c32 struct virtqueue *vq; member
42 static void random_recv_done(struct virtqueue *vq) in random_recv_done() argument
44 struct virtrng_info *vi = vq->vdev->priv; in random_recv_done()
47 if (!virtqueue_get_buf(vi->vq, &vi->data_avail)) in random_recv_done()
61 virtqueue_add_inbuf(vi->vq, &sg, 1, buf, GFP_KERNEL); in register_buffer()
63 virtqueue_kick(vi->vq); in register_buffer()
127 vi->vq = virtio_find_single_vq(vdev, random_recv_done, "input"); in probe_common()
128 if (IS_ERR(vi->vq)) { in probe_common()
129 err = PTR_ERR(vi->vq); in probe_common()
/linux-4.4.14/drivers/scsi/
Dvirtio_scsi.c65 struct virtqueue *vq; member
222 struct virtqueue *vq = virtscsi_vq->vq; in virtscsi_vq_done() local
226 virtqueue_disable_cb(vq); in virtscsi_vq_done()
227 while ((buf = virtqueue_get_buf(vq, &len)) != NULL) in virtscsi_vq_done()
230 if (unlikely(virtqueue_is_broken(vq))) in virtscsi_vq_done()
232 } while (!virtqueue_enable_cb(vq)); in virtscsi_vq_done()
236 static void virtscsi_req_done(struct virtqueue *vq) in virtscsi_req_done() argument
238 struct Scsi_Host *sh = virtio_scsi_host(vq->vdev); in virtscsi_req_done()
240 int index = vq->index - VIRTIO_SCSI_VQ_BASE; in virtscsi_req_done()
264 static void virtscsi_ctrl_done(struct virtqueue *vq) in virtscsi_ctrl_done() argument
[all …]
/linux-4.4.14/drivers/misc/mic/card/
Dmic_virtio.c194 static bool mic_notify(struct virtqueue *vq) in mic_notify() argument
196 struct mic_vdev *mvdev = vq->priv; in mic_notify()
202 static void mic_del_vq(struct virtqueue *vq, int n) in mic_del_vq() argument
204 struct mic_vdev *mvdev = to_micvdev(vq->vdev); in mic_del_vq()
205 struct vring *vr = (struct vring *)(vq + 1); in mic_del_vq()
208 vring_del_virtqueue(vq); in mic_del_vq()
216 struct virtqueue *vq, *n; in mic_del_vqs() local
221 list_for_each_entry_safe(vq, n, &vdev->vqs, list) in mic_del_vqs()
222 mic_del_vq(vq, idx++); in mic_del_vqs()
232 void (*callback)(struct virtqueue *vq), in mic_find_vq() argument
[all …]
/linux-4.4.14/drivers/gpu/drm/virtio/
Dvirtgpu_vq.c61 void virtio_gpu_ctrl_ack(struct virtqueue *vq) in virtio_gpu_ctrl_ack() argument
63 struct drm_device *dev = vq->vdev->priv; in virtio_gpu_ctrl_ack()
68 void virtio_gpu_cursor_ack(struct virtqueue *vq) in virtio_gpu_cursor_ack() argument
70 struct drm_device *dev = vq->vdev->priv; in virtio_gpu_cursor_ack()
83 count += virtqueue_get_vring_size(vgdev->ctrlq.vq); in virtio_gpu_alloc_vbufs()
84 count += virtqueue_get_vring_size(vgdev->cursorq.vq); in virtio_gpu_alloc_vbufs()
107 count += virtqueue_get_vring_size(vgdev->ctrlq.vq); in virtio_gpu_free_vbufs()
108 count += virtqueue_get_vring_size(vgdev->cursorq.vq); in virtio_gpu_free_vbufs()
214 static void reclaim_vbufs(struct virtqueue *vq, struct list_head *reclaim_list) in reclaim_vbufs() argument
220 while ((vbuf = virtqueue_get_buf(vq, &len))) { in reclaim_vbufs()
[all …]
Dvirtgpu_drv.h143 struct virtqueue *vq; member
321 void virtio_gpu_ctrl_ack(struct virtqueue *vq);
322 void virtio_gpu_cursor_ack(struct virtqueue *vq);
323 void virtio_gpu_fence_ack(struct virtqueue *vq);
Dvirtgpu_kms.c179 vgdev->ctrlq.vq = vqs[0]; in virtio_gpu_driver_load()
180 vgdev->cursorq.vq = vqs[1]; in virtio_gpu_driver_load()
/linux-4.4.14/drivers/net/
Dvirtio_net.c68 struct virtqueue *vq; member
80 struct virtqueue *vq; member
164 static int vq2txq(struct virtqueue *vq) in vq2txq() argument
166 return (vq->index - 1) / 2; in vq2txq()
174 static int vq2rxq(struct virtqueue *vq) in vq2rxq() argument
176 return vq->index / 2; in vq2rxq()
216 static void skb_xmit_done(struct virtqueue *vq) in skb_xmit_done() argument
218 struct virtnet_info *vi = vq->vdev->priv; in skb_xmit_done()
221 virtqueue_disable_cb(vq); in skb_xmit_done()
224 netif_wake_subqueue(vi->dev, vq2txq(vq)); in skb_xmit_done()
[all …]
/linux-4.4.14/drivers/media/platform/vivid/
Dvivid-vbi-out.c30 static int vbi_out_queue_setup(struct vb2_queue *vq, const void *parg, in vbi_out_queue_setup() argument
34 struct vivid_dev *dev = vb2_get_drv_priv(vq); in vbi_out_queue_setup()
36 unsigned size = vq->type == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT ? in vbi_out_queue_setup()
45 if (vq->num_buffers + *nbuffers < 2) in vbi_out_queue_setup()
46 *nbuffers = 2 - vq->num_buffers; in vbi_out_queue_setup()
93 static int vbi_out_start_streaming(struct vb2_queue *vq, unsigned count) in vbi_out_start_streaming() argument
95 struct vivid_dev *dev = vb2_get_drv_priv(vq); in vbi_out_start_streaming()
119 static void vbi_out_stop_streaming(struct vb2_queue *vq) in vbi_out_stop_streaming() argument
121 struct vivid_dev *dev = vb2_get_drv_priv(vq); in vbi_out_stop_streaming()
Dvivid-vbi-cap.c140 static int vbi_cap_queue_setup(struct vb2_queue *vq, const void *parg, in vbi_cap_queue_setup() argument
144 struct vivid_dev *dev = vb2_get_drv_priv(vq); in vbi_cap_queue_setup()
146 unsigned size = vq->type == V4L2_BUF_TYPE_SLICED_VBI_CAPTURE ? in vbi_cap_queue_setup()
155 if (vq->num_buffers + *nbuffers < 2) in vbi_cap_queue_setup()
156 *nbuffers = 2 - vq->num_buffers; in vbi_cap_queue_setup()
203 static int vbi_cap_start_streaming(struct vb2_queue *vq, unsigned count) in vbi_cap_start_streaming() argument
205 struct vivid_dev *dev = vb2_get_drv_priv(vq); in vbi_cap_start_streaming()
229 static void vbi_cap_stop_streaming(struct vb2_queue *vq) in vbi_cap_stop_streaming() argument
231 struct vivid_dev *dev = vb2_get_drv_priv(vq); in vbi_cap_stop_streaming()
Dvivid-sdr-cap.c216 static int sdr_cap_queue_setup(struct vb2_queue *vq, const void *parg, in sdr_cap_queue_setup() argument
264 static int sdr_cap_start_streaming(struct vb2_queue *vq, unsigned count) in sdr_cap_start_streaming() argument
266 struct vivid_dev *dev = vb2_get_drv_priv(vq); in sdr_cap_start_streaming()
297 static void sdr_cap_stop_streaming(struct vb2_queue *vq) in sdr_cap_stop_streaming() argument
299 struct vivid_dev *dev = vb2_get_drv_priv(vq); in sdr_cap_stop_streaming()
Dvivid-vid-out.c34 static int vid_out_queue_setup(struct vb2_queue *vq, const void *parg, in vid_out_queue_setup() argument
39 struct vivid_dev *dev = vb2_get_drv_priv(vq); in vid_out_queue_setup()
54 if (vb2_fileio_is_active(vq)) in vid_out_queue_setup()
95 if (vq->num_buffers + *nbuffers < 2) in vid_out_queue_setup()
96 *nbuffers = 2 - vq->num_buffers; in vid_out_queue_setup()
168 static int vid_out_start_streaming(struct vb2_queue *vq, unsigned count) in vid_out_start_streaming() argument
170 struct vivid_dev *dev = vb2_get_drv_priv(vq); in vid_out_start_streaming()
200 static void vid_out_stop_streaming(struct vb2_queue *vq) in vid_out_stop_streaming() argument
202 struct vivid_dev *dev = vb2_get_drv_priv(vq); in vid_out_stop_streaming()
Dvivid-vid-cap.c98 static int vid_cap_queue_setup(struct vb2_queue *vq, const void *parg, in vid_cap_queue_setup() argument
103 struct vivid_dev *dev = vb2_get_drv_priv(vq); in vid_cap_queue_setup()
113 if (vb2_fileio_is_active(vq)) in vid_cap_queue_setup()
154 if (vq->num_buffers + *nbuffers < 2) in vid_cap_queue_setup()
155 *nbuffers = 2 - vq->num_buffers; in vid_cap_queue_setup()
247 static int vid_cap_start_streaming(struct vb2_queue *vq, unsigned count) in vid_cap_start_streaming() argument
249 struct vivid_dev *dev = vb2_get_drv_priv(vq); in vid_cap_start_streaming()
282 static void vid_cap_stop_streaming(struct vb2_queue *vq) in vid_cap_stop_streaming() argument
284 struct vivid_dev *dev = vb2_get_drv_priv(vq); in vid_cap_stop_streaming()
/linux-4.4.14/drivers/block/
Dvirtio_blk.c26 struct virtqueue *vq; member
74 static int __virtblk_add_req(struct virtqueue *vq, in __virtblk_add_req() argument
81 __virtio32 type = vbr->out_hdr.type & ~cpu_to_virtio32(vq->vdev, VIRTIO_BLK_T_OUT); in __virtblk_add_req()
92 if (type == cpu_to_virtio32(vq->vdev, VIRTIO_BLK_T_SCSI_CMD)) { in __virtblk_add_req()
98 if (vbr->out_hdr.type & cpu_to_virtio32(vq->vdev, VIRTIO_BLK_T_OUT)) in __virtblk_add_req()
104 if (type == cpu_to_virtio32(vq->vdev, VIRTIO_BLK_T_SCSI_CMD)) { in __virtblk_add_req()
114 return virtqueue_add_sgs(vq, sgs, num_out, num_in, vbr, GFP_ATOMIC); in __virtblk_add_req()
134 static void virtblk_done(struct virtqueue *vq) in virtblk_done() argument
136 struct virtio_blk *vblk = vq->vdev->priv; in virtblk_done()
138 int qid = vq->index; in virtblk_done()
[all …]
/linux-4.4.14/net/9p/
Dtrans_virtio.c84 struct virtqueue *vq; member
143 static void req_done(struct virtqueue *vq) in req_done() argument
145 struct virtio_chan *chan = vq->vdev->priv; in req_done()
155 rc = virtqueue_get_buf(chan->vq, &len); in req_done()
287 err = virtqueue_add_sgs(chan->vq, sgs, out_sgs, in_sgs, req->tc, in p9_virtio_request()
307 virtqueue_kick(chan->vq); in p9_virtio_request()
472 err = virtqueue_add_sgs(chan->vq, sgs, out_sgs, in_sgs, req->tc, in p9_virtio_zc_request()
493 virtqueue_kick(chan->vq); in p9_virtio_zc_request()
567 chan->vq = virtio_find_single_vq(vdev, req_done, "requests"); in p9_virtio_probe()
568 if (IS_ERR(chan->vq)) { in p9_virtio_probe()
[all …]
/linux-4.4.14/drivers/char/
Dvirtio_console.c324 struct virtqueue *vq) in find_port_by_vq() argument
331 if (port->in_vq == vq || port->out_vq == vq) in find_port_by_vq()
420 static struct port_buffer *alloc_buf(struct virtqueue *vq, size_t buf_size, in alloc_buf() argument
443 if (is_rproc_serial(vq->vdev)) { in alloc_buf()
453 if (!vq->vdev->dev.parent || !vq->vdev->dev.parent->parent) in alloc_buf()
455 buf->dev = vq->vdev->dev.parent->parent; in alloc_buf()
503 static int add_inbuf(struct virtqueue *vq, struct port_buffer *buf) in add_inbuf() argument
510 ret = virtqueue_add_inbuf(vq, sg, 1, buf, GFP_ATOMIC); in add_inbuf()
511 virtqueue_kick(vq); in add_inbuf()
513 ret = vq->num_free; in add_inbuf()
[all …]
/linux-4.4.14/include/media/
Dsoc_camera.h397 static inline struct soc_camera_device *soc_camera_from_vb2q(const struct vb2_queue *vq) in soc_camera_from_vb2q() argument
399 return container_of(vq, struct soc_camera_device, vb2_vidq); in soc_camera_from_vb2q()
402 static inline struct soc_camera_device *soc_camera_from_vbq(const struct videobuf_queue *vq) in soc_camera_from_vbq() argument
404 return container_of(vq, struct soc_camera_device, vb_vidq); in soc_camera_from_vbq()
412 void soc_camera_lock(struct vb2_queue *vq);
413 void soc_camera_unlock(struct vb2_queue *vq);
Dvideobuf2-v4l2.h146 void vb2_ops_wait_prepare(struct vb2_queue *vq);
147 void vb2_ops_wait_finish(struct vb2_queue *vq);
/linux-4.4.14/drivers/media/platform/marvell-ccic/
Dmcam-core.c1051 static int mcam_vb_queue_setup(struct vb2_queue *vq, in mcam_vb_queue_setup() argument
1057 struct mcam_camera *cam = vb2_get_drv_priv(vq); in mcam_vb_queue_setup()
1092 static void mcam_vb_requeue_bufs(struct vb2_queue *vq, in mcam_vb_requeue_bufs() argument
1095 struct mcam_camera *cam = vb2_get_drv_priv(vq); in mcam_vb_requeue_bufs()
1119 static int mcam_vb_start_streaming(struct vb2_queue *vq, unsigned int count) in mcam_vb_start_streaming() argument
1121 struct mcam_camera *cam = vb2_get_drv_priv(vq); in mcam_vb_start_streaming()
1126 mcam_vb_requeue_bufs(vq, VB2_BUF_STATE_QUEUED); in mcam_vb_start_streaming()
1154 mcam_vb_requeue_bufs(vq, VB2_BUF_STATE_QUEUED); in mcam_vb_start_streaming()
1158 static void mcam_vb_stop_streaming(struct vb2_queue *vq) in mcam_vb_stop_streaming() argument
1160 struct mcam_camera *cam = vb2_get_drv_priv(vq); in mcam_vb_stop_streaming()
[all …]
/linux-4.4.14/drivers/media/usb/em28xx/
Dem28xx-v4l.h17 int em28xx_start_analog_streaming(struct vb2_queue *vq, unsigned int count);
18 void em28xx_stop_vbi_streaming(struct vb2_queue *vq);
Dem28xx-vbi.c34 static int vbi_queue_setup(struct vb2_queue *vq, const void *parg, in vbi_queue_setup() argument
39 struct em28xx *dev = vb2_get_drv_priv(vq); in vbi_queue_setup()
Dem28xx-video.c874 static int queue_setup(struct vb2_queue *vq, const void *parg, in queue_setup() argument
879 struct em28xx *dev = vb2_get_drv_priv(vq); in queue_setup()
923 int em28xx_start_analog_streaming(struct vb2_queue *vq, unsigned int count) in em28xx_start_analog_streaming() argument
925 struct em28xx *dev = vb2_get_drv_priv(vq); in em28xx_start_analog_streaming()
935 rc = res_get(dev, vq->type); in em28xx_start_analog_streaming()
969 owner = (struct v4l2_fh *)vq->owner; in em28xx_start_analog_streaming()
983 static void em28xx_stop_streaming(struct vb2_queue *vq) in em28xx_stop_streaming() argument
985 struct em28xx *dev = vb2_get_drv_priv(vq); in em28xx_stop_streaming()
992 res_free(dev, vq->type); in em28xx_stop_streaming()
1015 void em28xx_stop_vbi_streaming(struct vb2_queue *vq) in em28xx_stop_vbi_streaming() argument
[all …]
/linux-4.4.14/drivers/media/usb/cx231xx/
Dcx231xx-vbi.c169 vbi_buffer_setup(struct videobuf_queue *vq, unsigned int *count, in vbi_buffer_setup() argument
172 struct cx231xx_fh *fh = vq->priv_data; in vbi_buffer_setup()
190 static void free_buffer(struct videobuf_queue *vq, struct cx231xx_buffer *buf) in free_buffer() argument
192 struct cx231xx_fh *fh = vq->priv_data; in free_buffer()
216 vbi_buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb, in vbi_buffer_prepare() argument
219 struct cx231xx_fh *fh = vq->priv_data; in vbi_buffer_prepare()
239 rc = videobuf_iolock(vq, &buf->vb, NULL); in vbi_buffer_prepare()
260 free_buffer(vq, buf); in vbi_buffer_prepare()
265 vbi_buffer_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb) in vbi_buffer_queue() argument
269 struct cx231xx_fh *fh = vq->priv_data; in vbi_buffer_queue()
[all …]
Dcx231xx-video.c727 buffer_setup(struct videobuf_queue *vq, unsigned int *count, unsigned int *size) in buffer_setup() argument
729 struct cx231xx_fh *fh = vq->priv_data; in buffer_setup()
746 static void free_buffer(struct videobuf_queue *vq, struct cx231xx_buffer *buf) in free_buffer() argument
748 struct cx231xx_fh *fh = vq->priv_data; in free_buffer()
778 buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb, in buffer_prepare() argument
781 struct cx231xx_fh *fh = vq->priv_data; in buffer_prepare()
798 rc = videobuf_iolock(vq, &buf->vb, NULL); in buffer_prepare()
834 free_buffer(vq, buf); in buffer_prepare()
838 static void buffer_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb) in buffer_queue() argument
842 struct cx231xx_fh *fh = vq->priv_data; in buffer_queue()
[all …]
Dcx231xx-417.c1246 static void free_buffer(struct videobuf_queue *vq, struct cx231xx_buffer *buf) in free_buffer() argument
1248 struct cx231xx_fh *fh = vq->priv_data; in free_buffer()
1263 videobuf_waiton(vq, &buf->vb, 0, 0); in free_buffer()
/linux-4.4.14/drivers/media/pci/saa7134/
Dsaa7134-empress.c44 static int start_streaming(struct vb2_queue *vq, unsigned int count) in start_streaming() argument
46 struct saa7134_dmaqueue *dmaq = vq->drv_priv; in start_streaming()
51 err = saa7134_ts_start_streaming(vq, count); in start_streaming()
72 static void stop_streaming(struct vb2_queue *vq) in stop_streaming() argument
74 struct saa7134_dmaqueue *dmaq = vq->drv_priv; in stop_streaming()
77 saa7134_ts_stop_streaming(vq); in stop_streaming()
Dsaa7134-ts.c139 int saa7134_ts_start_streaming(struct vb2_queue *vq, unsigned int count) in saa7134_ts_start_streaming() argument
141 struct saa7134_dmaqueue *dmaq = vq->drv_priv; in saa7134_ts_start_streaming()
168 void saa7134_ts_stop_streaming(struct vb2_queue *vq) in saa7134_ts_stop_streaming() argument
170 struct saa7134_dmaqueue *dmaq = vq->drv_priv; in saa7134_ts_stop_streaming()
Dsaa7134.h786 int saa7134_vb2_start_streaming(struct vb2_queue *vq, unsigned int count);
787 void saa7134_vb2_stop_streaming(struct vb2_queue *vq);
826 int saa7134_ts_start_streaming(struct vb2_queue *vq, unsigned int count);
827 void saa7134_ts_stop_streaming(struct vb2_queue *vq);
Dsaa7134-video.c944 int saa7134_vb2_start_streaming(struct vb2_queue *vq, unsigned int count) in saa7134_vb2_start_streaming() argument
946 struct saa7134_dmaqueue *dmaq = vq->drv_priv; in saa7134_vb2_start_streaming()
986 void saa7134_vb2_stop_streaming(struct vb2_queue *vq) in saa7134_vb2_stop_streaming() argument
988 struct saa7134_dmaqueue *dmaq = vq->drv_priv; in saa7134_vb2_stop_streaming()
/linux-4.4.14/drivers/media/usb/uvc/
Duvc_queue.c72 static int uvc_queue_setup(struct vb2_queue *vq, const void *parg, in uvc_queue_setup() argument
77 struct uvc_video_queue *queue = vb2_get_drv_priv(vq); in uvc_queue_setup()
151 static int uvc_start_streaming(struct vb2_queue *vq, unsigned int count) in uvc_start_streaming() argument
153 struct uvc_video_queue *queue = vb2_get_drv_priv(vq); in uvc_start_streaming()
171 static void uvc_stop_streaming(struct vb2_queue *vq) in uvc_stop_streaming() argument
173 struct uvc_video_queue *queue = vb2_get_drv_priv(vq); in uvc_stop_streaming()
/linux-4.4.14/drivers/media/platform/
Dtimblogiw.c474 static int buffer_setup(struct videobuf_queue *vq, unsigned int *count, in buffer_setup() argument
477 struct timblogiw_fh *fh = vq->priv_data; in buffer_setup()
490 static int buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb, in buffer_prepare() argument
493 struct timblogiw_fh *fh = vq->priv_data; in buffer_prepare()
517 err = videobuf_iolock(vq, vb, NULL); in buffer_prepare()
538 videobuf_dma_contig_free(vq, vb); in buffer_prepare()
543 static void buffer_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb) in buffer_queue() argument
545 struct timblogiw_fh *fh = vq->priv_data; in buffer_queue()
584 static void buffer_release(struct videobuf_queue *vq, in buffer_release() argument
587 struct timblogiw_fh *fh = vq->priv_data; in buffer_release()
[all …]
Dmx2_emmaprp.c454 struct vb2_queue *vq; in vidioc_g_fmt() local
457 vq = v4l2_m2m_get_vq(ctx->m2m_ctx, f->type); in vidioc_g_fmt()
458 if (!vq) in vidioc_g_fmt()
559 struct vb2_queue *vq; in vidioc_s_fmt() local
562 vq = v4l2_m2m_get_vq(ctx->m2m_ctx, f->type); in vidioc_s_fmt()
563 if (!vq) in vidioc_s_fmt()
570 if (vb2_is_busy(vq)) { in vidioc_s_fmt()
691 static int emmaprp_queue_setup(struct vb2_queue *vq, in emmaprp_queue_setup() argument
696 struct emmaprp_ctx *ctx = vb2_get_drv_priv(vq); in emmaprp_queue_setup()
700 q_data = get_q_data(ctx, vq->type); in emmaprp_queue_setup()
Dfsl-viu.c362 static int buffer_setup(struct videobuf_queue *vq, unsigned int *count, in buffer_setup() argument
365 struct viu_fh *fh = vq->priv_data; in buffer_setup()
378 static void free_buffer(struct videobuf_queue *vq, struct viu_buf *buf) in free_buffer() argument
385 videobuf_waiton(vq, &buf->vb, 0, 0); in free_buffer()
387 if (vq->int_ops && vq->int_ops->vaddr) in free_buffer()
388 vaddr = vq->int_ops->vaddr(vb); in free_buffer()
391 videobuf_dma_contig_free(vq, &buf->vb); in free_buffer()
445 static int buffer_prepare(struct videobuf_queue *vq, in buffer_prepare() argument
449 struct viu_fh *fh = vq->priv_data; in buffer_prepare()
473 rc = videobuf_iolock(vq, &buf->vb, NULL); in buffer_prepare()
[all …]
Dvim2m.c480 struct vb2_queue *vq; in vidioc_g_fmt() local
483 vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type); in vidioc_g_fmt()
484 if (!vq) in vidioc_g_fmt()
582 struct vb2_queue *vq; in vidioc_s_fmt() local
584 vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type); in vidioc_s_fmt()
585 if (!vq) in vidioc_s_fmt()
592 if (vb2_is_busy(vq)) { in vidioc_s_fmt()
712 static int vim2m_queue_setup(struct vb2_queue *vq, in vim2m_queue_setup() argument
718 struct vim2m_ctx *ctx = vb2_get_drv_priv(vq); in vim2m_queue_setup()
722 q_data = get_q_data(ctx, vq->type); in vim2m_queue_setup()
Drcar_jpu.c857 struct vb2_queue *vq; in jpu_s_fmt() local
864 vq = v4l2_m2m_get_vq(m2m_ctx, f->type); in jpu_s_fmt()
865 if (!vq) in jpu_s_fmt()
868 if (vb2_is_busy(vq)) { in jpu_s_fmt()
1017 static int jpu_queue_setup(struct vb2_queue *vq, in jpu_queue_setup() argument
1023 struct jpu_ctx *ctx = vb2_get_drv_priv(vq); in jpu_queue_setup()
1027 q_data = jpu_get_q_data(ctx, vq->type); in jpu_queue_setup()
1158 static int jpu_start_streaming(struct vb2_queue *vq, unsigned count) in jpu_start_streaming() argument
1160 struct jpu_ctx *ctx = vb2_get_drv_priv(vq); in jpu_start_streaming()
1161 struct jpu_q_data *q_data = jpu_get_q_data(ctx, vq->type); in jpu_start_streaming()
[all …]
Dm2m-deinterlace.c515 struct vb2_queue *vq; in vidioc_g_fmt() local
518 vq = v4l2_m2m_get_vq(ctx->m2m_ctx, f->type); in vidioc_g_fmt()
519 if (!vq) in vidioc_g_fmt()
613 struct vb2_queue *vq; in vidioc_s_fmt() local
615 vq = v4l2_m2m_get_vq(ctx->m2m_ctx, f->type); in vidioc_s_fmt()
616 if (!vq) in vidioc_s_fmt()
623 if (vb2_is_busy(vq)) { in vidioc_s_fmt()
800 static int deinterlace_queue_setup(struct vb2_queue *vq, in deinterlace_queue_setup() argument
805 struct deinterlace_ctx *ctx = vb2_get_drv_priv(vq); in deinterlace_queue_setup()
809 q_data = get_q_data(vq->type); in deinterlace_queue_setup()
Dsh_veu.c554 struct vb2_queue *vq; in sh_veu_s_fmt() local
559 vq = v4l2_m2m_get_vq(veu->m2m_ctx, f->type); in sh_veu_s_fmt()
560 if (!vq) in sh_veu_s_fmt()
563 if (vb2_is_busy(vq)) { in sh_veu_s_fmt()
867 static int sh_veu_queue_setup(struct vb2_queue *vq, in sh_veu_queue_setup() argument
873 struct sh_veu_dev *veu = vb2_get_drv_priv(vq); in sh_veu_queue_setup()
891 vfmt = sh_veu_get_vfmt(veu, vq->type); in sh_veu_queue_setup()
Dsh_vou.c246 static int sh_vou_queue_setup(struct vb2_queue *vq, const void *parg, in sh_vou_queue_setup() argument
251 struct sh_vou_device *vou_dev = vb2_get_drv_priv(vq); in sh_vou_queue_setup()
298 static int sh_vou_start_streaming(struct vb2_queue *vq, unsigned int count) in sh_vou_start_streaming() argument
300 struct sh_vou_device *vou_dev = vb2_get_drv_priv(vq); in sh_vou_start_streaming()
346 static void sh_vou_stop_streaming(struct vb2_queue *vq) in sh_vou_stop_streaming() argument
348 struct sh_vou_device *vou_dev = vb2_get_drv_priv(vq); in sh_vou_stop_streaming()
/linux-4.4.14/Documentation/video4linux/
Dv4l2-pci-skeleton.c166 static int queue_setup(struct vb2_queue *vq, const void *parg, in queue_setup() argument
171 struct skeleton *skel = vb2_get_drv_priv(vq); in queue_setup()
179 if (vb2_fileio_is_active(vq)) in queue_setup()
184 if (vq->num_buffers + *nbuffers < 3) in queue_setup()
185 *nbuffers = 3 - vq->num_buffers; in queue_setup()
251 static int start_streaming(struct vb2_queue *vq, unsigned int count) in start_streaming() argument
253 struct skeleton *skel = vb2_get_drv_priv(vq); in start_streaming()
274 static void stop_streaming(struct vb2_queue *vq) in stop_streaming() argument
276 struct skeleton *skel = vb2_get_drv_priv(vq); in stop_streaming()
/linux-4.4.14/drivers/media/platform/s5p-mfc/
Ds5p_mfc_dec.c890 static int s5p_mfc_queue_setup(struct vb2_queue *vq, in s5p_mfc_queue_setup() argument
895 struct s5p_mfc_ctx *ctx = fh_to_ctx(vq->drv_priv); in s5p_mfc_queue_setup()
901 vq->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) { in s5p_mfc_queue_setup()
911 vq->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { in s5p_mfc_queue_setup()
923 ctx->state, vq->type); in s5p_mfc_queue_setup()
929 vq->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { in s5p_mfc_queue_setup()
940 } else if (vq->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE && in s5p_mfc_queue_setup()
954 struct vb2_queue *vq = vb->vb2_queue; in s5p_mfc_buf_init() local
955 struct s5p_mfc_ctx *ctx = fh_to_ctx(vq->drv_priv); in s5p_mfc_buf_init()
958 if (vq->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { in s5p_mfc_buf_init()
[all …]
Ds5p_mfc_enc.c1820 static int s5p_mfc_queue_setup(struct vb2_queue *vq, in s5p_mfc_queue_setup() argument
1825 struct s5p_mfc_ctx *ctx = fh_to_ctx(vq->drv_priv); in s5p_mfc_queue_setup()
1828 if (vq->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { in s5p_mfc_queue_setup()
1844 } else if (vq->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) { in s5p_mfc_queue_setup()
1870 mfc_err("invalid queue type: %d\n", vq->type); in s5p_mfc_queue_setup()
1879 struct vb2_queue *vq = vb->vb2_queue; in s5p_mfc_buf_init() local
1880 struct s5p_mfc_ctx *ctx = fh_to_ctx(vq->drv_priv); in s5p_mfc_buf_init()
1884 if (vq->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { in s5p_mfc_buf_init()
1893 } else if (vq->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) { in s5p_mfc_buf_init()
1905 mfc_err("invalid queue type: %d\n", vq->type); in s5p_mfc_buf_init()
[all …]
Ds5p_mfc_opr.h300 struct vb2_queue *vq);
Ds5p_mfc_opr_v5.c1476 static void s5p_mfc_cleanup_queue_v5(struct list_head *lh, struct vb2_queue *vq) in s5p_mfc_cleanup_queue_v5() argument
Ds5p_mfc_opr_v6.c1850 static void s5p_mfc_cleanup_queue_v6(struct list_head *lh, struct vb2_queue *vq) in s5p_mfc_cleanup_queue_v6() argument
/linux-4.4.14/drivers/media/usb/au0828/
Dau0828-vbi.c33 static int vbi_queue_setup(struct vb2_queue *vq, const void *parg, in vbi_queue_setup() argument
38 struct au0828_dev *dev = vb2_get_drv_priv(vq); in vbi_queue_setup()
Dau0828.h318 extern int au0828_start_analog_streaming(struct vb2_queue *vq,
320 extern void au0828_stop_vbi_streaming(struct vb2_queue *vq);
Dau0828-video.c640 static int queue_setup(struct vb2_queue *vq, const void *parg, in queue_setup() argument
645 struct au0828_dev *dev = vb2_get_drv_priv(vq); in queue_setup()
778 int au0828_start_analog_streaming(struct vb2_queue *vq, unsigned int count) in au0828_start_analog_streaming() argument
780 struct au0828_dev *dev = vb2_get_drv_priv(vq); in au0828_start_analog_streaming()
786 if (vq->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) in au0828_start_analog_streaming()
802 if (vq->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) { in au0828_start_analog_streaming()
807 } else if (vq->type == V4L2_BUF_TYPE_VBI_CAPTURE) { in au0828_start_analog_streaming()
816 static void au0828_stop_streaming(struct vb2_queue *vq) in au0828_stop_streaming() argument
818 struct au0828_dev *dev = vb2_get_drv_priv(vq); in au0828_stop_streaming()
847 void au0828_stop_vbi_streaming(struct vb2_queue *vq) in au0828_stop_vbi_streaming() argument
[all …]
/linux-4.4.14/drivers/media/usb/hackrf/
Dhackrf.c736 static void hackrf_return_all_buffers(struct vb2_queue *vq, in hackrf_return_all_buffers() argument
739 struct hackrf_dev *dev = vb2_get_drv_priv(vq); in hackrf_return_all_buffers()
747 if (vq->type == V4L2_BUF_TYPE_SDR_CAPTURE) in hackrf_return_all_buffers()
761 static int hackrf_queue_setup(struct vb2_queue *vq, in hackrf_queue_setup() argument
765 struct hackrf_dev *dev = vb2_get_drv_priv(vq); in hackrf_queue_setup()
770 if (vq->num_buffers + *nbuffers < 8) in hackrf_queue_setup()
771 *nbuffers = 8 - vq->num_buffers; in hackrf_queue_setup()
782 struct vb2_queue *vq = vb->vb2_queue; in hackrf_buf_queue() local
783 struct hackrf_dev *dev = vb2_get_drv_priv(vq); in hackrf_buf_queue()
790 if (vq->type == V4L2_BUF_TYPE_SDR_CAPTURE) in hackrf_buf_queue()
[all …]
/linux-4.4.14/drivers/media/usb/usbtv/
Dusbtv-video.c601 static int usbtv_queue_setup(struct vb2_queue *vq, in usbtv_queue_setup() argument
606 struct usbtv *usbtv = vb2_get_drv_priv(vq); in usbtv_queue_setup()
609 if (vq->num_buffers + *nbuffers < 2) in usbtv_queue_setup()
610 *nbuffers = 2 - vq->num_buffers; in usbtv_queue_setup()
636 static int usbtv_start_streaming(struct vb2_queue *vq, unsigned int count) in usbtv_start_streaming() argument
638 struct usbtv *usbtv = vb2_get_drv_priv(vq); in usbtv_start_streaming()
647 static void usbtv_stop_streaming(struct vb2_queue *vq) in usbtv_stop_streaming() argument
649 struct usbtv *usbtv = vb2_get_drv_priv(vq); in usbtv_stop_streaming()
/linux-4.4.14/drivers/media/platform/s5p-g2d/
Dg2d.c104 static int g2d_queue_setup(struct vb2_queue *vq, const void *parg, in g2d_queue_setup() argument
108 struct g2d_ctx *ctx = vb2_get_drv_priv(vq); in g2d_queue_setup()
109 struct g2d_frame *f = get_frame(ctx, vq->type); in g2d_queue_setup()
319 struct vb2_queue *vq; in vidioc_g_fmt() local
322 vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type); in vidioc_g_fmt()
323 if (!vq) in vidioc_g_fmt()
372 struct vb2_queue *vq; in vidioc_s_fmt() local
382 vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type); in vidioc_s_fmt()
383 if (vb2_is_busy(vq)) { in vidioc_s_fmt()
/linux-4.4.14/drivers/media/platform/soc_camera/
Drcar_vin.c529 static int rcar_vin_videobuf_setup(struct vb2_queue *vq, in rcar_vin_videobuf_setup() argument
536 struct soc_camera_device *icd = soc_camera_from_vb2q(vq); in rcar_vin_videobuf_setup()
572 if (!vq->num_buffers) in rcar_vin_videobuf_setup()
847 static void rcar_vin_stop_streaming(struct vb2_queue *vq) in rcar_vin_stop_streaming() argument
849 struct soc_camera_device *icd = soc_camera_from_vb2q(vq); in rcar_vin_stop_streaming()
1810 static int rcar_vin_init_videobuf2(struct vb2_queue *vq, in rcar_vin_init_videobuf2() argument
1815 vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; in rcar_vin_init_videobuf2()
1816 vq->io_modes = VB2_MMAP | VB2_USERPTR; in rcar_vin_init_videobuf2()
1817 vq->drv_priv = icd; in rcar_vin_init_videobuf2()
1818 vq->ops = &rcar_vin_vb2_ops; in rcar_vin_init_videobuf2()
[all …]
Domap1_camera.c205 static int omap1_videobuf_setup(struct videobuf_queue *vq, unsigned int *count, in omap1_videobuf_setup() argument
208 struct soc_camera_device *icd = vq->priv_data; in omap1_videobuf_setup()
226 static void free_buffer(struct videobuf_queue *vq, struct omap1_cam_buf *buf, in free_buffer() argument
233 videobuf_waiton(vq, vb, 0, 0); in free_buffer()
236 videobuf_dma_contig_free(vq, vb); in free_buffer()
238 struct soc_camera_device *icd = vq->priv_data; in free_buffer()
249 static int omap1_videobuf_prepare(struct videobuf_queue *vq, in omap1_videobuf_prepare() argument
252 struct soc_camera_device *icd = vq->priv_data; in omap1_videobuf_prepare()
282 ret = videobuf_iolock(vq, vb, NULL); in omap1_videobuf_prepare()
292 free_buffer(vq, buf, pcdev->vb_mode); in omap1_videobuf_prepare()
[all …]
Dpxa_camera.c241 static int pxa_videobuf_setup(struct videobuf_queue *vq, unsigned int *count, in pxa_videobuf_setup() argument
244 struct soc_camera_device *icd = vq->priv_data; in pxa_videobuf_setup()
258 static void free_buffer(struct videobuf_queue *vq, struct pxa_buffer *buf) in free_buffer() argument
260 struct soc_camera_device *icd = vq->priv_data; in free_buffer()
274 videobuf_waiton(vq, &buf->vb, 0, 0); in free_buffer()
275 videobuf_dma_unmap(vq->dev, dma); in free_buffer()
424 static int pxa_videobuf_prepare(struct videobuf_queue *vq, in pxa_videobuf_prepare() argument
427 struct soc_camera_device *icd = vq->priv_data; in pxa_videobuf_prepare()
480 ret = videobuf_iolock(vq, vb, NULL); in pxa_videobuf_prepare()
534 free_buffer(vq, buf); in pxa_videobuf_prepare()
[all …]
Datmel-isi.c248 static int queue_setup(struct vb2_queue *vq, const void *parg, in queue_setup() argument
252 struct soc_camera_device *icd = soc_camera_from_vb2q(vq); in queue_setup()
394 static int start_streaming(struct vb2_queue *vq, unsigned int count) in start_streaming() argument
396 struct soc_camera_device *icd = soc_camera_from_vb2q(vq); in start_streaming()
428 static void stop_streaming(struct vb2_queue *vq) in stop_streaming() argument
430 struct soc_camera_device *icd = soc_camera_from_vb2q(vq); in stop_streaming()
Dmx3_camera.c187 static int mx3_videobuf_setup(struct vb2_queue *vq, in mx3_videobuf_setup() argument
193 struct soc_camera_device *icd = soc_camera_from_vb2q(vq); in mx3_videobuf_setup()
229 if (!vq->num_buffers) in mx3_videobuf_setup()
Dsh_mobile_ceu_camera.c212 static int sh_mobile_ceu_videobuf_setup(struct vb2_queue *vq, in sh_mobile_ceu_videobuf_setup() argument
218 struct soc_camera_device *icd = container_of(vq, in sh_mobile_ceu_videobuf_setup()
252 if (!vq->num_buffers) in sh_mobile_ceu_videobuf_setup()
Dmx2_camera.c471 static int mx2_videobuf_setup(struct vb2_queue *vq, in mx2_videobuf_setup() argument
477 struct soc_camera_device *icd = soc_camera_from_vb2q(vq); in mx2_videobuf_setup()
/linux-4.4.14/drivers/media/platform/xilinx/
Dxilinx-dma.c312 xvip_dma_queue_setup(struct vb2_queue *vq, const void *parg, in xvip_dma_queue_setup() argument
317 struct xvip_dma *dma = vb2_get_drv_priv(vq); in xvip_dma_queue_setup()
389 static int xvip_dma_start_streaming(struct vb2_queue *vq, unsigned int count) in xvip_dma_start_streaming() argument
391 struct xvip_dma *dma = vb2_get_drv_priv(vq); in xvip_dma_start_streaming()
448 static void xvip_dma_stop_streaming(struct vb2_queue *vq) in xvip_dma_stop_streaming() argument
450 struct xvip_dma *dma = vb2_get_drv_priv(vq); in xvip_dma_stop_streaming()
/linux-4.4.14/drivers/media/usb/stk1160/
Dstk1160-v4l.c667 static int queue_setup(struct vb2_queue *vq, const void *parg, in queue_setup() argument
671 struct stk1160 *dev = vb2_get_drv_priv(vq); in queue_setup()
729 static int start_streaming(struct vb2_queue *vq, unsigned int count) in start_streaming() argument
731 struct stk1160 *dev = vb2_get_drv_priv(vq); in start_streaming()
736 static void stop_streaming(struct vb2_queue *vq) in stop_streaming() argument
738 struct stk1160 *dev = vb2_get_drv_priv(vq); in stop_streaming()
/linux-4.4.14/drivers/media/usb/zr364xx/
Dzr364xx.c360 static int buffer_setup(struct videobuf_queue *vq, unsigned int *count, in buffer_setup() argument
363 struct zr364xx_camera *cam = vq->priv_data; in buffer_setup()
376 static void free_buffer(struct videobuf_queue *vq, struct zr364xx_buffer *buf) in free_buffer() argument
386 static int buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb, in buffer_prepare() argument
389 struct zr364xx_camera *cam = vq->priv_data; in buffer_prepare()
412 rc = videobuf_iolock(vq, &buf->vb, NULL); in buffer_prepare()
420 free_buffer(vq, buf); in buffer_prepare()
424 static void buffer_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb) in buffer_queue() argument
428 struct zr364xx_camera *cam = vq->priv_data; in buffer_queue()
436 static void buffer_release(struct videobuf_queue *vq, in buffer_release() argument
[all …]
/linux-4.4.14/drivers/media/usb/airspy/
Dairspy.c490 static int airspy_queue_setup(struct vb2_queue *vq, in airspy_queue_setup() argument
494 struct airspy *s = vb2_get_drv_priv(vq); in airspy_queue_setup()
499 if (vq->num_buffers + *nbuffers < 8) in airspy_queue_setup()
500 *nbuffers = 8 - vq->num_buffers; in airspy_queue_setup()
527 static int airspy_start_streaming(struct vb2_queue *vq, unsigned int count) in airspy_start_streaming() argument
529 struct airspy *s = vb2_get_drv_priv(vq); in airspy_start_streaming()
588 static void airspy_stop_streaming(struct vb2_queue *vq) in airspy_stop_streaming() argument
590 struct airspy *s = vb2_get_drv_priv(vq); in airspy_stop_streaming()
/linux-4.4.14/drivers/media/usb/tm6000/
Dtm6000-video.c694 buffer_setup(struct videobuf_queue *vq, unsigned int *count, unsigned int *size) in buffer_setup() argument
696 struct tm6000_fh *fh = vq->priv_data; in buffer_setup()
711 static void free_buffer(struct videobuf_queue *vq, struct tm6000_buffer *buf) in free_buffer() argument
713 struct tm6000_fh *fh = vq->priv_data; in free_buffer()
738 buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb, in buffer_prepare() argument
741 struct tm6000_fh *fh = vq->priv_data; in buffer_prepare()
767 rc = videobuf_iolock(vq, &buf->vb, NULL); in buffer_prepare()
787 free_buffer(vq, buf); in buffer_prepare()
792 buffer_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb) in buffer_queue() argument
795 struct tm6000_fh *fh = vq->priv_data; in buffer_queue()
[all …]
/linux-4.4.14/drivers/media/platform/coda/
Dcoda-common.c567 struct vb2_queue *vq; in coda_s_fmt() local
569 vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type); in coda_s_fmt()
570 if (!vq) in coda_s_fmt()
577 if (vb2_is_busy(vq)) { in coda_s_fmt()
1134 static int coda_queue_setup(struct vb2_queue *vq, const void *parg, in coda_queue_setup() argument
1138 struct coda_ctx *ctx = vb2_get_drv_priv(vq); in coda_queue_setup()
1142 q_data = get_q_data(ctx, vq->type); in coda_queue_setup()
1179 struct vb2_queue *vq = vb->vb2_queue; in coda_buf_queue() local
1188 if (ctx->bitstream.size && vq->type == V4L2_BUF_TYPE_VIDEO_OUTPUT) { in coda_buf_queue()
1589 static int coda_queue_init(struct coda_ctx *ctx, struct vb2_queue *vq) in coda_queue_init() argument
[all …]
/linux-4.4.14/drivers/media/platform/blackfin/
Dbfin_capture.c204 static int bcap_queue_setup(struct vb2_queue *vq, in bcap_queue_setup() argument
210 struct bcap_device *bcap_dev = vb2_get_drv_priv(vq); in bcap_queue_setup()
215 if (vq->num_buffers + *nbuffers < 2) in bcap_queue_setup()
267 static int bcap_start_streaming(struct vb2_queue *vq, unsigned int count) in bcap_start_streaming() argument
269 struct bcap_device *bcap_dev = vb2_get_drv_priv(vq); in bcap_start_streaming()
358 static void bcap_stop_streaming(struct vb2_queue *vq) in bcap_stop_streaming() argument
360 struct bcap_device *bcap_dev = vb2_get_drv_priv(vq); in bcap_stop_streaming()
/linux-4.4.14/drivers/media/usb/pwc/
Dpwc-if.c575 static int queue_setup(struct vb2_queue *vq, const void *parg, in queue_setup() argument
579 struct pwc_device *pdev = vb2_get_drv_priv(vq); in queue_setup()
667 static int start_streaming(struct vb2_queue *vq, unsigned int count) in start_streaming() argument
669 struct pwc_device *pdev = vb2_get_drv_priv(vq); in start_streaming()
694 static void stop_streaming(struct vb2_queue *vq) in stop_streaming() argument
696 struct pwc_device *pdev = vb2_get_drv_priv(vq); in stop_streaming()
/linux-4.4.14/drivers/media/platform/exynos-gsc/
Dgsc-m2m.c214 static int gsc_m2m_queue_setup(struct vb2_queue *vq, in gsc_m2m_queue_setup() argument
219 struct gsc_ctx *ctx = vb2_get_drv_priv(vq); in gsc_m2m_queue_setup()
223 frame = ctx_get_frame(ctx, vq->type); in gsc_m2m_queue_setup()
319 struct vb2_queue *vq; in gsc_m2m_s_fmt_mplane() local
328 vq = v4l2_m2m_get_vq(ctx->m2m_ctx, f->type); in gsc_m2m_s_fmt_mplane()
330 if (vb2_is_streaming(vq)) { in gsc_m2m_s_fmt_mplane()
/linux-4.4.14/drivers/media/platform/exynos4-is/
Dfimc-m2m.c179 static int fimc_queue_setup(struct vb2_queue *vq, const void *parg, in fimc_queue_setup() argument
183 struct fimc_ctx *ctx = vb2_get_drv_priv(vq); in fimc_queue_setup()
187 f = ctx_get_frame(ctx, vq->type); in fimc_queue_setup()
367 struct vb2_queue *vq; in fimc_m2m_s_fmt_mplane() local
375 vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type); in fimc_m2m_s_fmt_mplane()
377 if (vb2_is_busy(vq)) { in fimc_m2m_s_fmt_mplane()
Dfimc-isp-video.c41 static int isp_video_capture_queue_setup(struct vb2_queue *vq, in isp_video_capture_queue_setup() argument
47 struct fimc_isp *isp = vb2_get_drv_priv(vq); in isp_video_capture_queue_setup()
Dfimc-lite.c358 static int queue_setup(struct vb2_queue *vq, const void *parg, in queue_setup() argument
364 struct fimc_lite *fimc = vq->drv_priv; in queue_setup()
397 struct vb2_queue *vq = vb->vb2_queue; in buffer_prepare() local
398 struct fimc_lite *fimc = vq->drv_priv; in buffer_prepare()
Dfimc-capture.c341 static int queue_setup(struct vb2_queue *vq, const void *parg, in queue_setup() argument
347 struct fimc_ctx *ctx = vq->drv_priv; in queue_setup()
384 struct vb2_queue *vq = vb->vb2_queue; in buffer_prepare() local
385 struct fimc_ctx *ctx = vq->drv_priv; in buffer_prepare()
/linux-4.4.14/drivers/media/platform/davinci/
Dvpbe_display.c231 vpbe_buffer_queue_setup(struct vb2_queue *vq, const void *parg, in vpbe_buffer_queue_setup() argument
238 struct vpbe_layer *layer = vb2_get_drv_priv(vq); in vpbe_buffer_queue_setup()
247 if (vq->num_buffers + *nbuffers < VPBE_DEFAULT_NUM_BUFS) in vpbe_buffer_queue_setup()
248 *nbuffers = VPBE_DEFAULT_NUM_BUFS - vq->num_buffers; in vpbe_buffer_queue_setup()
281 static int vpbe_start_streaming(struct vb2_queue *vq, unsigned int count) in vpbe_start_streaming() argument
283 struct vpbe_layer *layer = vb2_get_drv_priv(vq); in vpbe_start_streaming()
324 static void vpbe_stop_streaming(struct vb2_queue *vq) in vpbe_stop_streaming() argument
326 struct vpbe_layer *layer = vb2_get_drv_priv(vq); in vpbe_stop_streaming()
331 if (!vb2_is_streaming(vq)) in vpbe_stop_streaming()
Dvpif_display.c111 static int vpif_buffer_queue_setup(struct vb2_queue *vq, in vpif_buffer_queue_setup() argument
117 struct channel_obj *ch = vb2_get_drv_priv(vq); in vpif_buffer_queue_setup()
123 if (vq->num_buffers + *nbuffers < 3) in vpif_buffer_queue_setup()
124 *nbuffers = 3 - vq->num_buffers; in vpif_buffer_queue_setup()
163 static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count) in vpif_start_streaming() argument
167 struct channel_obj *ch = vb2_get_drv_priv(vq); in vpif_start_streaming()
250 static void vpif_stop_streaming(struct vb2_queue *vq) in vpif_stop_streaming() argument
252 struct channel_obj *ch = vb2_get_drv_priv(vq); in vpif_stop_streaming()
Dvpfe_capture.c1245 static int vpfe_videobuf_setup(struct videobuf_queue *vq, in vpfe_videobuf_setup() argument
1249 struct vpfe_fh *fh = vq->priv_data; in vpfe_videobuf_setup()
1265 static int vpfe_videobuf_prepare(struct videobuf_queue *vq, in vpfe_videobuf_prepare() argument
1269 struct vpfe_fh *fh = vq->priv_data; in vpfe_videobuf_prepare()
1283 ret = videobuf_iolock(vq, vb, NULL); in vpfe_videobuf_prepare()
1297 static void vpfe_videobuf_queue(struct videobuf_queue *vq, in vpfe_videobuf_queue() argument
1301 struct vpfe_fh *fh = vq->priv_data; in vpfe_videobuf_queue()
1316 static void vpfe_videobuf_release(struct videobuf_queue *vq, in vpfe_videobuf_release() argument
1319 struct vpfe_fh *fh = vq->priv_data; in vpfe_videobuf_release()
1332 videobuf_dma_contig_free(vq, vb); in vpfe_videobuf_release()
Dvpif_capture.c116 static int vpif_buffer_queue_setup(struct vb2_queue *vq, in vpif_buffer_queue_setup() argument
122 struct channel_obj *ch = vb2_get_drv_priv(vq); in vpif_buffer_queue_setup()
132 if (vq->num_buffers + *nbuffers < 3) in vpif_buffer_queue_setup()
133 *nbuffers = 3 - vq->num_buffers; in vpif_buffer_queue_setup()
172 static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count) in vpif_start_streaming() argument
176 struct channel_obj *ch = vb2_get_drv_priv(vq); in vpif_start_streaming()
264 static void vpif_stop_streaming(struct vb2_queue *vq) in vpif_stop_streaming() argument
266 struct channel_obj *ch = vb2_get_drv_priv(vq); in vpif_stop_streaming()
/linux-4.4.14/drivers/media/pci/tw68/
Dtw68-video.c428 struct vb2_queue *vq = vb->vb2_queue; in tw68_buf_queue() local
429 struct tw68_dev *dev = vb2_get_drv_priv(vq); in tw68_buf_queue()
463 struct vb2_queue *vq = vb->vb2_queue; in tw68_buf_prepare() local
464 struct tw68_dev *dev = vb2_get_drv_priv(vq); in tw68_buf_prepare()
506 struct vb2_queue *vq = vb->vb2_queue; in tw68_buf_finish() local
507 struct tw68_dev *dev = vb2_get_drv_priv(vq); in tw68_buf_finish()
/linux-4.4.14/drivers/staging/media/davinci_vpfe/
Dvpfe_video.c1081 vpfe_buffer_queue_setup(struct vb2_queue *vq, const void *parg, in vpfe_buffer_queue_setup() argument
1085 struct vpfe_fh *fh = vb2_get_drv_priv(vq); in vpfe_buffer_queue_setup()
1093 if (vq->num_buffers + *nbuffers < 3) in vpfe_buffer_queue_setup()
1094 *nbuffers = 3 - vq->num_buffers; in vpfe_buffer_queue_setup()
1189 static int vpfe_start_streaming(struct vb2_queue *vq, unsigned int count) in vpfe_start_streaming() argument
1191 struct vpfe_fh *fh = vb2_get_drv_priv(vq); in vpfe_start_streaming()
1249 static void vpfe_stop_streaming(struct vb2_queue *vq) in vpfe_stop_streaming() argument
1251 struct vpfe_fh *fh = vb2_get_drv_priv(vq); in vpfe_stop_streaming()
/linux-4.4.14/drivers/usb/gadget/function/
Duvc_queue.c44 static int uvc_queue_setup(struct vb2_queue *vq, const void *parg, in uvc_queue_setup() argument
48 struct uvc_video_queue *queue = vb2_get_drv_priv(vq); in uvc_queue_setup()
/linux-4.4.14/drivers/media/platform/s5p-tv/
Dmixer_video.c884 static int queue_setup(struct vb2_queue *vq, const void *parg, in queue_setup() argument
888 struct mxr_layer *layer = vb2_get_drv_priv(vq); in queue_setup()
930 static int start_streaming(struct vb2_queue *vq, unsigned int count) in start_streaming() argument
932 struct mxr_layer *layer = vb2_get_drv_priv(vq); in start_streaming()
979 static void stop_streaming(struct vb2_queue *vq) in stop_streaming() argument
981 struct mxr_layer *layer = vb2_get_drv_priv(vq); in stop_streaming()
1008 vb2_wait_for_all_buffers(vq); in stop_streaming()
/linux-4.4.14/drivers/media/pci/sta2x11/
Dsta2x11_vip.c268 static int queue_setup(struct vb2_queue *vq, const void *parg, in queue_setup() argument
272 struct sta2x11_vip *vip = vb2_get_drv_priv(vq); in queue_setup()
348 static int start_streaming(struct vb2_queue *vq, unsigned int count) in start_streaming() argument
350 struct sta2x11_vip *vip = vb2_get_drv_priv(vq); in start_streaming()
364 static void stop_streaming(struct vb2_queue *vq) in stop_streaming() argument
366 struct sta2x11_vip *vip = vb2_get_drv_priv(vq); in stop_streaming()
/linux-4.4.14/drivers/media/pci/dt3155/
Ddt3155.c134 dt3155_queue_setup(struct vb2_queue *vq, const void *parg, in dt3155_queue_setup() argument
140 struct dt3155_priv *pd = vb2_get_drv_priv(vq); in dt3155_queue_setup()
143 if (vq->num_buffers + *nbuffers < 2) in dt3155_queue_setup()
144 *nbuffers = 2 - vq->num_buffers; in dt3155_queue_setup()
/linux-4.4.14/drivers/media/usb/msi2500/
Dmsi2500.c618 static int msi2500_queue_setup(struct vb2_queue *vq, in msi2500_queue_setup() argument
624 struct msi2500_dev *dev = vb2_get_drv_priv(vq); in msi2500_queue_setup()
849 static int msi2500_start_streaming(struct vb2_queue *vq, unsigned int count) in msi2500_start_streaming() argument
851 struct msi2500_dev *dev = vb2_get_drv_priv(vq); in msi2500_start_streaming()
878 static void msi2500_stop_streaming(struct vb2_queue *vq) in msi2500_stop_streaming() argument
880 struct msi2500_dev *dev = vb2_get_drv_priv(vq); in msi2500_stop_streaming()
/linux-4.4.14/drivers/input/touchscreen/
Dsur40.c718 static int sur40_start_streaming(struct vb2_queue *vq, unsigned int count) in sur40_start_streaming() argument
720 struct sur40_state *sur40 = vb2_get_drv_priv(vq); in sur40_start_streaming()
730 static void sur40_stop_streaming(struct vb2_queue *vq) in sur40_stop_streaming() argument
732 struct sur40_state *sur40 = vb2_get_drv_priv(vq); in sur40_stop_streaming()
/linux-4.4.14/drivers/media/platform/vsp1/
Dvsp1_video.c790 vsp1_video_queue_setup(struct vb2_queue *vq, const void *parg, in vsp1_video_queue_setup() argument
795 struct vsp1_video *video = vb2_get_drv_priv(vq); in vsp1_video_queue_setup()
885 static int vsp1_video_start_streaming(struct vb2_queue *vq, unsigned int count) in vsp1_video_start_streaming() argument
887 struct vsp1_video *video = vb2_get_drv_priv(vq); in vsp1_video_start_streaming()
937 static void vsp1_video_stop_streaming(struct vb2_queue *vq) in vsp1_video_stop_streaming() argument
939 struct vsp1_video *video = vb2_get_drv_priv(vq); in vsp1_video_stop_streaming()
/linux-4.4.14/drivers/media/dvb-frontends/
Drtl2832_sdr.c492 static int rtl2832_sdr_queue_setup(struct vb2_queue *vq, in rtl2832_sdr_queue_setup() argument
496 struct rtl2832_sdr_dev *dev = vb2_get_drv_priv(vq); in rtl2832_sdr_queue_setup()
502 if (vq->num_buffers + *nbuffers < 8) in rtl2832_sdr_queue_setup()
503 *nbuffers = 8 - vq->num_buffers; in rtl2832_sdr_queue_setup()
902 static int rtl2832_sdr_start_streaming(struct vb2_queue *vq, unsigned int count) in rtl2832_sdr_start_streaming() argument
904 struct rtl2832_sdr_dev *dev = vb2_get_drv_priv(vq); in rtl2832_sdr_start_streaming()
963 static void rtl2832_sdr_stop_streaming(struct vb2_queue *vq) in rtl2832_sdr_stop_streaming() argument
965 struct rtl2832_sdr_dev *dev = vb2_get_drv_priv(vq); in rtl2832_sdr_stop_streaming()
/linux-4.4.14/drivers/media/platform/ti-vpe/
Dvpe.c1392 struct vb2_queue *vq; in vpe_g_fmt() local
1396 vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type); in vpe_g_fmt()
1397 if (!vq) in vpe_g_fmt()
1525 struct vb2_queue *vq; in __vpe_s_fmt() local
1528 vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type); in __vpe_s_fmt()
1529 if (!vq) in __vpe_s_fmt()
1532 if (vb2_is_busy(vq)) { in __vpe_s_fmt()
1798 static int vpe_queue_setup(struct vb2_queue *vq, in vpe_queue_setup() argument
1804 struct vpe_ctx *ctx = vb2_get_drv_priv(vq); in vpe_queue_setup()
1807 q_data = get_q_data(ctx, vq->type); in vpe_queue_setup()
/linux-4.4.14/drivers/media/platform/sti/bdisp/
Dbdisp-v4l2.c440 static int bdisp_queue_setup(struct vb2_queue *vq, in bdisp_queue_setup() argument
446 struct bdisp_ctx *ctx = vb2_get_drv_priv(vq); in bdisp_queue_setup()
447 struct bdisp_frame *frame = ctx_get_frame(ctx, vq->type); in bdisp_queue_setup()
801 struct vb2_queue *vq; in bdisp_s_fmt() local
813 vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type); in bdisp_s_fmt()
814 if (vb2_is_streaming(vq)) { in bdisp_s_fmt()
/linux-4.4.14/drivers/media/platform/s5p-jpeg/
Djpeg-core.c1330 struct vb2_queue *vq; in s5p_jpeg_g_fmt() local
1335 vq = v4l2_m2m_get_vq(ct->fh.m2m_ctx, f->type); in s5p_jpeg_g_fmt()
1336 if (!vq) in s5p_jpeg_g_fmt()
1575 struct vb2_queue *vq; in s5p_jpeg_s_fmt() local
1582 vq = v4l2_m2m_get_vq(ct->fh.m2m_ctx, f->type); in s5p_jpeg_s_fmt()
1583 if (!vq) in s5p_jpeg_s_fmt()
1589 if (vb2_is_busy(vq)) { in s5p_jpeg_s_fmt()
2432 static int s5p_jpeg_queue_setup(struct vb2_queue *vq, in s5p_jpeg_queue_setup() argument
2437 struct s5p_jpeg_ctx *ctx = vb2_get_drv_priv(vq); in s5p_jpeg_queue_setup()
2441 q_data = get_q_data(ctx, vq->type); in s5p_jpeg_queue_setup()
/linux-4.4.14/drivers/media/pci/netup_unidvb/
Dnetup_unidvb_core.c279 static int netup_unidvb_queue_setup(struct vb2_queue *vq, in netup_unidvb_queue_setup() argument
286 struct netup_dma *dma = vb2_get_drv_priv(vq); in netup_unidvb_queue_setup()
291 if (vq->num_buffers + *nbuffers < VIDEO_MAX_FRAME) in netup_unidvb_queue_setup()
292 *nbuffers = VIDEO_MAX_FRAME - vq->num_buffers; in netup_unidvb_queue_setup()
/linux-4.4.14/drivers/media/usb/go7007/
Dgo7007-v4l2.c387 struct vb2_queue *vq = vb->vb2_queue; in go7007_buf_queue() local
388 struct go7007 *go = vb2_get_drv_priv(vq); in go7007_buf_queue()
413 struct vb2_queue *vq = vb->vb2_queue; in go7007_buf_finish() local
414 struct go7007 *go = vb2_get_drv_priv(vq); in go7007_buf_finish()
/linux-4.4.14/drivers/media/usb/s2255/
Ds2255drv.c663 static int queue_setup(struct vb2_queue *vq, const void *parg, in queue_setup() argument
667 struct s2255_vc *vc = vb2_get_drv_priv(vq); in queue_setup()
717 static int start_streaming(struct vb2_queue *vq, unsigned int count);
718 static void stop_streaming(struct vb2_queue *vq);
1096 static int start_streaming(struct vb2_queue *vq, unsigned int count) in start_streaming() argument
1098 struct s2255_vc *vc = vb2_get_drv_priv(vq); in start_streaming()
1113 static void stop_streaming(struct vb2_queue *vq) in stop_streaming() argument
1115 struct s2255_vc *vc = vb2_get_drv_priv(vq); in stop_streaming()
/linux-4.4.14/drivers/media/platform/s3c-camif/
Dcamif-capture.c375 static int start_streaming(struct vb2_queue *vq, unsigned int count) in start_streaming() argument
377 struct camif_vp *vp = vb2_get_drv_priv(vq); in start_streaming()
432 static void stop_streaming(struct vb2_queue *vq) in stop_streaming() argument
434 struct camif_vp *vp = vb2_get_drv_priv(vq); in stop_streaming()
438 static int queue_setup(struct vb2_queue *vq, const void *parg, in queue_setup() argument
444 struct camif_vp *vp = vb2_get_drv_priv(vq); in queue_setup()
/linux-4.4.14/drivers/media/platform/am437x/
Dam437x-vpfe.c1910 static int vpfe_queue_setup(struct vb2_queue *vq, in vpfe_queue_setup() argument
1916 struct vpfe_device *vpfe = vb2_get_drv_priv(vq); in vpfe_queue_setup()
1921 if (vq->num_buffers + *nbuffers < 3) in vpfe_queue_setup()
1922 *nbuffers = 3 - vq->num_buffers; in vpfe_queue_setup()
1982 static int vpfe_start_streaming(struct vb2_queue *vq, unsigned int count) in vpfe_start_streaming() argument
1984 struct vpfe_device *vpfe = vb2_get_drv_priv(vq); in vpfe_start_streaming()
2043 static void vpfe_stop_streaming(struct vb2_queue *vq) in vpfe_stop_streaming() argument
2045 struct vpfe_device *vpfe = vb2_get_drv_priv(vq); in vpfe_stop_streaming()
/linux-4.4.14/drivers/media/pci/solo6x10/
Dsolo6x10-v4l2.c351 struct vb2_queue *vq = vb->vb2_queue; in solo_buf_queue() local
352 struct solo_dev *solo_dev = vb2_get_drv_priv(vq); in solo_buf_queue()
Dsolo6x10-v4l2-enc.c686 struct vb2_queue *vq = vb->vb2_queue; in solo_enc_buf_queue() local
687 struct solo_enc_dev *solo_enc = vb2_get_drv_priv(vq); in solo_enc_buf_queue()
/linux-4.4.14/drivers/staging/media/omap4iss/
Diss_video.c289 static int iss_video_queue_setup(struct vb2_queue *vq, in iss_video_queue_setup() argument
294 struct iss_video_fh *vfh = vb2_get_drv_priv(vq); in iss_video_queue_setup()
/linux-4.4.14/Documentation/DocBook/media/
Ddvbstb.png.b64362 vq/bNDY2xsqVK+Omm26Kd9555wN930ceeSRuu+229xVEeXl50alTp4iIeO2118JUAe2VmRkAgHOo
Dfieldseq_bt.gif.b64431 bdhv74r+3vq+7b1Pme+C25bfLrYIjAEOb3lzEtYKN/iksZjwirOW4RnOMsT/LfFxUlzjrT24LbdG
/linux-4.4.14/Documentation/DocBook/
Ddevice-drivers.xml.db853 API-v4l2-m2m-get-src-vq
854 API-v4l2-m2m-get-dst-vq