diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2009-12-09 22:57:48 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-02-26 15:10:24 -0300 |
commit | 310fe52461e6244b01a04b011c2e886d6b69de16 (patch) | |
tree | e75b1f25bbf77747d49f183f618ffa4831d4846b /drivers/media/video/uvc/uvc_queue.c | |
parent | 0f7ff39532f1d2328e54b65ce5022c71f06e44d6 (diff) |
V4L/DVB (13827): uvcvideo: Switch to a monotonic clock for V4L2 buffers timestamps
The realtime clock provided by do_gettimeofday() is affected by time
jumps caused by NTP or DST. Furthermore, preliminary investigation
showed that SMP systems the realtime clock is based on the CPU TSC,
and those could get slightly out of sync, resulting in jitter in the
timestamps depending on which processor handles the USB interrupts.
Instead of the realtime clock, use a monotonic high resolution clock to
timestamp the buffer. As this could in theory introduce a regression
with some userspace applications expecting a realtime clock timestamp,
add a module parameter to switch back to the realtime clock.
Thanks to Paulo Assis for pointing out and investigating the issue.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/uvc/uvc_queue.c')
-rw-r--r-- | drivers/media/video/uvc/uvc_queue.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/media/video/uvc/uvc_queue.c b/drivers/media/video/uvc/uvc_queue.c index ea11839cba4..4a925a31b0e 100644 --- a/drivers/media/video/uvc/uvc_queue.c +++ b/drivers/media/video/uvc/uvc_queue.c @@ -502,7 +502,6 @@ struct uvc_buffer *uvc_queue_next_buffer(struct uvc_video_queue *queue, spin_unlock_irqrestore(&queue->irqlock, flags); buf->buf.sequence = queue->sequence++; - do_gettimeofday(&buf->buf.timestamp); wake_up(&buf->wait); return nextbuf; |