summaryrefslogtreecommitdiff
path: root/drivers/media/platform/s5p-fimc
diff options
context:
space:
mode:
authorKamil Debski <k.debski@samsung.com>2013-01-25 09:29:57 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-05 17:53:05 (GMT)
commit6aa69f99b2ecc7f9b387fcf22d30e6601b58819f (patch)
tree4cfb60434345720acec8f88a754ffe7f6bf86176 /drivers/media/platform/s5p-fimc
parent53bf0f446bc387eabdd535dca080789cc74607f4 (diff)
downloadlinux-fsl-qoriq-6aa69f99b2ecc7f9b387fcf22d30e6601b58819f.tar.xz
[media] vb2: Add support for non monotonic timestamps
Not all drivers use monotonic timestamps. This patch adds a way to set the timestamp type per every queue. In addition, set proper timestamp type in drivers that I am sure that use either MONOTONIC or COPY timestamps. Other drivers will correctly report UNKNOWN timestamp type instead of assuming that all drivers use monotonic timestamps. Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/s5p-fimc')
-rw-r--r--drivers/media/platform/s5p-fimc/fimc-capture.c1
-rw-r--r--drivers/media/platform/s5p-fimc/fimc-lite.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/platform/s5p-fimc/fimc-capture.c b/drivers/media/platform/s5p-fimc/fimc-capture.c
index f553cc2..87b6842 100644
--- a/drivers/media/platform/s5p-fimc/fimc-capture.c
+++ b/drivers/media/platform/s5p-fimc/fimc-capture.c
@@ -1797,6 +1797,7 @@ static int fimc_register_capture_device(struct fimc_dev *fimc,
q->ops = &fimc_capture_qops;
q->mem_ops = &vb2_dma_contig_memops;
q->buf_struct_size = sizeof(struct fimc_vid_buffer);
+ q->timestamp_type = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
ret = vb2_queue_init(q);
if (ret)
diff --git a/drivers/media/platform/s5p-fimc/fimc-lite.c b/drivers/media/platform/s5p-fimc/fimc-lite.c
index bfc4206..47fbf7b 100644
--- a/drivers/media/platform/s5p-fimc/fimc-lite.c
+++ b/drivers/media/platform/s5p-fimc/fimc-lite.c
@@ -1325,6 +1325,7 @@ static int fimc_lite_subdev_registered(struct v4l2_subdev *sd)
q->mem_ops = &vb2_dma_contig_memops;
q->buf_struct_size = sizeof(struct flite_buffer);
q->drv_priv = fimc;
+ q->timestamp_type = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
ret = vb2_queue_init(q);
if (ret < 0)