aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKamil Debski <k.debski@samsung.com>2013-04-24 08:34:03 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-04-25 08:47:07 -0400
commitdc7be2950b25c95cd240b8fe44edb59f8d7e3ae6 (patch)
tree95fa081a6237e9dfbc5fbe4a60d9deb327a775d3
parentf0c24fd81f704730c529dc69aa57f21c1ade5c4e (diff)
[media] s5p-g2d: Add copy time stamp handling
Since the introduction of the timestamp_type field, it is necessary that the driver chooses which type it will use. This patch adds support for the timestamp_type. Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/platform/s5p-g2d/g2d.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/platform/s5p-g2d/g2d.c b/drivers/media/platform/s5p-g2d/g2d.c
index 14d663dacdbd..553d87e5ceab 100644
--- a/drivers/media/platform/s5p-g2d/g2d.c
+++ b/drivers/media/platform/s5p-g2d/g2d.c
@@ -158,6 +158,7 @@ static int queue_init(void *priv, struct vb2_queue *src_vq,
158 src_vq->ops = &g2d_qops; 158 src_vq->ops = &g2d_qops;
159 src_vq->mem_ops = &vb2_dma_contig_memops; 159 src_vq->mem_ops = &vb2_dma_contig_memops;
160 src_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer); 160 src_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer);
161 src_vq->timestamp_type = V4L2_BUF_FLAG_TIMESTAMP_COPY;
161 162
162 ret = vb2_queue_init(src_vq); 163 ret = vb2_queue_init(src_vq);
163 if (ret) 164 if (ret)
@@ -169,6 +170,7 @@ static int queue_init(void *priv, struct vb2_queue *src_vq,
169 dst_vq->ops = &g2d_qops; 170 dst_vq->ops = &g2d_qops;
170 dst_vq->mem_ops = &vb2_dma_contig_memops; 171 dst_vq->mem_ops = &vb2_dma_contig_memops;
171 dst_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer); 172 dst_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer);
173 dst_vq->timestamp_type = V4L2_BUF_FLAG_TIMESTAMP_COPY;
172 174
173 return vb2_queue_init(dst_vq); 175 return vb2_queue_init(dst_vq);
174} 176}
@@ -635,6 +637,9 @@ static irqreturn_t g2d_isr(int irq, void *prv)
635 BUG_ON(src == NULL); 637 BUG_ON(src == NULL);
636 BUG_ON(dst == NULL); 638 BUG_ON(dst == NULL);
637 639
640 dst->v4l2_buf.timecode = src->v4l2_buf.timecode;
641 dst->v4l2_buf.timestamp = src->v4l2_buf.timestamp;
642
638 v4l2_m2m_buf_done(src, VB2_BUF_STATE_DONE); 643 v4l2_m2m_buf_done(src, VB2_BUF_STATE_DONE);
639 v4l2_m2m_buf_done(dst, VB2_BUF_STATE_DONE); 644 v4l2_m2m_buf_done(dst, VB2_BUF_STATE_DONE);
640 v4l2_m2m_job_finish(dev->m2m_dev, ctx->m2m_ctx); 645 v4l2_m2m_job_finish(dev->m2m_dev, ctx->m2m_ctx);