devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Fricke <sebastian.fricke@collabora.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>,
	NXP Linux Team <linux-imx@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Conor Dooley <conor+dt@kernel.org>,
	Nas Chung <nas.chung@chipsnmedia.com>,
	Fabio Estevam <festevam@gmail.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Jackson Lee <jackson.lee@chipsnmedia.com>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Rob Herring <robh+dt@kernel.org>
Cc: Ivan Bornyakov <brnkv.i1@gmail.com>,
	Deborah Brouwer <deborah.brouwer@collabora.com>,
	Nicolas Dufresne <nicolas.dufresne@collabora.com>,
	devicetree@vger.kernel.org,
	Robert Beckett <bob.beckett@collabora.com>,
	Sebastian Fricke <sebastian.fricke@collabora.com>,
	linux-arm-kernel@lists.infradead.org, kernel@collabora.com,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org
Subject: [PATCH v14 1/8] media: v4l2: Add ignore_streaming flag
Date: Wed, 08 Nov 2023 20:29:20 +0100	[thread overview]
Message-ID: <20231108-wave5-v14-rebased-v14-1-0b4af1258656@collabora.com> (raw)
In-Reply-To: <20231108-wave5-v14-rebased-v14-0-0b4af1258656@collabora.com>

Add a new flag to the `struct v4l2_m2m_dev` to toggle whether a queue
must be streaming in order to allow queuing jobs to the ready queue.
Currently, both queues (CAPTURE & OUTPUT) must be streaming in order to
allow adding new jobs. This behavior limits the usability of M2M for
some drivers, as these have to be able, to perform analysis of the
sequence to ensure, that userspace prepares the CAPTURE queue correctly.

Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.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

  reply	other threads:[~2023-11-08 19:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-08 19:29 [PATCH v14 0/8] Wave5 codec driver Sebastian Fricke
2023-11-08 19:29 ` Sebastian Fricke [this message]
2023-11-08 19:29 ` [PATCH v14 2/8] media: v4l2: Allow M2M job queuing w/o streaming CAP queue Sebastian Fricke
2023-11-08 19:29 ` [PATCH v14 3/8] media: platform: chips-media: Move Coda to separate folder Sebastian Fricke
2023-11-08 19:29 ` [PATCH v14 4/8] media: chips-media: wave5: Add vpuapi layer Sebastian Fricke
2023-11-08 19:29 ` [PATCH v14 5/8] media: chips-media: wave5: Add the v4l2 layer Sebastian Fricke
2023-11-08 19:29 ` [PATCH v14 6/8] dt-bindings: media: wave5: add yaml devicetree bindings Sebastian Fricke
2023-11-10 20:53   ` Rob Herring
2023-11-28 10:27   ` Geert Uytterhoeven
2023-12-01  6:33     ` Nishanth Menon
2023-11-08 19:29 ` [PATCH v14 7/8] media: chips-media: wave5: Add wave5 driver to maintainers file Sebastian Fricke
2023-11-08 19:29 ` [PATCH v14 8/8] arm64: dts: ti: k3-j721s2-main: add wave5 video encoder/decoder node Sebastian Fricke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231108-wave5-v14-rebased-v14-1-0b4af1258656@collabora.com \
    --to=sebastian.fricke@collabora.com \
    --cc=bob.beckett@collabora.com \
    --cc=brnkv.i1@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=deborah.brouwer@collabora.com \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=hverkuil@xs4all.nl \
    --cc=jackson.lee@chipsnmedia.com \
    --cc=kernel@collabora.com \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=nas.chung@chipsnmedia.com \
    --cc=nicolas.dufresne@collabora.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).