Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions device.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ static void submit_noinput_buffer(struct vcam_out_buffer *buf,
memset(vbuf_ptr, 0xff, rowsize * (rows % 255));
}

buf->vb.sequence = dev->sequence++;
buf->vb.vb2_buf.timestamp = ktime_get_ns();
vb2_buffer_done(&buf->vb.vb2_buf, VB2_BUF_STATE_DONE);
}
Expand Down Expand Up @@ -648,6 +649,7 @@ static void submit_copy_buffer(struct vcam_out_buffer *out_buf,
}
}
}
out_buf->vb.sequence = dev->sequence++;
out_buf->vb.vb2_buf.timestamp = ktime_get_ns();
vb2_buffer_done(&out_buf->vb.vb2_buf, VB2_BUF_STATE_DONE);
}
Expand Down
1 change: 1 addition & 0 deletions device.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ struct vcam_device {

/* Submitter thread */
struct task_struct *sub_thr_id;
u32 sequence;

/* Format descriptor */
size_t nr_fmts;
Expand Down
1 change: 1 addition & 0 deletions videobuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ static int vcam_start_streaming(struct vb2_queue *q, unsigned int count)
struct vcam_device *dev = q->drv_priv;

/* Try to start kernel thread */
dev->sequence = 0;
dev->sub_thr_id = kthread_create(submitter_thread, dev, "vcam_submitter");
if (!dev->sub_thr_id) {
pr_err("Failed to create kernel thread\n");
Expand Down