Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] media: davinci_vpfe: use monotonic timestamp

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>

authored by

Lad, Prabhakar and committed by
Mauro Carvalho Chehab
4f26aa17 171fe6d1

+2 -1
+2 -1
drivers/staging/media/davinci_vpfe/vpfe_video.c
··· 470 470 { 471 471 struct vpfe_pipeline *pipe = &video->pipe; 472 472 473 - do_gettimeofday(&video->cur_frm->vb.v4l2_buf.timestamp); 473 + v4l2_get_timestamp(&video->cur_frm->vb.v4l2_buf.timestamp); 474 474 vb2_buffer_done(&video->cur_frm->vb, VB2_BUF_STATE_DONE); 475 475 if (pipe->state == VPFE_PIPELINE_STREAM_CONTINUOUS) 476 476 video->cur_frm = video->next_frm; ··· 1337 1337 q->ops = &video_qops; 1338 1338 q->mem_ops = &vb2_dma_contig_memops; 1339 1339 q->buf_struct_size = sizeof(struct vpfe_cap_buffer); 1340 + q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; 1340 1341 1341 1342 ret = vb2_queue_init(q); 1342 1343 if (ret) {