Lines Matching refs:read_buf

199 	if (q->read_buf) {  in videobuf_queue_is_busy()
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()
806 retval = q->ops->buf_prepare(q, q->read_buf, field); in videobuf_read_zerocopy()
812 q->ops->buf_queue(q, q->read_buf); 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()
889 if (NULL == q->read_buf && 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()
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()
919 q->ops->buf_queue(q, q->read_buf); 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()
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()
1009 q->read_buf = NULL; in __videobuf_read_stop()
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()
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()
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()
1105 q->ops->buf_queue(q, q->read_buf); in videobuf_read_stream()
1107 q->read_buf = NULL; in videobuf_read_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()
1144 buf = q->read_buf; in videobuf_poll_stream()