diff options
author | Kamil Debski <k.debski@samsung.com> | 2013-01-25 04:29:57 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-05 12:53:05 -0500 |
commit | 6aa69f99b2ecc7f9b387fcf22d30e6601b58819f (patch) | |
tree | 4cfb60434345720acec8f88a754ffe7f6bf86176 /drivers/media/platform/s5p-mfc | |
parent | 53bf0f446bc387eabdd535dca080789cc74607f4 (diff) |
[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-mfc')
-rw-r--r-- | drivers/media/platform/s5p-mfc/s5p_mfc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index e84703c314ce..92c6bf11af74 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c | |||
@@ -804,6 +804,7 @@ static int s5p_mfc_open(struct file *file) | |||
804 | goto err_queue_init; | 804 | goto err_queue_init; |
805 | } | 805 | } |
806 | q->mem_ops = (struct vb2_mem_ops *)&vb2_dma_contig_memops; | 806 | q->mem_ops = (struct vb2_mem_ops *)&vb2_dma_contig_memops; |
807 | q->timestamp_type = V4L2_BUF_FLAG_TIMESTAMP_COPY; | ||
807 | ret = vb2_queue_init(q); | 808 | ret = vb2_queue_init(q); |
808 | if (ret) { | 809 | if (ret) { |
809 | mfc_err("Failed to initialize videobuf2 queue(capture)\n"); | 810 | mfc_err("Failed to initialize videobuf2 queue(capture)\n"); |
@@ -825,6 +826,7 @@ static int s5p_mfc_open(struct file *file) | |||
825 | goto err_queue_init; | 826 | goto err_queue_init; |
826 | } | 827 | } |
827 | q->mem_ops = (struct vb2_mem_ops *)&vb2_dma_contig_memops; | 828 | q->mem_ops = (struct vb2_mem_ops *)&vb2_dma_contig_memops; |
829 | q->timestamp_type = V4L2_BUF_FLAG_TIMESTAMP_COPY; | ||
828 | ret = vb2_queue_init(q); | 830 | ret = vb2_queue_init(q); |
829 | if (ret) { | 831 | if (ret) { |
830 | mfc_err("Failed to initialize videobuf2 queue(output)\n"); | 832 | mfc_err("Failed to initialize videobuf2 queue(output)\n"); |