media: v4l2-mem2mem: Trace on implicit un-hold
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Tue, 26 Apr 2022 12:57:28 +0000 (14:57 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 13 May 2022 12:58:48 +0000 (14:58 +0200)
If the timestamp of the src buffer differs from the timestamp of a held
dst buffer, the held buffer is implicitly removed and marked as done.
Add a trace to help debugging if someone hits that case.

Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/v4l2-core/v4l2-mem2mem.c

index 9d32d8c..6469f9a 100644 (file)
@@ -336,6 +336,7 @@ static void __v4l2_m2m_try_queue(struct v4l2_m2m_dev *m2m_dev,
        if (src && dst && dst->is_held &&
            dst->vb2_buf.copied_timestamp &&
            dst->vb2_buf.timestamp != src->vb2_buf.timestamp) {
+               dprintk("Timestamp mismatch, returning held capture buffer\n");
                dst->is_held = false;
                v4l2_m2m_dst_buf_remove(m2m_ctx);
                v4l2_m2m_buf_done(dst, VB2_BUF_STATE_DONE);