[media] coda: re-queue buffers if start_streaming fails
authorPhilipp Zabel <p.zabel@pengutronix.de>
Tue, 21 Oct 2014 16:25:52 +0000 (13:25 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 28 Oct 2014 17:54:40 +0000 (15:54 -0200)
Patch b906352c2338 ([media] coda: dequeue buffers if start_streaming fails)
incorrectly marked buffers as DEQUEUED in case of start_streaming failure, when
in fact they should be set to QUEUED. The videobuf2 core warns about this.

Reported-by: Jean-Michel Hautbois <jean-michel.hautbois@vodalys.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/coda/coda-common.c

index ffb99442ac6ab7bc7e1f5d744d55b1464c5aab5a..c588fad0f1fda6ff9b8bd88eaf9d260503d3ea6b 100644 (file)
@@ -1250,10 +1250,10 @@ static int coda_start_streaming(struct vb2_queue *q, unsigned int count)
 err:
        if (q->type == V4L2_BUF_TYPE_VIDEO_OUTPUT) {
                while ((buf = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx)))
-                       v4l2_m2m_buf_done(buf, VB2_BUF_STATE_DEQUEUED);
+                       v4l2_m2m_buf_done(buf, VB2_BUF_STATE_QUEUED);
        } else {
                while ((buf = v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx)))
-                       v4l2_m2m_buf_done(buf, VB2_BUF_STATE_DEQUEUED);
+                       v4l2_m2m_buf_done(buf, VB2_BUF_STATE_QUEUED);
        }
        return ret;
 }
This page took 0.025415 seconds and 5 git commands to generate.