diff mbox series

[v1,10/24] media: v4l2-mem2mem: Trace on implicit un-hold

Message ID 20220328195936.82552-11-nicolas.dufresne@collabora.com (mailing list archive)
State New, archived
Headers show
Series [v1,01/24] media: h264: Increase reference lists size to 32 | expand

Commit Message

Nicolas Dufresne March 28, 2022, 7:59 p.m. UTC
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>
---
 drivers/media/v4l2-core/v4l2-mem2mem.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Sebastian Fricke March 29, 2022, 1:58 p.m. UTC | #1
Hey Nicolas,

On 28.03.2022 15:59, Nicolas Dufresne wrote:
>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>

Greetings,
Sebastian

>---
> drivers/media/v4l2-core/v4l2-mem2mem.c | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core/v4l2-mem2mem.c
>index 53c2332d5cbd..d3e739ef16ef 100644
>--- a/drivers/media/v4l2-core/v4l2-mem2mem.c
>+++ b/drivers/media/v4l2-core/v4l2-mem2mem.c
>@@ -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("src and dst timestamp mismatch, removing held capture buffer.\n");
> 		dst->is_held = false;
> 		v4l2_m2m_dst_buf_remove(m2m_ctx);
> 		v4l2_m2m_buf_done(dst, VB2_BUF_STATE_DONE);
>-- 
>2.34.1
>
diff mbox series

Patch

diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core/v4l2-mem2mem.c
index 53c2332d5cbd..d3e739ef16ef 100644
--- a/drivers/media/v4l2-core/v4l2-mem2mem.c
+++ b/drivers/media/v4l2-core/v4l2-mem2mem.c
@@ -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("src and dst timestamp mismatch, removing held capture buffer.\n");
 		dst->is_held = false;
 		v4l2_m2m_dst_buf_remove(m2m_ctx);
 		v4l2_m2m_buf_done(dst, VB2_BUF_STATE_DONE);