+
+ return 0;
+}
+
+static int gen_frame(void)
+{
+ struct buffer *buf = 0;
+
+ spin_lock(&blist_lock);
+ if(buflist) {
+ buf = buflist;
+ buflist = buflist->next;
+ if(!buflist) buflist_tail = 0;
+ }
+ spin_unlock(&blist_lock);
+
+ if(buf) {
+ struct vb2_v4l2_buffer *vvbuf;
+
+ memcpy(vb2_plane_vaddr(&buf->vb, 0), frame, frame_size);
+
+ vvbuf = to_vb2_v4l2_buffer(&buf->vb);
+ buf->vb.timestamp = ktime_get_ns();
+ vvbuf->sequence = seqno++;
+ vvbuf->field = V4L2_FIELD_NONE;
+ vb2_buffer_done(&buf->vb, VB2_BUF_STATE_DONE);
+ }
+