[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230929-wave5_v13_media_master-v13-1-5ac60ccbf2ce@collabora.com>
Date: Thu, 12 Oct 2023 13:00:59 +0200
From: Sebastian Fricke <sebastian.fricke@...labora.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
NXP Linux Team <linux-imx@....com>,
Conor Dooley <conor+dt@...nel.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Jackson Lee <jackson.lee@...psnmedia.com>,
Hans Verkuil <hverkuil@...all.nl>,
Sascha Hauer <s.hauer@...gutronix.de>,
Rob Herring <robh+dt@...nel.org>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Shawn Guo <shawnguo@...nel.org>,
Philipp Zabel <p.zabel@...gutronix.de>,
Nas Chung <nas.chung@...psnmedia.com>,
Fabio Estevam <festevam@...il.com>
Cc: linux-media@...r.kernel.org, Tomasz Figa <tfiga@...omium.org>,
linux-kernel@...r.kernel.org,
Sebastian Fricke <sebastian.fricke@...labora.com>,
Nicolas Dufresne <nicolas.dufresne@...labora.com>,
kernel@...labora.com, Robert Beckett <bob.beckett@...labora.com>,
devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
Darren Etheridge <detheridge@...com>
Subject: [PATCH v13 1/8] media: v4l2: Add ignore_cap_streaming flag
Add a new flag to 'struct v4l2_m2m_ctx' to toggle whether a CAPTURE queue
must be streaming in order to allow queuing OUTPUT jobs to the ready
queue. Currently, both queues (CAPTURE & OUTPUT) must be streaming in
order to add new jobs. This prevents firmware from analyzing the bitstream
header which arrives on the OUTPUT queue and performing an analysis of the
sequence to ensure that userspace prepares the CAPTURE queue correctly.
Signed-off-by: Sebastian Fricke <sebastian.fricke@...labora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@...labora.com>
Signed-off-by: Deborah Brouwer <deborah.brouwer@...labora.com>
---
include/media/v4l2-mem2mem.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/include/media/v4l2-mem2mem.h b/include/media/v4l2-mem2mem.h
index d6c8eb2b5201..1288fe364fab 100644
--- a/include/media/v4l2-mem2mem.h
+++ b/include/media/v4l2-mem2mem.h
@@ -84,6 +84,12 @@ struct v4l2_m2m_queue_ctx {
* @last_src_buf: indicate the last source buffer for draining
* @next_buf_last: next capture queud buffer will be tagged as last
* @has_stopped: indicate the device has been stopped
+ * @ignore_cap_streaming: If true, job_ready can be called even if the CAPTURE
+ * queue is not streaming. This allows firmware to
+ * analyze the bitstream header which arrives on the
+ * OUTPUT queue. The driver must implement the job_ready
+ * callback correctly to make sure that the requirements
+ * for actual decoding are met.
* @m2m_dev: opaque pointer to the internal data to handle M2M context
* @cap_q_ctx: Capture (output to memory) queue context
* @out_q_ctx: Output (input from memory) queue context
@@ -106,6 +112,7 @@ struct v4l2_m2m_ctx {
struct vb2_v4l2_buffer *last_src_buf;
bool next_buf_last;
bool has_stopped;
+ bool ignore_cap_streaming;
/* internal use only */
struct v4l2_m2m_dev *m2m_dev;
--
2.25.1
Powered by blists - more mailing lists