summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a20ece8)
raw | patch | inline | side by side (parent: a20ece8)
author | Nikhil Devshatwar <nikhil.nd@ti.com> | |
Mon, 28 Apr 2014 13:09:08 +0000 (18:39 +0530) | ||
committer | Rakesh Movva <r-movva@ti.com> | |
Thu, 1 May 2014 19:30:20 +0000 (14:30 -0500) |
When the capture driver is dropping frmaes, there is no way for user space
to identify wheather a frame is dropped or not.
struct v4l2_buffer has a field 'sequence' which should be populated with the
sequence number of the frame. A change in the sequence is suffiecient to know
the frame drop.
This patch fills in the stream->sequence in the vb2->v4l2_buf before dequeue.
The stream->sequence is incremented at every interrupt (Even for frame drops)
Change-Id: I00de4dac3afa200eed55a3ba3943c509a00d9323
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
to identify wheather a frame is dropped or not.
struct v4l2_buffer has a field 'sequence' which should be populated with the
sequence number of the frame. A change in the sequence is suffiecient to know
the frame drop.
This patch fills in the stream->sequence in the vb2->v4l2_buf before dequeue.
The stream->sequence is incremented at every interrupt (Even for frame drops)
Change-Id: I00de4dac3afa200eed55a3ba3943c509a00d9323
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
drivers/media/platform/ti-vps/vip.c | patch | blob | history |
index 9afde8ca02e188f2a0ab11132d36db359064b6cd..7bb7513e4f53463ebad4ed43e0860e8f7de73378 100644 (file)
if (buf) {
vb = &buf->vb;
vb->v4l2_buf.field = stream->field;
+ vb->v4l2_buf.sequence = stream->sequence;
do_gettimeofday(&vb->v4l2_buf.timestamp);
if (buf->drop_count-- == 0) {
} else {
BUG();
}
+
+ stream->sequence++;
}
static irqreturn_t vip_irq(int irq_vip, void *data)
buf->allow_dq = true;
stream->cur_buf = buf;
+ stream->sequence = 0;
stream->field = V4L2_FIELD_TOP;
populate_desc_list(stream);