Lines Matching refs:q
50 #define CALL(q, f, arg...) \ argument
51 ((q->int_ops->f) ? q->int_ops->f(arg) : 0)
52 #define CALLPTR(q, f, arg...) \ argument
53 ((q->int_ops->f) ? q->int_ops->f(arg) : NULL)
55 struct videobuf_buffer *videobuf_alloc_vb(struct videobuf_queue *q) in videobuf_alloc_vb() argument
59 BUG_ON(q->msize < sizeof(*vb)); in videobuf_alloc_vb()
61 if (!q->int_ops || !q->int_ops->alloc_vb) { in videobuf_alloc_vb()
66 vb = q->int_ops->alloc_vb(q->msize); in videobuf_alloc_vb()
76 static int state_neither_active_nor_queued(struct videobuf_queue *q, in state_neither_active_nor_queued() argument
82 spin_lock_irqsave(q->irqlock, flags); in state_neither_active_nor_queued()
84 spin_unlock_irqrestore(q->irqlock, flags); in state_neither_active_nor_queued()
88 int videobuf_waiton(struct videobuf_queue *q, struct videobuf_buffer *vb, in videobuf_waiton() argument
97 if (state_neither_active_nor_queued(q, vb)) in videobuf_waiton()
102 is_ext_locked = q->ext_lock && mutex_is_locked(q->ext_lock); in videobuf_waiton()
107 mutex_unlock(q->ext_lock); in videobuf_waiton()
110 state_neither_active_nor_queued(q, vb)); in videobuf_waiton()
112 wait_event(vb->done, state_neither_active_nor_queued(q, vb)); in videobuf_waiton()
115 mutex_lock(q->ext_lock); in videobuf_waiton()
121 int videobuf_iolock(struct videobuf_queue *q, struct videobuf_buffer *vb, in videobuf_iolock() argument
125 MAGIC_CHECK(q->int_ops->magic, MAGIC_QTYPE_OPS); in videobuf_iolock()
127 return CALL(q, iolock, q, vb, fbuf); in videobuf_iolock()
131 void *videobuf_queue_to_vaddr(struct videobuf_queue *q, in videobuf_queue_to_vaddr() argument
134 if (q->int_ops->vaddr) in videobuf_queue_to_vaddr()
135 return q->int_ops->vaddr(buf); in videobuf_queue_to_vaddr()
143 void videobuf_queue_core_init(struct videobuf_queue *q, in videobuf_queue_core_init() argument
154 BUG_ON(!q); in videobuf_queue_core_init()
155 memset(q, 0, sizeof(*q)); in videobuf_queue_core_init()
156 q->irqlock = irqlock; in videobuf_queue_core_init()
157 q->ext_lock = ext_lock; in videobuf_queue_core_init()
158 q->dev = dev; in videobuf_queue_core_init()
159 q->type = type; in videobuf_queue_core_init()
160 q->field = field; in videobuf_queue_core_init()
161 q->msize = msize; in videobuf_queue_core_init()
162 q->ops = ops; in videobuf_queue_core_init()
163 q->priv_data = priv; in videobuf_queue_core_init()
164 q->int_ops = int_ops; in videobuf_queue_core_init()
167 BUG_ON(!q->ops->buf_setup); in videobuf_queue_core_init()
168 BUG_ON(!q->ops->buf_prepare); in videobuf_queue_core_init()
169 BUG_ON(!q->ops->buf_queue); in videobuf_queue_core_init()
170 BUG_ON(!q->ops->buf_release); in videobuf_queue_core_init()
176 BUG_ON(!q->int_ops); in videobuf_queue_core_init()
178 mutex_init(&q->vb_lock); in videobuf_queue_core_init()
179 init_waitqueue_head(&q->wait); in videobuf_queue_core_init()
180 INIT_LIST_HEAD(&q->stream); in videobuf_queue_core_init()
185 int videobuf_queue_is_busy(struct videobuf_queue *q) in videobuf_queue_is_busy() argument
189 MAGIC_CHECK(q->int_ops->magic, MAGIC_QTYPE_OPS); in videobuf_queue_is_busy()
191 if (q->streaming) { in videobuf_queue_is_busy()
195 if (q->reading) { in videobuf_queue_is_busy()
199 if (q->read_buf) { in videobuf_queue_is_busy()
204 if (NULL == q->bufs[i]) in videobuf_queue_is_busy()
206 if (q->bufs[i]->map) { in videobuf_queue_is_busy()
210 if (q->bufs[i]->state == VIDEOBUF_QUEUED) { in videobuf_queue_is_busy()
214 if (q->bufs[i]->state == VIDEOBUF_ACTIVE) { in videobuf_queue_is_busy()
230 static int __videobuf_free(struct videobuf_queue *q) in __videobuf_free() argument
235 if (!q) in __videobuf_free()
238 if (q->streaming || q->reading) { in __videobuf_free()
243 MAGIC_CHECK(q->int_ops->magic, MAGIC_QTYPE_OPS); in __videobuf_free()
246 if (q->bufs[i] && q->bufs[i]->map) { in __videobuf_free()
252 if (NULL == q->bufs[i]) in __videobuf_free()
254 q->ops->buf_release(q, q->bufs[i]); in __videobuf_free()
255 kfree(q->bufs[i]); in __videobuf_free()
256 q->bufs[i] = NULL; in __videobuf_free()
263 void videobuf_queue_cancel(struct videobuf_queue *q) in videobuf_queue_cancel() argument
268 q->streaming = 0; in videobuf_queue_cancel()
269 q->reading = 0; in videobuf_queue_cancel()
270 wake_up_interruptible_sync(&q->wait); in videobuf_queue_cancel()
273 spin_lock_irqsave(q->irqlock, flags); in videobuf_queue_cancel()
275 if (NULL == q->bufs[i]) in videobuf_queue_cancel()
277 if (q->bufs[i]->state == VIDEOBUF_QUEUED) { in videobuf_queue_cancel()
278 list_del(&q->bufs[i]->queue); in videobuf_queue_cancel()
279 q->bufs[i]->state = VIDEOBUF_ERROR; in videobuf_queue_cancel()
280 wake_up_all(&q->bufs[i]->done); in videobuf_queue_cancel()
283 spin_unlock_irqrestore(q->irqlock, flags); in videobuf_queue_cancel()
287 if (NULL == q->bufs[i]) in videobuf_queue_cancel()
289 q->ops->buf_release(q, q->bufs[i]); in videobuf_queue_cancel()
291 INIT_LIST_HEAD(&q->stream); in videobuf_queue_cancel()
298 enum v4l2_field videobuf_next_field(struct videobuf_queue *q) in videobuf_next_field() argument
300 enum v4l2_field field = q->field; in videobuf_next_field()
305 if (V4L2_FIELD_TOP == q->last) { in videobuf_next_field()
307 q->last = V4L2_FIELD_BOTTOM; in videobuf_next_field()
310 q->last = V4L2_FIELD_TOP; in videobuf_next_field()
318 static void videobuf_status(struct videobuf_queue *q, struct v4l2_buffer *b, in videobuf_status() argument
322 MAGIC_CHECK(q->int_ops->magic, MAGIC_QTYPE_OPS); in videobuf_status()
373 int videobuf_mmap_free(struct videobuf_queue *q) in videobuf_mmap_free() argument
376 videobuf_queue_lock(q); in videobuf_mmap_free()
377 ret = __videobuf_free(q); in videobuf_mmap_free()
378 videobuf_queue_unlock(q); in videobuf_mmap_free()
384 int __videobuf_mmap_setup(struct videobuf_queue *q, in __videobuf_mmap_setup() argument
391 MAGIC_CHECK(q->int_ops->magic, MAGIC_QTYPE_OPS); in __videobuf_mmap_setup()
393 err = __videobuf_free(q); in __videobuf_mmap_setup()
399 q->bufs[i] = videobuf_alloc_vb(q); in __videobuf_mmap_setup()
401 if (NULL == q->bufs[i]) in __videobuf_mmap_setup()
404 q->bufs[i]->i = i; in __videobuf_mmap_setup()
405 q->bufs[i]->memory = memory; in __videobuf_mmap_setup()
406 q->bufs[i]->bsize = bsize; in __videobuf_mmap_setup()
409 q->bufs[i]->boff = PAGE_ALIGN(bsize) * i; in __videobuf_mmap_setup()
428 int videobuf_mmap_setup(struct videobuf_queue *q, in videobuf_mmap_setup() argument
433 videobuf_queue_lock(q); in videobuf_mmap_setup()
434 ret = __videobuf_mmap_setup(q, bcount, bsize, memory); in videobuf_mmap_setup()
435 videobuf_queue_unlock(q); in videobuf_mmap_setup()
440 int videobuf_reqbufs(struct videobuf_queue *q, in videobuf_reqbufs() argument
453 videobuf_queue_lock(q); in videobuf_reqbufs()
454 if (req->type != q->type) { in videobuf_reqbufs()
460 if (q->streaming) { in videobuf_reqbufs()
465 if (!list_empty(&q->stream)) { in videobuf_reqbufs()
473 retval = __videobuf_free(q); in videobuf_reqbufs()
481 q->ops->buf_setup(q, &count, &size); in videobuf_reqbufs()
486 retval = __videobuf_mmap_setup(q, count, size, req->memory); in videobuf_reqbufs()
496 videobuf_queue_unlock(q); in videobuf_reqbufs()
501 int videobuf_querybuf(struct videobuf_queue *q, struct v4l2_buffer *b) in videobuf_querybuf() argument
505 videobuf_queue_lock(q); in videobuf_querybuf()
506 if (unlikely(b->type != q->type)) { in videobuf_querybuf()
514 if (unlikely(NULL == q->bufs[b->index])) { in videobuf_querybuf()
519 videobuf_status(q, b, q->bufs[b->index], q->type); in videobuf_querybuf()
523 videobuf_queue_unlock(q); in videobuf_querybuf()
528 int videobuf_qbuf(struct videobuf_queue *q, struct v4l2_buffer *b) in videobuf_qbuf() argument
535 MAGIC_CHECK(q->int_ops->magic, MAGIC_QTYPE_OPS); in videobuf_qbuf()
540 videobuf_queue_lock(q); in videobuf_qbuf()
542 if (q->reading) { in videobuf_qbuf()
547 if (b->type != q->type) { in videobuf_qbuf()
555 buf = q->bufs[b->index]; in videobuf_qbuf()
576 if (q->type == V4L2_BUF_TYPE_VIDEO_OUTPUT in videobuf_qbuf()
577 || q->type == V4L2_BUF_TYPE_VBI_OUTPUT in videobuf_qbuf()
578 || q->type == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT in videobuf_qbuf()
579 || q->type == V4L2_BUF_TYPE_SDR_OUTPUT) { in videobuf_qbuf()
592 q->ops->buf_release(q, buf); in videobuf_qbuf()
604 field = videobuf_next_field(q); in videobuf_qbuf()
605 retval = q->ops->buf_prepare(q, buf, field); in videobuf_qbuf()
611 list_add_tail(&buf->stream, &q->stream); in videobuf_qbuf()
612 if (q->streaming) { in videobuf_qbuf()
613 spin_lock_irqsave(q->irqlock, flags); in videobuf_qbuf()
614 q->ops->buf_queue(q, buf); in videobuf_qbuf()
615 spin_unlock_irqrestore(q->irqlock, flags); in videobuf_qbuf()
619 wake_up_interruptible_sync(&q->wait); in videobuf_qbuf()
622 videobuf_queue_unlock(q); in videobuf_qbuf()
632 static int stream_next_buffer_check_queue(struct videobuf_queue *q, int noblock) in stream_next_buffer_check_queue() argument
637 if (!q->streaming) { in stream_next_buffer_check_queue()
643 if (list_empty(&q->stream)) { in stream_next_buffer_check_queue()
652 videobuf_queue_unlock(q); in stream_next_buffer_check_queue()
657 retval = wait_event_interruptible(q->wait, in stream_next_buffer_check_queue()
658 !list_empty(&q->stream) || !q->streaming); in stream_next_buffer_check_queue()
659 videobuf_queue_lock(q); in stream_next_buffer_check_queue()
675 static int stream_next_buffer(struct videobuf_queue *q, in stream_next_buffer() argument
681 retval = stream_next_buffer_check_queue(q, nonblocking); in stream_next_buffer()
685 buf = list_entry(q->stream.next, struct videobuf_buffer, stream); in stream_next_buffer()
686 retval = videobuf_waiton(q, buf, nonblocking, 1); in stream_next_buffer()
695 int videobuf_dqbuf(struct videobuf_queue *q, in videobuf_dqbuf() argument
701 MAGIC_CHECK(q->int_ops->magic, MAGIC_QTYPE_OPS); in videobuf_dqbuf()
704 videobuf_queue_lock(q); in videobuf_dqbuf()
706 retval = stream_next_buffer(q, &buf, nonblocking); in videobuf_dqbuf()
724 CALL(q, sync, q, buf); in videobuf_dqbuf()
725 videobuf_status(q, b, buf, q->type); in videobuf_dqbuf()
730 videobuf_queue_unlock(q); in videobuf_dqbuf()
735 int videobuf_streamon(struct videobuf_queue *q) in videobuf_streamon() argument
741 videobuf_queue_lock(q); in videobuf_streamon()
743 if (q->reading) in videobuf_streamon()
746 if (q->streaming) in videobuf_streamon()
748 q->streaming = 1; in videobuf_streamon()
749 spin_lock_irqsave(q->irqlock, flags); in videobuf_streamon()
750 list_for_each_entry(buf, &q->stream, stream) in videobuf_streamon()
752 q->ops->buf_queue(q, buf); in videobuf_streamon()
753 spin_unlock_irqrestore(q->irqlock, flags); in videobuf_streamon()
755 wake_up_interruptible_sync(&q->wait); in videobuf_streamon()
757 videobuf_queue_unlock(q); in videobuf_streamon()
763 static int __videobuf_streamoff(struct videobuf_queue *q) in __videobuf_streamoff() argument
765 if (!q->streaming) in __videobuf_streamoff()
768 videobuf_queue_cancel(q); in __videobuf_streamoff()
773 int videobuf_streamoff(struct videobuf_queue *q) in videobuf_streamoff() argument
777 videobuf_queue_lock(q); in videobuf_streamoff()
778 retval = __videobuf_streamoff(q); in videobuf_streamoff()
779 videobuf_queue_unlock(q); in videobuf_streamoff()
786 static ssize_t videobuf_read_zerocopy(struct videobuf_queue *q, in videobuf_read_zerocopy() argument
794 MAGIC_CHECK(q->int_ops->magic, MAGIC_QTYPE_OPS); in videobuf_read_zerocopy()
797 q->read_buf = videobuf_alloc_vb(q); in videobuf_read_zerocopy()
798 if (NULL == q->read_buf) in videobuf_read_zerocopy()
801 q->read_buf->memory = V4L2_MEMORY_USERPTR; in videobuf_read_zerocopy()
802 q->read_buf->baddr = (unsigned long)data; in videobuf_read_zerocopy()
803 q->read_buf->bsize = count; in videobuf_read_zerocopy()
805 field = videobuf_next_field(q); in videobuf_read_zerocopy()
806 retval = q->ops->buf_prepare(q, q->read_buf, field); in videobuf_read_zerocopy()
811 spin_lock_irqsave(q->irqlock, flags); in videobuf_read_zerocopy()
812 q->ops->buf_queue(q, q->read_buf); in videobuf_read_zerocopy()
813 spin_unlock_irqrestore(q->irqlock, flags); in videobuf_read_zerocopy()
814 retval = videobuf_waiton(q, q->read_buf, 0, 0); in videobuf_read_zerocopy()
816 CALL(q, sync, q, q->read_buf); in videobuf_read_zerocopy()
817 if (VIDEOBUF_ERROR == q->read_buf->state) in videobuf_read_zerocopy()
820 retval = q->read_buf->size; in videobuf_read_zerocopy()
825 q->ops->buf_release(q, q->read_buf); in videobuf_read_zerocopy()
826 kfree(q->read_buf); in videobuf_read_zerocopy()
827 q->read_buf = NULL; in videobuf_read_zerocopy()
831 static int __videobuf_copy_to_user(struct videobuf_queue *q, in __videobuf_copy_to_user() argument
836 void *vaddr = CALLPTR(q, vaddr, buf); in __videobuf_copy_to_user()
839 if (count > buf->size - q->read_off) in __videobuf_copy_to_user()
840 count = buf->size - q->read_off; in __videobuf_copy_to_user()
842 if (copy_to_user(data, vaddr + q->read_off, count)) in __videobuf_copy_to_user()
848 static int __videobuf_copy_stream(struct videobuf_queue *q, in __videobuf_copy_stream() argument
853 unsigned int *fc = CALLPTR(q, vaddr, buf); in __videobuf_copy_stream()
866 count = __videobuf_copy_to_user(q, buf, data, count, nonblocking); in __videobuf_copy_stream()
874 ssize_t videobuf_read_one(struct videobuf_queue *q, in videobuf_read_one() argument
883 MAGIC_CHECK(q->int_ops->magic, MAGIC_QTYPE_OPS); in videobuf_read_one()
885 videobuf_queue_lock(q); in videobuf_read_one()
887 q->ops->buf_setup(q, &nbufs, &size); in videobuf_read_one()
889 if (NULL == q->read_buf && in videobuf_read_one()
892 retval = videobuf_read_zerocopy(q, data, count, ppos); in videobuf_read_one()
899 if (NULL == q->read_buf) { in videobuf_read_one()
902 q->read_buf = videobuf_alloc_vb(q); in videobuf_read_one()
904 dprintk(1, "video alloc=0x%p\n", q->read_buf); in videobuf_read_one()
905 if (NULL == q->read_buf) in videobuf_read_one()
907 q->read_buf->memory = V4L2_MEMORY_USERPTR; in videobuf_read_one()
908 q->read_buf->bsize = count; /* preferred size */ in videobuf_read_one()
909 field = videobuf_next_field(q); in videobuf_read_one()
910 retval = q->ops->buf_prepare(q, q->read_buf, field); in videobuf_read_one()
913 kfree(q->read_buf); in videobuf_read_one()
914 q->read_buf = NULL; in videobuf_read_one()
918 spin_lock_irqsave(q->irqlock, flags); in videobuf_read_one()
919 q->ops->buf_queue(q, q->read_buf); in videobuf_read_one()
920 spin_unlock_irqrestore(q->irqlock, flags); in videobuf_read_one()
922 q->read_off = 0; in videobuf_read_one()
926 retval = videobuf_waiton(q, q->read_buf, nonblocking, 1); in videobuf_read_one()
930 CALL(q, sync, q, q->read_buf); in videobuf_read_one()
932 if (VIDEOBUF_ERROR == q->read_buf->state) { in videobuf_read_one()
934 q->ops->buf_release(q, q->read_buf); in videobuf_read_one()
935 kfree(q->read_buf); in videobuf_read_one()
936 q->read_buf = NULL; in videobuf_read_one()
942 retval = __videobuf_copy_to_user(q, q->read_buf, data, count, nonblocking); in videobuf_read_one()
946 q->read_off += retval; in videobuf_read_one()
947 if (q->read_off == q->read_buf->size) { in videobuf_read_one()
949 q->ops->buf_release(q, q->read_buf); in videobuf_read_one()
950 kfree(q->read_buf); in videobuf_read_one()
951 q->read_buf = NULL; in videobuf_read_one()
955 videobuf_queue_unlock(q); in videobuf_read_one()
961 static int __videobuf_read_start(struct videobuf_queue *q) in __videobuf_read_start() argument
968 q->ops->buf_setup(q, &count, &size); in __videobuf_read_start()
975 err = __videobuf_mmap_setup(q, count, size, V4L2_MEMORY_USERPTR); in __videobuf_read_start()
982 field = videobuf_next_field(q); in __videobuf_read_start()
983 err = q->ops->buf_prepare(q, q->bufs[i], field); in __videobuf_read_start()
986 list_add_tail(&q->bufs[i]->stream, &q->stream); in __videobuf_read_start()
988 spin_lock_irqsave(q->irqlock, flags); in __videobuf_read_start()
990 q->ops->buf_queue(q, q->bufs[i]); in __videobuf_read_start()
991 spin_unlock_irqrestore(q->irqlock, flags); in __videobuf_read_start()
992 q->reading = 1; in __videobuf_read_start()
996 static void __videobuf_read_stop(struct videobuf_queue *q) in __videobuf_read_stop() argument
1000 videobuf_queue_cancel(q); in __videobuf_read_stop()
1001 __videobuf_free(q); in __videobuf_read_stop()
1002 INIT_LIST_HEAD(&q->stream); in __videobuf_read_stop()
1004 if (NULL == q->bufs[i]) in __videobuf_read_stop()
1006 kfree(q->bufs[i]); in __videobuf_read_stop()
1007 q->bufs[i] = NULL; in __videobuf_read_stop()
1009 q->read_buf = NULL; in __videobuf_read_stop()
1012 int videobuf_read_start(struct videobuf_queue *q) in videobuf_read_start() argument
1016 videobuf_queue_lock(q); in videobuf_read_start()
1017 rc = __videobuf_read_start(q); in videobuf_read_start()
1018 videobuf_queue_unlock(q); in videobuf_read_start()
1024 void videobuf_read_stop(struct videobuf_queue *q) in videobuf_read_stop() argument
1026 videobuf_queue_lock(q); in videobuf_read_stop()
1027 __videobuf_read_stop(q); in videobuf_read_stop()
1028 videobuf_queue_unlock(q); in videobuf_read_stop()
1032 void videobuf_stop(struct videobuf_queue *q) in videobuf_stop() argument
1034 videobuf_queue_lock(q); in videobuf_stop()
1036 if (q->streaming) in videobuf_stop()
1037 __videobuf_streamoff(q); in videobuf_stop()
1039 if (q->reading) in videobuf_stop()
1040 __videobuf_read_stop(q); in videobuf_stop()
1042 videobuf_queue_unlock(q); in videobuf_stop()
1046 ssize_t videobuf_read_stream(struct videobuf_queue *q, in videobuf_read_stream() argument
1053 MAGIC_CHECK(q->int_ops->magic, MAGIC_QTYPE_OPS); in videobuf_read_stream()
1056 videobuf_queue_lock(q); in videobuf_read_stream()
1058 if (q->streaming) in videobuf_read_stream()
1060 if (!q->reading) { in videobuf_read_stream()
1061 retval = __videobuf_read_start(q); in videobuf_read_stream()
1069 if (NULL == q->read_buf) { in videobuf_read_stream()
1070 q->read_buf = list_entry(q->stream.next, in videobuf_read_stream()
1073 list_del(&q->read_buf->stream); in videobuf_read_stream()
1074 q->read_off = 0; in videobuf_read_stream()
1076 rc = videobuf_waiton(q, q->read_buf, nonblocking, 1); in videobuf_read_stream()
1083 if (q->read_buf->state == VIDEOBUF_DONE) { in videobuf_read_stream()
1084 rc = __videobuf_copy_stream(q, q->read_buf, data + retval, count, in videobuf_read_stream()
1092 q->read_off += rc; in videobuf_read_stream()
1095 q->read_off = q->read_buf->size; in videobuf_read_stream()
1101 if (q->read_off == q->read_buf->size) { in videobuf_read_stream()
1102 list_add_tail(&q->read_buf->stream, in videobuf_read_stream()
1103 &q->stream); in videobuf_read_stream()
1104 spin_lock_irqsave(q->irqlock, flags); in videobuf_read_stream()
1105 q->ops->buf_queue(q, q->read_buf); in videobuf_read_stream()
1106 spin_unlock_irqrestore(q->irqlock, flags); in videobuf_read_stream()
1107 q->read_buf = NULL; in videobuf_read_stream()
1114 videobuf_queue_unlock(q); in videobuf_read_stream()
1120 struct videobuf_queue *q, in videobuf_poll_stream() argument
1127 videobuf_queue_lock(q); in videobuf_poll_stream()
1128 if (q->streaming) { in videobuf_poll_stream()
1129 if (!list_empty(&q->stream)) in videobuf_poll_stream()
1130 buf = list_entry(q->stream.next, in videobuf_poll_stream()
1133 if (!q->reading) in videobuf_poll_stream()
1134 __videobuf_read_start(q); in videobuf_poll_stream()
1135 if (!q->reading) { in videobuf_poll_stream()
1137 } else if (NULL == q->read_buf) { in videobuf_poll_stream()
1138 q->read_buf = list_entry(q->stream.next, in videobuf_poll_stream()
1141 list_del(&q->read_buf->stream); in videobuf_poll_stream()
1142 q->read_off = 0; in videobuf_poll_stream()
1144 buf = q->read_buf; in videobuf_poll_stream()
1154 switch (q->type) { in videobuf_poll_stream()
1167 videobuf_queue_unlock(q); in videobuf_poll_stream()
1172 int videobuf_mmap_mapper(struct videobuf_queue *q, struct vm_area_struct *vma) in videobuf_mmap_mapper() argument
1177 MAGIC_CHECK(q->int_ops->magic, MAGIC_QTYPE_OPS); in videobuf_mmap_mapper()
1184 videobuf_queue_lock(q); in videobuf_mmap_mapper()
1186 struct videobuf_buffer *buf = q->bufs[i]; in videobuf_mmap_mapper()
1190 rc = CALL(q, mmap_mapper, q, buf, vma); in videobuf_mmap_mapper()
1194 videobuf_queue_unlock(q); in videobuf_mmap_mapper()