提交 97215cbd 编写于 作者: M Magnus Damm 提交者: Mauro Carvalho Chehab

V4L/DVB (11029): video: use videobuf_waiton() in sh_mobile_ceu free_buffer()

Make sure videobuf_waiton() is used before freeing a buffer.
Without this fix we may return the buffer to the allocator
before the bus mastering operation is finished.
Reported-by: NMatthieu CASTET <matthieu.castet@parrot.com>
Tested-by: NKuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: NMagnus Damm <damm@igel.co.jp>
Signed-off-by: NGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 f340e3f6
...@@ -174,6 +174,7 @@ static void free_buffer(struct videobuf_queue *vq, ...@@ -174,6 +174,7 @@ static void free_buffer(struct videobuf_queue *vq,
if (in_interrupt()) if (in_interrupt())
BUG(); BUG();
videobuf_waiton(&buf->vb, 0, 0);
videobuf_dma_contig_free(vq, &buf->vb); videobuf_dma_contig_free(vq, &buf->vb);
dev_dbg(&icd->dev, "%s freed\n", __func__); dev_dbg(&icd->dev, "%s freed\n", __func__);
buf->vb.state = VIDEOBUF_NEEDS_INIT; buf->vb.state = VIDEOBUF_NEEDS_INIT;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册