Commit 073b795e authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] sh-veu: initialize timestamp_flags and copy timestamp info

This field wasn't set, causing WARN_ON's from the vb2 core.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Acked-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 267897a4
...@@ -958,6 +958,7 @@ static int sh_veu_queue_init(void *priv, struct vb2_queue *src_vq, ...@@ -958,6 +958,7 @@ static int sh_veu_queue_init(void *priv, struct vb2_queue *src_vq,
src_vq->ops = &sh_veu_qops; src_vq->ops = &sh_veu_qops;
src_vq->mem_ops = &vb2_dma_contig_memops; src_vq->mem_ops = &vb2_dma_contig_memops;
src_vq->lock = &veu->fop_lock; src_vq->lock = &veu->fop_lock;
src_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
ret = vb2_queue_init(src_vq); ret = vb2_queue_init(src_vq);
if (ret < 0) if (ret < 0)
...@@ -971,6 +972,7 @@ static int sh_veu_queue_init(void *priv, struct vb2_queue *src_vq, ...@@ -971,6 +972,7 @@ static int sh_veu_queue_init(void *priv, struct vb2_queue *src_vq,
dst_vq->ops = &sh_veu_qops; dst_vq->ops = &sh_veu_qops;
dst_vq->mem_ops = &vb2_dma_contig_memops; dst_vq->mem_ops = &vb2_dma_contig_memops;
dst_vq->lock = &veu->fop_lock; dst_vq->lock = &veu->fop_lock;
dst_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
return vb2_queue_init(dst_vq); return vb2_queue_init(dst_vq);
} }
...@@ -1103,6 +1105,12 @@ static irqreturn_t sh_veu_isr(int irq, void *dev_id) ...@@ -1103,6 +1105,12 @@ static irqreturn_t sh_veu_isr(int irq, void *dev_id)
if (!src || !dst) if (!src || !dst)
return IRQ_NONE; return IRQ_NONE;
dst->v4l2_buf.timestamp = src->v4l2_buf.timestamp;
dst->v4l2_buf.flags &= ~V4L2_BUF_FLAG_TSTAMP_SRC_MASK;
dst->v4l2_buf.flags |=
src->v4l2_buf.flags & V4L2_BUF_FLAG_TSTAMP_SRC_MASK;
dst->v4l2_buf.timecode = src->v4l2_buf.timecode;
spin_lock(&veu->lock); spin_lock(&veu->lock);
v4l2_m2m_buf_done(src, VB2_BUF_STATE_DONE); v4l2_m2m_buf_done(src, VB2_BUF_STATE_DONE);
v4l2_m2m_buf_done(dst, VB2_BUF_STATE_DONE); v4l2_m2m_buf_done(dst, VB2_BUF_STATE_DONE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment