mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Charvi Mehta <charvi.mehta@arm.com>
To: linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: Charvi Mehta <charvi.mehta@arm.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Vincenzo Frascino <vincenzo.frascino@arm.com>,
	Rathinavel Sankaralingam <rath.sankaralingam@arm.com>,
	Shobhit Pandey <shobhit.pandey@arm.com>
Subject: [RFC PATCH 05/28] media: mali-vpu: add V4L2 mem2mem and VB2 queue support
Date: Thu, 19 Nov 2026 15:37:35 +0000	[thread overview]
Message-ID: <20261119153758.1426673-6-charvi.mehta@arm.com> (raw)
In-Reply-To: <20261119153758.1426673-1-charvi.mehta@arm.com>

Initialize the V4L2 mem2mem device and create a mem2mem context for each
session.

Add VB2 operations for queue setup, buffer initialization, validation,
preparation and queueing using the DMA scatter-gather allocator. Wire
up the standard mem2mem buffer ioctls together with mmap and poll support.

Signed-off-by: Charvi Mehta <charvi.mehta@arm.com>
---
 drivers/media/platform/arm/mali-vpu/Kconfig   |  2 +
 drivers/media/platform/arm/mali-vpu/Makefile  |  4 +-
 .../platform/arm/mali-vpu/mali-vpu-buffer.c   | 51 ++++++++++
 .../platform/arm/mali-vpu/mali-vpu-buffer.h   | 21 ++++
 .../platform/arm/mali-vpu/mali-vpu-device.h   |  3 +
 .../platform/arm/mali-vpu/mali-vpu-probe.c    | 12 ++-
 .../platform/arm/mali-vpu/mali-vpu-session.c  | 37 ++++++-
 .../platform/arm/mali-vpu/mali-vpu-session.h  |  8 ++
 .../platform/arm/mali-vpu/mali-vpu-vb2.c      | 99 +++++++++++++++++++
 .../platform/arm/mali-vpu/mali-vpu-vb2.h      | 13 +++
 .../platform/arm/mali-vpu/mali-vpu-vidioc.c   | 35 ++++++-
 .../platform/arm/mali-vpu/mali-vpu-vidioc.h   |  2 +
 12 files changed, 281 insertions(+), 6 deletions(-)
 create mode 100644 drivers/media/platform/arm/mali-vpu/mali-vpu-buffer.c
 create mode 100644 drivers/media/platform/arm/mali-vpu/mali-vpu-buffer.h
 create mode 100644 drivers/media/platform/arm/mali-vpu/mali-vpu-vb2.c
 create mode 100644 drivers/media/platform/arm/mali-vpu/mali-vpu-vb2.h

diff --git a/drivers/media/platform/arm/mali-vpu/Kconfig b/drivers/media/platform/arm/mali-vpu/Kconfig
index d98872f2b7ec0..2728830f11a4a 100644
--- a/drivers/media/platform/arm/mali-vpu/Kconfig
+++ b/drivers/media/platform/arm/mali-vpu/Kconfig
@@ -4,6 +4,8 @@ config VIDEO_MALI_VPU
 	depends on V4L_MEM2MEM_DRIVERS
 	depends on VIDEO_DEV
 	depends on !CPU_BIG_ENDIAN
+	select V4L2_MEM2MEM_DEV
+	select VIDEOBUF2_DMA_SG
 	help
 	  Enable this to support Arm's Mali Video hardware accelerator.
 	  This is a V4L2 driver.
diff --git a/drivers/media/platform/arm/mali-vpu/Makefile b/drivers/media/platform/arm/mali-vpu/Makefile
index 0a42c53ae5088..94ddde02fc528 100644
--- a/drivers/media/platform/arm/mali-vpu/Makefile
+++ b/drivers/media/platform/arm/mali-vpu/Makefile
@@ -4,6 +4,8 @@ mali-vpu-objs := mali-vpu-probe.o \
 		mali-vpu-variant-v76.o \
 		mali-vpu-vidioc.o \
 		mali-vpu-session.o \
-		mali-vpu-dec.o
+		mali-vpu-dec.o \
+		mali-vpu-buffer.o \
+		mali-vpu-vb2.o
 
 obj-$(CONFIG_VIDEO_MALI_VPU) += mali-vpu.o
diff --git a/drivers/media/platform/arm/mali-vpu/mali-vpu-buffer.c b/drivers/media/platform/arm/mali-vpu/mali-vpu-buffer.c
new file mode 100644
index 0000000000000..7ace0489996a8
--- /dev/null
+++ b/drivers/media/platform/arm/mali-vpu/mali-vpu-buffer.c
@@ -0,0 +1,51 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (C) 2026 ARM Limited.
+ */
+
+#include <linux/errno.h>
+
+#include "mali-vpu-buffer.h"
+#include "mali-vpu-session.h"
+
+int mali_vpu_vb2_buffer_init(struct vb2_buffer *vb2_buf)
+{
+	struct mali_vpu_session *sess = vb2_get_drv_priv(vb2_buf->vb2_queue);
+
+	if (vb2_buf->num_planes > MALI_VPU_BUFFER_MAX_PLANES) {
+		dev_err(sess->vpu_dev->dev,
+			"buffer has too many planes: %u\n",
+			vb2_buf->num_planes);
+		return -EINVAL;
+	}
+
+	return 0;
+}
+
+int mali_vpu_vb2_buffer_prepare(struct vb2_buffer *vb2_buf)
+{
+	struct mali_vpu_session *sess = vb2_get_drv_priv(vb2_buf->vb2_queue);
+	struct mali_vpu_port *port;
+	struct v4l2_pix_format_mplane *pix_mp;
+	u32 i;
+
+	port = V4L2_TYPE_IS_OUTPUT(vb2_buf->vb2_queue->type) ? &sess->port_src :
+							       &sess->port_dst;
+	pix_mp = &port->curr_fmt.fmt.pix_mp;
+
+	for (i = 0; i < pix_mp->num_planes; i++) {
+		if (vb2_plane_size(vb2_buf, i) < pix_mp->plane_fmt[i].sizeimage)
+			return -EINVAL;
+	}
+
+	return 0;
+}
+
+int mali_vpu_vb2_buffer_out_validate(struct vb2_buffer *vb2_buf)
+{
+	struct vb2_v4l2_buffer *v4l2_buf = to_vb2_v4l2_buffer(vb2_buf);
+
+	v4l2_buf->field = V4L2_FIELD_NONE;
+
+	return 0;
+}
diff --git a/drivers/media/platform/arm/mali-vpu/mali-vpu-buffer.h b/drivers/media/platform/arm/mali-vpu/mali-vpu-buffer.h
new file mode 100644
index 0000000000000..f5d67d48e5921
--- /dev/null
+++ b/drivers/media/platform/arm/mali-vpu/mali-vpu-buffer.h
@@ -0,0 +1,21 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (C) 2026 ARM Limited.
+ */
+
+#ifndef __MALI_VPU_BUFFER_H__
+#define __MALI_VPU_BUFFER_H__
+
+#include <media/v4l2-mem2mem.h>
+
+#define MALI_VPU_BUFFER_MAX_PLANES 3
+
+struct mali_vpu_buffer {
+	struct v4l2_m2m_buffer m2m_buf;
+};
+
+int mali_vpu_vb2_buffer_init(struct vb2_buffer *vb2_buf);
+int mali_vpu_vb2_buffer_prepare(struct vb2_buffer *vb2_buf);
+int mali_vpu_vb2_buffer_out_validate(struct vb2_buffer *vb2_buf);
+
+#endif /* __MALI_VPU_BUFFER_H__ */
diff --git a/drivers/media/platform/arm/mali-vpu/mali-vpu-device.h b/drivers/media/platform/arm/mali-vpu/mali-vpu-device.h
index d9b0801cbb520..26b2bf9e1588e 100644
--- a/drivers/media/platform/arm/mali-vpu/mali-vpu-device.h
+++ b/drivers/media/platform/arm/mali-vpu/mali-vpu-device.h
@@ -12,6 +12,7 @@
 #define MALI_VPU_DRV_NAME "mali-vpu"
 
 struct clk_bulk_data;
+struct v4l2_m2m_dev;
 struct mali_vpu_variant;
 struct reset_control_bulk_data;
 
@@ -35,6 +36,7 @@ enum mali_vpu_session_role {
  * @variant: Structure describing variant-specific features and capabilities.
  * @v4l2_dev: V4L2 device structure for mali vpu.
  * @vdev_dec: Video device structure for decoder.
+ * @m2m_dev: V4L2 mem2mem device structure for mali vpu.
  */
 struct mali_vpu_dev {
 	struct device			*dev;
@@ -48,6 +50,7 @@ struct mali_vpu_dev {
 	const struct mali_vpu_variant	*variant;
 	struct v4l2_device		v4l2_dev;
 	struct video_device		*vdev_dec;
+	struct v4l2_m2m_dev		*m2m_dev;
 };
 
 #endif /* __MALI_VPU_DEVICE_H__ */
diff --git a/drivers/media/platform/arm/mali-vpu/mali-vpu-probe.c b/drivers/media/platform/arm/mali-vpu/mali-vpu-probe.c
index 6d21cb731ee1d..36a25030d7324 100644
--- a/drivers/media/platform/arm/mali-vpu/mali-vpu-probe.c
+++ b/drivers/media/platform/arm/mali-vpu/mali-vpu-probe.c
@@ -18,6 +18,7 @@
 #include <linux/string.h>
 #include <media/v4l2-dev.h>
 #include <media/v4l2-device.h>
+#include <media/v4l2-mem2mem.h>
 
 #include "mali-vpu-device.h"
 #include "mali-vpu-registers.h"
@@ -218,14 +219,22 @@ static int mali_vpu_probe(struct platform_device *pdev)
 		goto err_rst_clk;
 	}
 
+	vpu_dev->m2m_dev = v4l2_m2m_init(&mali_vpu_m2m_ops);
+	if (IS_ERR(vpu_dev->m2m_dev)) {
+		ret = PTR_ERR(vpu_dev->m2m_dev);
+		goto err_unreg_v4l2;
+	}
+
 	ret = mali_vpu_register_video_device(vpu_dev, MALI_VPU_DECODER);
 	if (ret)
-		goto err_unreg_v4l2;
+		goto err_release_m2m;
 
 	platform_set_drvdata(pdev, vpu_dev);
 
 	return 0;
 
+err_release_m2m:
+	v4l2_m2m_release(vpu_dev->m2m_dev);
 err_unreg_v4l2:
 	v4l2_device_unregister(&vpu_dev->v4l2_dev);
 err_rst_clk:
@@ -241,6 +250,7 @@ static void mali_vpu_remove(struct platform_device *pdev)
 	struct mali_vpu_dev *vpu_dev = platform_get_drvdata(pdev);
 
 	video_unregister_device(vpu_dev->vdev_dec);
+	v4l2_m2m_release(vpu_dev->m2m_dev);
 	v4l2_device_unregister(&vpu_dev->v4l2_dev);
 
 	mali_vpu_assert_reset(vpu_dev);
diff --git a/drivers/media/platform/arm/mali-vpu/mali-vpu-session.c b/drivers/media/platform/arm/mali-vpu/mali-vpu-session.c
index 9bcb3a73a582e..95050296f9904 100644
--- a/drivers/media/platform/arm/mali-vpu/mali-vpu-session.c
+++ b/drivers/media/platform/arm/mali-vpu/mali-vpu-session.c
@@ -3,15 +3,18 @@
  * Copyright (C) 2026 ARM Limited.
  */
 
+#include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/minmax.h>
 #include <linux/mm.h>
 #include <linux/string.h>
 #include <media/v4l2-common.h>
+#include <media/v4l2-mem2mem.h>
 
 #include "mali-vpu-session.h"
 #include "mali-vpu-dec.h"
 #include "mali-vpu-variant.h"
+#include "mali-vpu-vb2.h"
 
 static int mali_vpu_set_port_fmt(struct mali_vpu_port *port,
 				 enum v4l2_buf_type type,
@@ -70,14 +73,42 @@ int mali_vpu_session_init(struct mali_vpu_session *sess)
 {
 	int ret;
 
-	if (sess->role != MALI_VPU_DECODER)
-		return -EINVAL;
+	mutex_init(&sess->vq_lock);
+
+	if (sess->role != MALI_VPU_DECODER) {
+		ret = -EINVAL;
+		goto err_mutex_destroy;
+	}
 
 	mali_vpu_session_init_dec(sess);
 
 	ret = mali_vpu_set_port_defaults(sess);
 	if (ret)
-		return ret;
+		goto err_mutex_destroy;
+
+	sess->m2m_ctx = v4l2_m2m_ctx_init(sess->vpu_dev->m2m_dev, sess, mali_vpu_queue_init);
+	if (IS_ERR(sess->m2m_ctx)) {
+		ret = PTR_ERR(sess->m2m_ctx);
+		goto err_mutex_destroy;
+	}
 
 	return 0;
+
+err_mutex_destroy:
+	mutex_destroy(&sess->vq_lock);
+	return ret;
+}
+
+void mali_vpu_session_cleanup(struct mali_vpu_session *sess)
+{
+	mutex_lock(&sess->vq_lock);
+
+	if (sess->m2m_ctx) {
+		v4l2_m2m_ctx_release(sess->m2m_ctx);
+		sess->m2m_ctx = NULL;
+		sess->fh.m2m_ctx = NULL;
+	}
+
+	mutex_unlock(&sess->vq_lock);
+	mutex_destroy(&sess->vq_lock);
 }
diff --git a/drivers/media/platform/arm/mali-vpu/mali-vpu-session.h b/drivers/media/platform/arm/mali-vpu/mali-vpu-session.h
index a2778ca496381..dfd1833f884af 100644
--- a/drivers/media/platform/arm/mali-vpu/mali-vpu-session.h
+++ b/drivers/media/platform/arm/mali-vpu/mali-vpu-session.h
@@ -6,12 +6,15 @@
 #ifndef __MALI_VPU_SESSION_H__
 #define __MALI_VPU_SESSION_H__
 
+#include <linux/mutex.h>
 #include <linux/videodev2.h>
 #include <media/v4l2-fh.h>
 
 #include "mali-vpu-device.h"
 #include "mali-vpu-formats.h"
 
+struct v4l2_m2m_ctx;
+
 /**
  * struct mali_vpu_port - format state of a src/dst queue in a session.
  * @curr_fmt: V4L2 format currently configured for the port
@@ -28,17 +31,22 @@ struct mali_vpu_port {
  * @role: Role of this session.
  * @port_src: Source (OUTPUT) port for this session.
  * @port_dst: Destination (CAPTURE) port for this session.
+ * @vq_lock: Mutex lock to serialise per-session queue related ioctls.
  * @fh: V4L2 file handle for this session.
+ * @m2m_ctx: V4L2 mem2mem context for this session.
  */
 struct mali_vpu_session {
 	struct mali_vpu_dev		*vpu_dev;
 	enum mali_vpu_session_role	role;
 	struct mali_vpu_port		port_src;
 	struct mali_vpu_port		port_dst;
+	struct mutex			vq_lock; /* lock to serialise per-session ioctls */
 
 	struct v4l2_fh		fh;
+	struct v4l2_m2m_ctx	*m2m_ctx;
 };
 
 int mali_vpu_session_init(struct mali_vpu_session *sess);
+void mali_vpu_session_cleanup(struct mali_vpu_session *sess);
 
 #endif /* __MALI_VPU_SESSION_H__ */
diff --git a/drivers/media/platform/arm/mali-vpu/mali-vpu-vb2.c b/drivers/media/platform/arm/mali-vpu/mali-vpu-vb2.c
new file mode 100644
index 0000000000000..acdbb06785f6b
--- /dev/null
+++ b/drivers/media/platform/arm/mali-vpu/mali-vpu-vb2.c
@@ -0,0 +1,99 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (C) 2026 ARM Limited.
+ */
+
+#include <linux/errno.h>
+#include <media/v4l2-mem2mem.h>
+#include <media/videobuf2-dma-sg.h>
+
+#include "mali-vpu-buffer.h"
+#include "mali-vpu-session.h"
+#include "mali-vpu-vb2.h"
+
+#define MALI_VPU_MIN_BUFFERS 1
+
+static int mali_vpu_vb2_queue_setup(struct vb2_queue *q,
+				    unsigned int *num_buffers __always_unused,
+				    unsigned int *num_planes,
+				    unsigned int sizes[],
+				    struct device *alloc_devs[] __always_unused)
+{
+	struct mali_vpu_session *sess = vb2_get_drv_priv(q);
+	struct mali_vpu_port *port = V4L2_TYPE_IS_OUTPUT(q->type) ?
+					&sess->port_src :
+					&sess->port_dst;
+	struct v4l2_pix_format_mplane *pix_mp = &port->curr_fmt.fmt.pix_mp;
+	u32 i;
+
+	if (!pix_mp->num_planes || pix_mp->num_planes > MALI_VPU_BUFFER_MAX_PLANES)
+		return -EINVAL;
+
+	for (i = 0; i < pix_mp->num_planes; i++) {
+		if (!pix_mp->plane_fmt[i].sizeimage)
+			return -EINVAL;
+	}
+
+	if (*num_planes) {
+		if (*num_planes != pix_mp->num_planes)
+			return -EINVAL;
+
+		for (i = 0; i < pix_mp->num_planes; i++) {
+			if (sizes[i] < pix_mp->plane_fmt[i].sizeimage)
+				return -EINVAL;
+		}
+	} else {
+		*num_planes = pix_mp->num_planes;
+		for (i = 0; i < pix_mp->num_planes; i++)
+			sizes[i] = pix_mp->plane_fmt[i].sizeimage;
+	}
+
+	return 0;
+}
+
+static void mali_vpu_vb2_buffer_queue(struct vb2_buffer *vb2_buf)
+{
+	struct mali_vpu_session *sess = vb2_get_drv_priv(vb2_buf->vb2_queue);
+	struct vb2_v4l2_buffer *v4l2_buf = to_vb2_v4l2_buffer(vb2_buf);
+
+	v4l2_m2m_buf_queue(sess->m2m_ctx, v4l2_buf);
+}
+
+static const struct vb2_ops mali_vpu_vb2_ops = {
+	.queue_setup		= mali_vpu_vb2_queue_setup,
+	.buf_out_validate	= mali_vpu_vb2_buffer_out_validate,
+	.buf_init		= mali_vpu_vb2_buffer_init,
+	.buf_prepare		= mali_vpu_vb2_buffer_prepare,
+	.buf_queue		= mali_vpu_vb2_buffer_queue,
+};
+
+static void mali_vpu_queue_init_type(struct mali_vpu_session *sess,
+				     struct vb2_queue *vq,
+				     enum v4l2_buf_type type)
+{
+	vq->type = type;
+	vq->io_modes = VB2_MMAP | VB2_DMABUF;
+	vq->dev = sess->vpu_dev->dev;
+	vq->lock = &sess->vq_lock;
+	vq->ops = &mali_vpu_vb2_ops;
+	vq->mem_ops = &vb2_dma_sg_memops;
+	vq->drv_priv = sess;
+	vq->buf_struct_size = sizeof(struct mali_vpu_buffer);
+	vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
+	vq->min_queued_buffers = MALI_VPU_MIN_BUFFERS;
+}
+
+int mali_vpu_queue_init(void *priv, struct vb2_queue *src_vq,
+			struct vb2_queue *dst_vq)
+{
+	struct mali_vpu_session *sess = priv;
+	int ret;
+
+	mali_vpu_queue_init_type(sess, src_vq, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE);
+	ret = vb2_queue_init(src_vq);
+	if (ret)
+		return ret;
+
+	mali_vpu_queue_init_type(sess, dst_vq, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE);
+	return vb2_queue_init(dst_vq);
+}
diff --git a/drivers/media/platform/arm/mali-vpu/mali-vpu-vb2.h b/drivers/media/platform/arm/mali-vpu/mali-vpu-vb2.h
new file mode 100644
index 0000000000000..4aa80d2136c2f
--- /dev/null
+++ b/drivers/media/platform/arm/mali-vpu/mali-vpu-vb2.h
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (C) 2026 ARM Limited.
+ */
+
+#ifndef __MALI_VPU_VB2_H__
+#define __MALI_VPU_VB2_H__
+
+struct vb2_queue;
+
+int mali_vpu_queue_init(void *priv, struct vb2_queue *src_vq, struct vb2_queue *dst_vq);
+
+#endif /* __MALI_VPU_VB2_H__ */
diff --git a/drivers/media/platform/arm/mali-vpu/mali-vpu-vidioc.c b/drivers/media/platform/arm/mali-vpu/mali-vpu-vidioc.c
index 13468c6baba76..aaf604beff93a 100644
--- a/drivers/media/platform/arm/mali-vpu/mali-vpu-vidioc.c
+++ b/drivers/media/platform/arm/mali-vpu/mali-vpu-vidioc.c
@@ -10,6 +10,7 @@
 #include <media/v4l2-dev.h>
 #include <media/v4l2-fh.h>
 #include <media/v4l2-ioctl.h>
+#include <media/v4l2-mem2mem.h>
 
 #include "mali-vpu-session.h"
 #include "mali-vpu-vidioc.h"
@@ -41,6 +42,8 @@ static int mali_vpu_open(struct file *filp)
 	if (ret)
 		goto err_v4l2_fh_deinit;
 
+	sess->fh.m2m_ctx = sess->m2m_ctx;
+
 	return 0;
 
 err_v4l2_fh_deinit:
@@ -56,6 +59,7 @@ static int mali_vpu_release(struct file *filp)
 	struct mali_vpu_session *sess = container_of(file_to_v4l2_fh(filp),
 						     struct mali_vpu_session, fh);
 
+	mali_vpu_session_cleanup(sess);
 	v4l2_fh_del(&sess->fh, filp);
 	v4l2_fh_exit(&sess->fh);
 	kfree(sess);
@@ -67,6 +71,27 @@ const struct v4l2_file_operations mali_vpu_fops = {
 	.open		= mali_vpu_open,
 	.release	= mali_vpu_release,
 	.unlocked_ioctl = video_ioctl2,
+	.poll		= v4l2_m2m_fop_poll,
+	.mmap		= v4l2_m2m_fop_mmap,
+};
+
+static int mali_vpu_m2m_job_ready(void *priv)
+{
+	/*
+	 * The Mali scheduler/LSID path owns hardware dispatch.
+	 * v4l2-mem2mem is used only for vb2 queue bookkeeping.
+	 */
+	return 0;
+}
+
+static void mali_vpu_m2m_device_run(void *priv)
+{
+	WARN_ON_ONCE(1);
+}
+
+const struct v4l2_m2m_ops mali_vpu_m2m_ops = {
+	.job_ready = mali_vpu_m2m_job_ready,
+	.device_run = mali_vpu_m2m_device_run,
 };
 
 static int mali_vpu_querycap(struct file *filp, void *fh,
@@ -81,5 +106,13 @@ static int mali_vpu_querycap(struct file *filp, void *fh,
 }
 
 const struct v4l2_ioctl_ops mali_vpu_ioctl_ops_dec = {
-	.vidioc_querycap = mali_vpu_querycap,
+	.vidioc_querycap	= mali_vpu_querycap,
+	.vidioc_reqbufs		= v4l2_m2m_ioctl_reqbufs,
+	.vidioc_querybuf	= v4l2_m2m_ioctl_querybuf,
+	.vidioc_create_bufs	= v4l2_m2m_ioctl_create_bufs,
+	.vidioc_prepare_buf	= v4l2_m2m_ioctl_prepare_buf,
+	.vidioc_expbuf		= v4l2_m2m_ioctl_expbuf,
+	.vidioc_qbuf		= v4l2_m2m_ioctl_qbuf,
+	.vidioc_dqbuf		= v4l2_m2m_ioctl_dqbuf,
+	.vidioc_remove_bufs	= v4l2_m2m_ioctl_remove_bufs,
 };
diff --git a/drivers/media/platform/arm/mali-vpu/mali-vpu-vidioc.h b/drivers/media/platform/arm/mali-vpu/mali-vpu-vidioc.h
index e1aedea5bbcb6..e967cae8be137 100644
--- a/drivers/media/platform/arm/mali-vpu/mali-vpu-vidioc.h
+++ b/drivers/media/platform/arm/mali-vpu/mali-vpu-vidioc.h
@@ -8,8 +8,10 @@
 
 struct v4l2_file_operations;
 struct v4l2_ioctl_ops;
+struct v4l2_m2m_ops;
 
 extern const struct v4l2_file_operations mali_vpu_fops;
+extern const struct v4l2_m2m_ops mali_vpu_m2m_ops;
 extern const struct v4l2_ioctl_ops mali_vpu_ioctl_ops_dec;
 
 #endif /* __MALI_VPU_VIDIOC_H__ */
-- 
2.43.0


  parent reply	other threads:[~2026-11-19 15:38 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 15:37 [RFC PATCH 00/28] media: add arm Mali-V76 video decoder driver Charvi Mehta
2026-11-19 15:37 ` [RFC PATCH 01/28] dt-bindings: media: add Arm Mali-V76 VPU Charvi Mehta
2026-11-19 15:37 ` [RFC PATCH 02/28] media: mali-vpu: add Mali VPU platform driver Charvi Mehta
2026-11-19 15:37 ` [RFC PATCH 03/28] media: mali-vpu: register V4L2 decoder device and add querycap ioctl Charvi Mehta
2026-11-19 15:37 ` [RFC PATCH 04/28] media: mali-vpu: initialize decoder format state Charvi Mehta
2026-11-19 15:37 ` Charvi Mehta [this message]
2026-11-19 15:37 ` [RFC PATCH 06/28] media: mali-vpu: implement format query ioctls Charvi Mehta
2026-11-19 15:37 ` [RFC PATCH 07/28] media: mali-vpu: implement TRY_FMT and S_FMT ioctls Charvi Mehta
2026-11-19 15:37 ` [RFC PATCH 08/28] media: mali-vpu: register V76 decoder controls and introduce UAPI controls Charvi Mehta
2026-11-19 15:37 ` [RFC PATCH 09/28] media: mali-vpu: add MMU software page table manager Charvi Mehta
2026-11-19 15:37 ` [RFC PATCH 10/28] media: mali-vpu: add firmware cache infrastructure Charvi Mehta
2026-11-19 15:37 ` [RFC PATCH 11/28] media: mali-vpu: load firmware for decoder sessions Charvi Mehta
2026-11-19 15:37 ` [RFC PATCH 12/28] media: mali-vpu: prepare firmware address space Charvi Mehta
2026-11-19 15:37 ` [RFC PATCH 13/28] media: mali-vpu: add firmware message transport Charvi Mehta
2026-11-19 15:37 ` [RFC PATCH 14/28] media: mali-vpu: route decoder controls to firmware Charvi Mehta
2026-11-19 15:37 ` [RFC PATCH 15/28] media: mali-vpu: handle firmware RPC requests Charvi Mehta
2026-11-19 15:37 ` [RFC PATCH 16/28] media: mali-vpu: add LSID hardware support Charvi Mehta
2026-11-19 15:37 ` [RFC PATCH 17/28] media: mali-vpu: add single session scheduler Charvi Mehta
2026-11-19 15:37 ` [RFC PATCH 18/28] media: mali-vpu: handle firmware interrupts Charvi Mehta
2026-11-19 15:37 ` [RFC PATCH 19/28] media: mali-vpu: start decoder firmware through LSID scheduling Charvi Mehta
2026-11-19 15:37 ` [RFC PATCH 20/28] media: mali-vpu: implement vb2 buffer queue handling Charvi Mehta
2026-11-19 15:37 ` [RFC PATCH 21/28] media: mali-vpu: handle firmware buffer exchange Charvi Mehta
2026-11-19 15:37 ` [RFC PATCH 22/28] media: mali-vpu: handle fatal firmware error Charvi Mehta
2026-11-19 15:37 ` [RFC PATCH 23/28] media: mali-vpu: propagate buffer metadata Charvi Mehta
2026-11-19 15:37 ` [RFC PATCH 24/28] media: mali-vpu: add decoder EOS and DRC handling Charvi Mehta
2026-11-19 15:37 ` [RFC PATCH 25/28] media: mali-vpu: handle firmware buffer parameters Charvi Mehta
2026-11-19 15:37 ` [RFC PATCH 26/28] media: mali-vpu: handle firmware event responses Charvi Mehta
2026-11-19 15:37 ` [RFC PATCH 27/28] media: mali-vpu: add stateful decoder state machine Charvi Mehta
2026-11-19 15:37 ` [RFC PATCH 28/28] media: MAINTAINERS: add Arm Mali-V76 VPU driver Charvi Mehta

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=20261119153758.1426673-6-charvi.mehta@arm.com \
    --to=charvi.mehta@arm.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=rath.sankaralingam@arm.com \
    --cc=robh@kernel.org \
    --cc=shobhit.pandey@arm.com \
    --cc=vincenzo.frascino@arm.com \
    /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

all inboxes | Powered by JetHome®