[PATCH 6/7] RFC: v4l2-mem2mem: Remove warning from v4l2_m2m_job_finish
Dave Stevenson
dave.stevenson at raspberrypi.com
Fri Dec 20 08:21:17 PST 2024
From: John Cox <john.cox at raspberrypi.com>
The Raspberry Pi HEVC decoder has a 2 stage pipeline
where the OUTPUT buffer is finished with before the
CAPTURE buffer is ready.
v4l2_m2m_job_finish allows us to do this, however as
the driver handles VB2_V4L2_FL_SUPPORTS_M2M_HOLD_CAPTURE_BUF,
this warn fires on every buffer as drivers that hold capture
buffers are expected to use v4l2_m2m_buf_done_and_job_finish
(introduced with [1]).
That doesn't allow us to handle not returning the destination
buffer.
[1] Commit f8cca8c97a63 ("media: v4l2-mem2mem: support held
capture buffers")
Signed-off-by: John Cox <john.cox at raspberrypi.com>
Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
---
drivers/media/v4l2-core/v4l2-mem2mem.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core/v4l2-mem2mem.c
index eb22d6172462..325a518beff7 100644
--- a/drivers/media/v4l2-core/v4l2-mem2mem.c
+++ b/drivers/media/v4l2-core/v4l2-mem2mem.c
@@ -490,13 +490,6 @@ void v4l2_m2m_job_finish(struct v4l2_m2m_dev *m2m_dev,
unsigned long flags;
bool schedule_next;
- /*
- * This function should not be used for drivers that support
- * holding capture buffers. Those should use
- * v4l2_m2m_buf_done_and_job_finish() instead.
- */
- WARN_ON(m2m_ctx->out_q_ctx.q.subsystem_flags &
- VB2_V4L2_FL_SUPPORTS_M2M_HOLD_CAPTURE_BUF);
spin_lock_irqsave(&m2m_dev->job_spinlock, flags);
schedule_next = _v4l2_m2m_job_finish(m2m_dev, m2m_ctx);
spin_unlock_irqrestore(&m2m_dev->job_spinlock, flags);
--
2.34.1
More information about the linux-arm-kernel
mailing list