Skip to content

Commit

Permalink
[media] media: davinci_vpfe: use monotonic timestamp
Browse files Browse the repository at this point in the history
V4L2 drivers should use MONOTONIC timestamps instead of gettimeofday,
which is affected by daylight savings time.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  • Loading branch information
prabhakarlad authored and mchehab committed Jun 5, 2015
1 parent 171fe6d commit 4f26aa1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/staging/media/davinci_vpfe/vpfe_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ void vpfe_video_process_buffer_complete(struct vpfe_video_device *video)
{
struct vpfe_pipeline *pipe = &video->pipe;

do_gettimeofday(&video->cur_frm->vb.v4l2_buf.timestamp);
v4l2_get_timestamp(&video->cur_frm->vb.v4l2_buf.timestamp);
vb2_buffer_done(&video->cur_frm->vb, VB2_BUF_STATE_DONE);
if (pipe->state == VPFE_PIPELINE_STREAM_CONTINUOUS)
video->cur_frm = video->next_frm;
Expand Down Expand Up @@ -1337,6 +1337,7 @@ static int vpfe_reqbufs(struct file *file, void *priv,
q->ops = &video_qops;
q->mem_ops = &vb2_dma_contig_memops;
q->buf_struct_size = sizeof(struct vpfe_cap_buffer);
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;

ret = vb2_queue_init(q);
if (ret) {
Expand Down

0 comments on commit 4f26aa1

Please sign in to comment.