summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Fricke <sebastian.fricke@collabora.com>2023-11-08 22:29:21 +0300
committerSom Qin <som.qin@starfivetech.com>2024-01-23 09:35:18 +0300
commit5cf4c738293f71f12ee5202aeacfcda6c0033df1 (patch)
tree19a14dd71533a442e70c9f7c4b501126b67a4624
parentc7982253f874795a8e86326876ae7eacfec095fd (diff)
downloadlinux-5cf4c738293f71f12ee5202aeacfcda6c0033df1.tar.xz
media: v4l2: Allow M2M job queuing w/o streaming CAP queue
Allow decoder drivers to enable set the ignore_streaming flag on their CAPTURE queue, to allow queuing jobs to the M2M ready queue and perform firmware sequence analysis with just a streaming OUTPUT queue and available bitstream data. Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
-rw-r--r--drivers/media/v4l2-core/v4l2-mem2mem.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core/v4l2-mem2mem.c
index e7f4bf5bc8dd..ee367e5151bc 100644
--- a/drivers/media/v4l2-core/v4l2-mem2mem.c
+++ b/drivers/media/v4l2-core/v4l2-mem2mem.c
@@ -301,9 +301,12 @@ static void __v4l2_m2m_try_queue(struct v4l2_m2m_dev *m2m_dev,
dprintk("Trying to schedule a job for m2m_ctx: %p\n", m2m_ctx);
- if (!m2m_ctx->out_q_ctx.q.streaming
- || !m2m_ctx->cap_q_ctx.q.streaming) {
- dprintk("Streaming needs to be on for both queues\n");
+ if (!m2m_ctx->out_q_ctx.q.streaming ||
+ (!m2m_ctx->cap_q_ctx.q.streaming && !m2m_ctx->ignore_cap_streaming)) {
+ if (!m2m_ctx->ignore_cap_streaming)
+ dprintk("Streaming needs to be on for both queues\n");
+ else
+ dprintk("Streaming needs to be on for the OUTPUT queue\n");
return;
}