All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Gaignard <benjamin.gaignard@collabora.com>
To: mchehab@kernel.org, tfiga@chromium.org, m.szyprowski@samsung.com,
	ming.qian@nxp.com, ezequiel@vanguardiasur.com.ar,
	p.zabel@pengutronix.de, gregkh@linuxfoundation.org,
	hverkuil-cisco@xs4all.nl, nicolas.dufresne@collabora.com
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	linux-arm-msm@vger.kernel.org,
	linux-rockchip@lists.infradead.org,
	linux-staging@lists.linux.dev, kernel@collabora.com,
	Benjamin Gaignard <benjamin.gaignard@collabora.com>
Subject: [PATCH v14 47/56] media: verisilicon: Refactor postprocessor to store more buffers
Date: Tue, 31 Oct 2023 17:30:55 +0100	[thread overview]
Message-ID: <20231031163104.112469-48-benjamin.gaignard@collabora.com> (raw)
In-Reply-To: <20231031163104.112469-1-benjamin.gaignard@collabora.com>

Since vb2 queue can store more than VB2_MAX_FRAME buffers, the
postprocessor buffer storage must be capable to store more buffers too.
Change static dec_q array to allocated array to be capable to store
up to queue 'max_num_buffers'.
Keep allocating queue 'num_buffers' at queue setup time but also allows
to allocate postprocessors buffers on the fly.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
CC: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
CC: Philipp Zabel <p.zabel@pengutronix.de>
---
 drivers/media/platform/verisilicon/hantro.h   |  7 +-
 .../media/platform/verisilicon/hantro_drv.c   |  4 +-
 .../media/platform/verisilicon/hantro_hw.h    |  4 +-
 .../platform/verisilicon/hantro_postproc.c    | 93 +++++++++++++++----
 .../media/platform/verisilicon/hantro_v4l2.c  |  2 +-
 5 files changed, 85 insertions(+), 25 deletions(-)

diff --git a/drivers/media/platform/verisilicon/hantro.h b/drivers/media/platform/verisilicon/hantro.h
index 77aee9489516..0948b04a9f8d 100644
--- a/drivers/media/platform/verisilicon/hantro.h
+++ b/drivers/media/platform/verisilicon/hantro.h
@@ -469,11 +469,14 @@ hantro_get_dst_buf(struct hantro_ctx *ctx)
 bool hantro_needs_postproc(const struct hantro_ctx *ctx,
 			   const struct hantro_fmt *fmt);
 
+dma_addr_t
+hantro_postproc_get_dec_buf_addr(struct hantro_ctx *ctx, int index);
+
 static inline dma_addr_t
 hantro_get_dec_buf_addr(struct hantro_ctx *ctx, struct vb2_buffer *vb)
 {
 	if (hantro_needs_postproc(ctx, ctx->vpu_dst_fmt))
-		return ctx->postproc.dec_q[vb->index].dma;
+		return hantro_postproc_get_dec_buf_addr(ctx, vb->index);
 	return vb2_dma_contig_plane_dma_addr(vb, 0);
 }
 
@@ -485,8 +488,8 @@ vb2_to_hantro_decoded_buf(struct vb2_buffer *buf)
 
 void hantro_postproc_disable(struct hantro_ctx *ctx);
 void hantro_postproc_enable(struct hantro_ctx *ctx);
+int hantro_postproc_init(struct hantro_ctx *ctx);
 void hantro_postproc_free(struct hantro_ctx *ctx);
-int hantro_postproc_alloc(struct hantro_ctx *ctx);
 int hanto_postproc_enum_framesizes(struct hantro_ctx *ctx,
 				   struct v4l2_frmsizeenum *fsize);
 
diff --git a/drivers/media/platform/verisilicon/hantro_drv.c b/drivers/media/platform/verisilicon/hantro_drv.c
index a9fa05ac56a9..7f5b82eb6649 100644
--- a/drivers/media/platform/verisilicon/hantro_drv.c
+++ b/drivers/media/platform/verisilicon/hantro_drv.c
@@ -235,8 +235,10 @@ queue_init(void *priv, struct vb2_queue *src_vq, struct vb2_queue *dst_vq)
 	 * The Kernel needs access to the JPEG destination buffer for the
 	 * JPEG encoder to fill in the JPEG headers.
 	 */
-	if (!ctx->is_encoder)
+	if (!ctx->is_encoder) {
 		dst_vq->dma_attrs |= DMA_ATTR_NO_KERNEL_MAPPING;
+		dst_vq->max_num_buffers = MAX_POSTPROC_BUFFERS;
+	}
 
 	dst_vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
 	dst_vq->io_modes = VB2_MMAP | VB2_DMABUF;
diff --git a/drivers/media/platform/verisilicon/hantro_hw.h b/drivers/media/platform/verisilicon/hantro_hw.h
index 7f33f7b07ce4..292a76ef643e 100644
--- a/drivers/media/platform/verisilicon/hantro_hw.h
+++ b/drivers/media/platform/verisilicon/hantro_hw.h
@@ -40,6 +40,8 @@
 
 #define AV1_MAX_FRAME_BUF_COUNT	(V4L2_AV1_TOTAL_REFS_PER_FRAME + 1)
 
+#define MAX_POSTPROC_BUFFERS	64
+
 struct hantro_dev;
 struct hantro_ctx;
 struct hantro_buf;
@@ -336,7 +338,7 @@ struct hantro_av1_dec_hw_ctx {
  * @dec_q:		References buffers, in decoder format.
  */
 struct hantro_postproc_ctx {
-	struct hantro_aux_buf dec_q[VB2_MAX_FRAME];
+	struct hantro_aux_buf dec_q[MAX_POSTPROC_BUFFERS];
 };
 
 /**
diff --git a/drivers/media/platform/verisilicon/hantro_postproc.c b/drivers/media/platform/verisilicon/hantro_postproc.c
index 8f8f17e671ce..41e93176300b 100644
--- a/drivers/media/platform/verisilicon/hantro_postproc.c
+++ b/drivers/media/platform/verisilicon/hantro_postproc.c
@@ -177,9 +177,11 @@ static int hantro_postproc_g2_enum_framesizes(struct hantro_ctx *ctx,
 void hantro_postproc_free(struct hantro_ctx *ctx)
 {
 	struct hantro_dev *vpu = ctx->dev;
+	struct v4l2_m2m_ctx *m2m_ctx = ctx->fh.m2m_ctx;
+	struct vb2_queue *queue = &m2m_ctx->cap_q_ctx.q;
 	unsigned int i;
 
-	for (i = 0; i < VB2_MAX_FRAME; ++i) {
+	for (i = 0; i < queue->max_num_buffers; ++i) {
 		struct hantro_aux_buf *priv = &ctx->postproc.dec_q[i];
 
 		if (priv->cpu) {
@@ -190,20 +192,17 @@ void hantro_postproc_free(struct hantro_ctx *ctx)
 	}
 }
 
-int hantro_postproc_alloc(struct hantro_ctx *ctx)
+static unsigned int hantro_postproc_buffer_size(struct hantro_ctx *ctx)
 {
-	struct hantro_dev *vpu = ctx->dev;
-	struct v4l2_m2m_ctx *m2m_ctx = ctx->fh.m2m_ctx;
-	struct vb2_queue *cap_queue = &m2m_ctx->cap_q_ctx.q;
-	unsigned int num_buffers = vb2_get_num_buffers(cap_queue);
 	struct v4l2_pix_format_mplane pix_mp;
 	const struct hantro_fmt *fmt;
-	unsigned int i, buf_size;
+	unsigned int buf_size;
 
 	/* this should always pick native format */
 	fmt = hantro_get_default_fmt(ctx, false, ctx->bit_depth, HANTRO_AUTO_POSTPROC);
 	if (!fmt)
-		return -EINVAL;
+		return 0;
+
 	v4l2_fill_pixfmt_mp(&pix_mp, fmt->fourcc, ctx->src_fmt.width,
 			    ctx->src_fmt.height);
 
@@ -221,23 +220,77 @@ int hantro_postproc_alloc(struct hantro_ctx *ctx)
 		buf_size += hantro_av1_mv_size(pix_mp.width,
 					       pix_mp.height);
 
-	for (i = 0; i < num_buffers; ++i) {
-		struct hantro_aux_buf *priv = &ctx->postproc.dec_q[i];
+	return buf_size;
+}
+
+static int hantro_postproc_alloc(struct hantro_ctx *ctx, int index)
+{
+	struct hantro_dev *vpu = ctx->dev;
+	struct hantro_aux_buf *priv = &ctx->postproc.dec_q[index];
+	unsigned int buf_size = hantro_postproc_buffer_size(ctx);
+
+	if (!buf_size)
+		return -EINVAL;
+
+	/*
+	 * The buffers on this queue are meant as intermediate
+	 * buffers for the decoder, so no mapping is needed.
+	 */
+	priv->attrs = DMA_ATTR_NO_KERNEL_MAPPING;
+	priv->cpu = dma_alloc_attrs(vpu->dev, buf_size, &priv->dma,
+				    GFP_KERNEL, priv->attrs);
+	if (!priv->cpu)
+		return -ENOMEM;
+	priv->size = buf_size;
+
+	return 0;
+}
 
-		/*
-		 * The buffers on this queue are meant as intermediate
-		 * buffers for the decoder, so no mapping is needed.
-		 */
-		priv->attrs = DMA_ATTR_NO_KERNEL_MAPPING;
-		priv->cpu = dma_alloc_attrs(vpu->dev, buf_size, &priv->dma,
-					    GFP_KERNEL, priv->attrs);
-		if (!priv->cpu)
-			return -ENOMEM;
-		priv->size = buf_size;
+int hantro_postproc_init(struct hantro_ctx *ctx)
+{
+	struct v4l2_m2m_ctx *m2m_ctx = ctx->fh.m2m_ctx;
+	struct vb2_queue *cap_queue = &m2m_ctx->cap_q_ctx.q;
+	unsigned int num_buffers = vb2_get_num_buffers(cap_queue);
+	unsigned int i;
+	int ret;
+
+	for (i = 0; i < num_buffers; i++) {
+		ret = hantro_postproc_alloc(ctx, i);
+		if (ret)
+			return ret;
 	}
+
 	return 0;
 }
 
+dma_addr_t
+hantro_postproc_get_dec_buf_addr(struct hantro_ctx *ctx, int index)
+{
+	struct hantro_aux_buf *priv = &ctx->postproc.dec_q[index];
+	unsigned int buf_size = hantro_postproc_buffer_size(ctx);
+	struct hantro_dev *vpu = ctx->dev;
+	int ret;
+
+	if (priv->size < buf_size && priv->cpu) {
+		/* buffer is too small, release it */
+		dma_free_attrs(vpu->dev, priv->size, priv->cpu,
+			       priv->dma, priv->attrs);
+		priv->cpu = NULL;
+	}
+
+	if (!priv->cpu) {
+		/* buffer not already allocated, try getting a new one */
+		ret = hantro_postproc_alloc(ctx, index);
+		if (ret)
+			return 0;
+	}
+
+	if (!priv->cpu)
+		return 0;
+
+	return priv->dma;
+}
+
 static void hantro_postproc_g1_disable(struct hantro_ctx *ctx)
 {
 	struct hantro_dev *vpu = ctx->dev;
diff --git a/drivers/media/platform/verisilicon/hantro_v4l2.c b/drivers/media/platform/verisilicon/hantro_v4l2.c
index b3ae037a50f6..f0d8b165abcd 100644
--- a/drivers/media/platform/verisilicon/hantro_v4l2.c
+++ b/drivers/media/platform/verisilicon/hantro_v4l2.c
@@ -933,7 +933,7 @@ static int hantro_start_streaming(struct vb2_queue *q, unsigned int count)
 		}
 
 		if (hantro_needs_postproc(ctx, ctx->vpu_dst_fmt)) {
-			ret = hantro_postproc_alloc(ctx);
+			ret = hantro_postproc_init(ctx);
 			if (ret)
 				goto err_codec_exit;
 		}
-- 
2.39.2


WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Gaignard <benjamin.gaignard@collabora.com>
To: mchehab@kernel.org, tfiga@chromium.org, m.szyprowski@samsung.com,
	ming.qian@nxp.com, ezequiel@vanguardiasur.com.ar,
	p.zabel@pengutronix.de, gregkh@linuxfoundation.org,
	hverkuil-cisco@xs4all.nl, nicolas.dufresne@collabora.com
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	linux-arm-msm@vger.kernel.org,
	linux-rockchip@lists.infradead.org,
	linux-staging@lists.linux.dev, kernel@collabora.com,
	Benjamin Gaignard <benjamin.gaignard@collabora.com>
Subject: [PATCH v14 47/56] media: verisilicon: Refactor postprocessor to store more buffers
Date: Tue, 31 Oct 2023 17:30:55 +0100	[thread overview]
Message-ID: <20231031163104.112469-48-benjamin.gaignard@collabora.com> (raw)
In-Reply-To: <20231031163104.112469-1-benjamin.gaignard@collabora.com>

Since vb2 queue can store more than VB2_MAX_FRAME buffers, the
postprocessor buffer storage must be capable to store more buffers too.
Change static dec_q array to allocated array to be capable to store
up to queue 'max_num_buffers'.
Keep allocating queue 'num_buffers' at queue setup time but also allows
to allocate postprocessors buffers on the fly.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
CC: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
CC: Philipp Zabel <p.zabel@pengutronix.de>
---
 drivers/media/platform/verisilicon/hantro.h   |  7 +-
 .../media/platform/verisilicon/hantro_drv.c   |  4 +-
 .../media/platform/verisilicon/hantro_hw.h    |  4 +-
 .../platform/verisilicon/hantro_postproc.c    | 93 +++++++++++++++----
 .../media/platform/verisilicon/hantro_v4l2.c  |  2 +-
 5 files changed, 85 insertions(+), 25 deletions(-)

diff --git a/drivers/media/platform/verisilicon/hantro.h b/drivers/media/platform/verisilicon/hantro.h
index 77aee9489516..0948b04a9f8d 100644
--- a/drivers/media/platform/verisilicon/hantro.h
+++ b/drivers/media/platform/verisilicon/hantro.h
@@ -469,11 +469,14 @@ hantro_get_dst_buf(struct hantro_ctx *ctx)
 bool hantro_needs_postproc(const struct hantro_ctx *ctx,
 			   const struct hantro_fmt *fmt);
 
+dma_addr_t
+hantro_postproc_get_dec_buf_addr(struct hantro_ctx *ctx, int index);
+
 static inline dma_addr_t
 hantro_get_dec_buf_addr(struct hantro_ctx *ctx, struct vb2_buffer *vb)
 {
 	if (hantro_needs_postproc(ctx, ctx->vpu_dst_fmt))
-		return ctx->postproc.dec_q[vb->index].dma;
+		return hantro_postproc_get_dec_buf_addr(ctx, vb->index);
 	return vb2_dma_contig_plane_dma_addr(vb, 0);
 }
 
@@ -485,8 +488,8 @@ vb2_to_hantro_decoded_buf(struct vb2_buffer *buf)
 
 void hantro_postproc_disable(struct hantro_ctx *ctx);
 void hantro_postproc_enable(struct hantro_ctx *ctx);
+int hantro_postproc_init(struct hantro_ctx *ctx);
 void hantro_postproc_free(struct hantro_ctx *ctx);
-int hantro_postproc_alloc(struct hantro_ctx *ctx);
 int hanto_postproc_enum_framesizes(struct hantro_ctx *ctx,
 				   struct v4l2_frmsizeenum *fsize);
 
diff --git a/drivers/media/platform/verisilicon/hantro_drv.c b/drivers/media/platform/verisilicon/hantro_drv.c
index a9fa05ac56a9..7f5b82eb6649 100644
--- a/drivers/media/platform/verisilicon/hantro_drv.c
+++ b/drivers/media/platform/verisilicon/hantro_drv.c
@@ -235,8 +235,10 @@ queue_init(void *priv, struct vb2_queue *src_vq, struct vb2_queue *dst_vq)
 	 * The Kernel needs access to the JPEG destination buffer for the
 	 * JPEG encoder to fill in the JPEG headers.
 	 */
-	if (!ctx->is_encoder)
+	if (!ctx->is_encoder) {
 		dst_vq->dma_attrs |= DMA_ATTR_NO_KERNEL_MAPPING;
+		dst_vq->max_num_buffers = MAX_POSTPROC_BUFFERS;
+	}
 
 	dst_vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
 	dst_vq->io_modes = VB2_MMAP | VB2_DMABUF;
diff --git a/drivers/media/platform/verisilicon/hantro_hw.h b/drivers/media/platform/verisilicon/hantro_hw.h
index 7f33f7b07ce4..292a76ef643e 100644
--- a/drivers/media/platform/verisilicon/hantro_hw.h
+++ b/drivers/media/platform/verisilicon/hantro_hw.h
@@ -40,6 +40,8 @@
 
 #define AV1_MAX_FRAME_BUF_COUNT	(V4L2_AV1_TOTAL_REFS_PER_FRAME + 1)
 
+#define MAX_POSTPROC_BUFFERS	64
+
 struct hantro_dev;
 struct hantro_ctx;
 struct hantro_buf;
@@ -336,7 +338,7 @@ struct hantro_av1_dec_hw_ctx {
  * @dec_q:		References buffers, in decoder format.
  */
 struct hantro_postproc_ctx {
-	struct hantro_aux_buf dec_q[VB2_MAX_FRAME];
+	struct hantro_aux_buf dec_q[MAX_POSTPROC_BUFFERS];
 };
 
 /**
diff --git a/drivers/media/platform/verisilicon/hantro_postproc.c b/drivers/media/platform/verisilicon/hantro_postproc.c
index 8f8f17e671ce..41e93176300b 100644
--- a/drivers/media/platform/verisilicon/hantro_postproc.c
+++ b/drivers/media/platform/verisilicon/hantro_postproc.c
@@ -177,9 +177,11 @@ static int hantro_postproc_g2_enum_framesizes(struct hantro_ctx *ctx,
 void hantro_postproc_free(struct hantro_ctx *ctx)
 {
 	struct hantro_dev *vpu = ctx->dev;
+	struct v4l2_m2m_ctx *m2m_ctx = ctx->fh.m2m_ctx;
+	struct vb2_queue *queue = &m2m_ctx->cap_q_ctx.q;
 	unsigned int i;
 
-	for (i = 0; i < VB2_MAX_FRAME; ++i) {
+	for (i = 0; i < queue->max_num_buffers; ++i) {
 		struct hantro_aux_buf *priv = &ctx->postproc.dec_q[i];
 
 		if (priv->cpu) {
@@ -190,20 +192,17 @@ void hantro_postproc_free(struct hantro_ctx *ctx)
 	}
 }
 
-int hantro_postproc_alloc(struct hantro_ctx *ctx)
+static unsigned int hantro_postproc_buffer_size(struct hantro_ctx *ctx)
 {
-	struct hantro_dev *vpu = ctx->dev;
-	struct v4l2_m2m_ctx *m2m_ctx = ctx->fh.m2m_ctx;
-	struct vb2_queue *cap_queue = &m2m_ctx->cap_q_ctx.q;
-	unsigned int num_buffers = vb2_get_num_buffers(cap_queue);
 	struct v4l2_pix_format_mplane pix_mp;
 	const struct hantro_fmt *fmt;
-	unsigned int i, buf_size;
+	unsigned int buf_size;
 
 	/* this should always pick native format */
 	fmt = hantro_get_default_fmt(ctx, false, ctx->bit_depth, HANTRO_AUTO_POSTPROC);
 	if (!fmt)
-		return -EINVAL;
+		return 0;
+
 	v4l2_fill_pixfmt_mp(&pix_mp, fmt->fourcc, ctx->src_fmt.width,
 			    ctx->src_fmt.height);
 
@@ -221,23 +220,77 @@ int hantro_postproc_alloc(struct hantro_ctx *ctx)
 		buf_size += hantro_av1_mv_size(pix_mp.width,
 					       pix_mp.height);
 
-	for (i = 0; i < num_buffers; ++i) {
-		struct hantro_aux_buf *priv = &ctx->postproc.dec_q[i];
+	return buf_size;
+}
+
+static int hantro_postproc_alloc(struct hantro_ctx *ctx, int index)
+{
+	struct hantro_dev *vpu = ctx->dev;
+	struct hantro_aux_buf *priv = &ctx->postproc.dec_q[index];
+	unsigned int buf_size = hantro_postproc_buffer_size(ctx);
+
+	if (!buf_size)
+		return -EINVAL;
+
+	/*
+	 * The buffers on this queue are meant as intermediate
+	 * buffers for the decoder, so no mapping is needed.
+	 */
+	priv->attrs = DMA_ATTR_NO_KERNEL_MAPPING;
+	priv->cpu = dma_alloc_attrs(vpu->dev, buf_size, &priv->dma,
+				    GFP_KERNEL, priv->attrs);
+	if (!priv->cpu)
+		return -ENOMEM;
+	priv->size = buf_size;
+
+	return 0;
+}
 
-		/*
-		 * The buffers on this queue are meant as intermediate
-		 * buffers for the decoder, so no mapping is needed.
-		 */
-		priv->attrs = DMA_ATTR_NO_KERNEL_MAPPING;
-		priv->cpu = dma_alloc_attrs(vpu->dev, buf_size, &priv->dma,
-					    GFP_KERNEL, priv->attrs);
-		if (!priv->cpu)
-			return -ENOMEM;
-		priv->size = buf_size;
+int hantro_postproc_init(struct hantro_ctx *ctx)
+{
+	struct v4l2_m2m_ctx *m2m_ctx = ctx->fh.m2m_ctx;
+	struct vb2_queue *cap_queue = &m2m_ctx->cap_q_ctx.q;
+	unsigned int num_buffers = vb2_get_num_buffers(cap_queue);
+	unsigned int i;
+	int ret;
+
+	for (i = 0; i < num_buffers; i++) {
+		ret = hantro_postproc_alloc(ctx, i);
+		if (ret)
+			return ret;
 	}
+
 	return 0;
 }
 
+dma_addr_t
+hantro_postproc_get_dec_buf_addr(struct hantro_ctx *ctx, int index)
+{
+	struct hantro_aux_buf *priv = &ctx->postproc.dec_q[index];
+	unsigned int buf_size = hantro_postproc_buffer_size(ctx);
+	struct hantro_dev *vpu = ctx->dev;
+	int ret;
+
+	if (priv->size < buf_size && priv->cpu) {
+		/* buffer is too small, release it */
+		dma_free_attrs(vpu->dev, priv->size, priv->cpu,
+			       priv->dma, priv->attrs);
+		priv->cpu = NULL;
+	}
+
+	if (!priv->cpu) {
+		/* buffer not already allocated, try getting a new one */
+		ret = hantro_postproc_alloc(ctx, index);
+		if (ret)
+			return 0;
+	}
+
+	if (!priv->cpu)
+		return 0;
+
+	return priv->dma;
+}
+
 static void hantro_postproc_g1_disable(struct hantro_ctx *ctx)
 {
 	struct hantro_dev *vpu = ctx->dev;
diff --git a/drivers/media/platform/verisilicon/hantro_v4l2.c b/drivers/media/platform/verisilicon/hantro_v4l2.c
index b3ae037a50f6..f0d8b165abcd 100644
--- a/drivers/media/platform/verisilicon/hantro_v4l2.c
+++ b/drivers/media/platform/verisilicon/hantro_v4l2.c
@@ -933,7 +933,7 @@ static int hantro_start_streaming(struct vb2_queue *q, unsigned int count)
 		}
 
 		if (hantro_needs_postproc(ctx, ctx->vpu_dst_fmt)) {
-			ret = hantro_postproc_alloc(ctx);
+			ret = hantro_postproc_init(ctx);
 			if (ret)
 				goto err_codec_exit;
 		}
-- 
2.39.2


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Gaignard <benjamin.gaignard@collabora.com>
To: mchehab@kernel.org, tfiga@chromium.org, m.szyprowski@samsung.com,
	ming.qian@nxp.com, ezequiel@vanguardiasur.com.ar,
	p.zabel@pengutronix.de, gregkh@linuxfoundation.org,
	hverkuil-cisco@xs4all.nl, nicolas.dufresne@collabora.com
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	linux-arm-msm@vger.kernel.org,
	linux-rockchip@lists.infradead.org,
	linux-staging@lists.linux.dev, kernel@collabora.com,
	Benjamin Gaignard <benjamin.gaignard@collabora.com>
Subject: [PATCH v14 47/56] media: verisilicon: Refactor postprocessor to store more buffers
Date: Tue, 31 Oct 2023 17:30:55 +0100	[thread overview]
Message-ID: <20231031163104.112469-48-benjamin.gaignard@collabora.com> (raw)
In-Reply-To: <20231031163104.112469-1-benjamin.gaignard@collabora.com>

Since vb2 queue can store more than VB2_MAX_FRAME buffers, the
postprocessor buffer storage must be capable to store more buffers too.
Change static dec_q array to allocated array to be capable to store
up to queue 'max_num_buffers'.
Keep allocating queue 'num_buffers' at queue setup time but also allows
to allocate postprocessors buffers on the fly.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
CC: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
CC: Philipp Zabel <p.zabel@pengutronix.de>
---
 drivers/media/platform/verisilicon/hantro.h   |  7 +-
 .../media/platform/verisilicon/hantro_drv.c   |  4 +-
 .../media/platform/verisilicon/hantro_hw.h    |  4 +-
 .../platform/verisilicon/hantro_postproc.c    | 93 +++++++++++++++----
 .../media/platform/verisilicon/hantro_v4l2.c  |  2 +-
 5 files changed, 85 insertions(+), 25 deletions(-)

diff --git a/drivers/media/platform/verisilicon/hantro.h b/drivers/media/platform/verisilicon/hantro.h
index 77aee9489516..0948b04a9f8d 100644
--- a/drivers/media/platform/verisilicon/hantro.h
+++ b/drivers/media/platform/verisilicon/hantro.h
@@ -469,11 +469,14 @@ hantro_get_dst_buf(struct hantro_ctx *ctx)
 bool hantro_needs_postproc(const struct hantro_ctx *ctx,
 			   const struct hantro_fmt *fmt);
 
+dma_addr_t
+hantro_postproc_get_dec_buf_addr(struct hantro_ctx *ctx, int index);
+
 static inline dma_addr_t
 hantro_get_dec_buf_addr(struct hantro_ctx *ctx, struct vb2_buffer *vb)
 {
 	if (hantro_needs_postproc(ctx, ctx->vpu_dst_fmt))
-		return ctx->postproc.dec_q[vb->index].dma;
+		return hantro_postproc_get_dec_buf_addr(ctx, vb->index);
 	return vb2_dma_contig_plane_dma_addr(vb, 0);
 }
 
@@ -485,8 +488,8 @@ vb2_to_hantro_decoded_buf(struct vb2_buffer *buf)
 
 void hantro_postproc_disable(struct hantro_ctx *ctx);
 void hantro_postproc_enable(struct hantro_ctx *ctx);
+int hantro_postproc_init(struct hantro_ctx *ctx);
 void hantro_postproc_free(struct hantro_ctx *ctx);
-int hantro_postproc_alloc(struct hantro_ctx *ctx);
 int hanto_postproc_enum_framesizes(struct hantro_ctx *ctx,
 				   struct v4l2_frmsizeenum *fsize);
 
diff --git a/drivers/media/platform/verisilicon/hantro_drv.c b/drivers/media/platform/verisilicon/hantro_drv.c
index a9fa05ac56a9..7f5b82eb6649 100644
--- a/drivers/media/platform/verisilicon/hantro_drv.c
+++ b/drivers/media/platform/verisilicon/hantro_drv.c
@@ -235,8 +235,10 @@ queue_init(void *priv, struct vb2_queue *src_vq, struct vb2_queue *dst_vq)
 	 * The Kernel needs access to the JPEG destination buffer for the
 	 * JPEG encoder to fill in the JPEG headers.
 	 */
-	if (!ctx->is_encoder)
+	if (!ctx->is_encoder) {
 		dst_vq->dma_attrs |= DMA_ATTR_NO_KERNEL_MAPPING;
+		dst_vq->max_num_buffers = MAX_POSTPROC_BUFFERS;
+	}
 
 	dst_vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
 	dst_vq->io_modes = VB2_MMAP | VB2_DMABUF;
diff --git a/drivers/media/platform/verisilicon/hantro_hw.h b/drivers/media/platform/verisilicon/hantro_hw.h
index 7f33f7b07ce4..292a76ef643e 100644
--- a/drivers/media/platform/verisilicon/hantro_hw.h
+++ b/drivers/media/platform/verisilicon/hantro_hw.h
@@ -40,6 +40,8 @@
 
 #define AV1_MAX_FRAME_BUF_COUNT	(V4L2_AV1_TOTAL_REFS_PER_FRAME + 1)
 
+#define MAX_POSTPROC_BUFFERS	64
+
 struct hantro_dev;
 struct hantro_ctx;
 struct hantro_buf;
@@ -336,7 +338,7 @@ struct hantro_av1_dec_hw_ctx {
  * @dec_q:		References buffers, in decoder format.
  */
 struct hantro_postproc_ctx {
-	struct hantro_aux_buf dec_q[VB2_MAX_FRAME];
+	struct hantro_aux_buf dec_q[MAX_POSTPROC_BUFFERS];
 };
 
 /**
diff --git a/drivers/media/platform/verisilicon/hantro_postproc.c b/drivers/media/platform/verisilicon/hantro_postproc.c
index 8f8f17e671ce..41e93176300b 100644
--- a/drivers/media/platform/verisilicon/hantro_postproc.c
+++ b/drivers/media/platform/verisilicon/hantro_postproc.c
@@ -177,9 +177,11 @@ static int hantro_postproc_g2_enum_framesizes(struct hantro_ctx *ctx,
 void hantro_postproc_free(struct hantro_ctx *ctx)
 {
 	struct hantro_dev *vpu = ctx->dev;
+	struct v4l2_m2m_ctx *m2m_ctx = ctx->fh.m2m_ctx;
+	struct vb2_queue *queue = &m2m_ctx->cap_q_ctx.q;
 	unsigned int i;
 
-	for (i = 0; i < VB2_MAX_FRAME; ++i) {
+	for (i = 0; i < queue->max_num_buffers; ++i) {
 		struct hantro_aux_buf *priv = &ctx->postproc.dec_q[i];
 
 		if (priv->cpu) {
@@ -190,20 +192,17 @@ void hantro_postproc_free(struct hantro_ctx *ctx)
 	}
 }
 
-int hantro_postproc_alloc(struct hantro_ctx *ctx)
+static unsigned int hantro_postproc_buffer_size(struct hantro_ctx *ctx)
 {
-	struct hantro_dev *vpu = ctx->dev;
-	struct v4l2_m2m_ctx *m2m_ctx = ctx->fh.m2m_ctx;
-	struct vb2_queue *cap_queue = &m2m_ctx->cap_q_ctx.q;
-	unsigned int num_buffers = vb2_get_num_buffers(cap_queue);
 	struct v4l2_pix_format_mplane pix_mp;
 	const struct hantro_fmt *fmt;
-	unsigned int i, buf_size;
+	unsigned int buf_size;
 
 	/* this should always pick native format */
 	fmt = hantro_get_default_fmt(ctx, false, ctx->bit_depth, HANTRO_AUTO_POSTPROC);
 	if (!fmt)
-		return -EINVAL;
+		return 0;
+
 	v4l2_fill_pixfmt_mp(&pix_mp, fmt->fourcc, ctx->src_fmt.width,
 			    ctx->src_fmt.height);
 
@@ -221,23 +220,77 @@ int hantro_postproc_alloc(struct hantro_ctx *ctx)
 		buf_size += hantro_av1_mv_size(pix_mp.width,
 					       pix_mp.height);
 
-	for (i = 0; i < num_buffers; ++i) {
-		struct hantro_aux_buf *priv = &ctx->postproc.dec_q[i];
+	return buf_size;
+}
+
+static int hantro_postproc_alloc(struct hantro_ctx *ctx, int index)
+{
+	struct hantro_dev *vpu = ctx->dev;
+	struct hantro_aux_buf *priv = &ctx->postproc.dec_q[index];
+	unsigned int buf_size = hantro_postproc_buffer_size(ctx);
+
+	if (!buf_size)
+		return -EINVAL;
+
+	/*
+	 * The buffers on this queue are meant as intermediate
+	 * buffers for the decoder, so no mapping is needed.
+	 */
+	priv->attrs = DMA_ATTR_NO_KERNEL_MAPPING;
+	priv->cpu = dma_alloc_attrs(vpu->dev, buf_size, &priv->dma,
+				    GFP_KERNEL, priv->attrs);
+	if (!priv->cpu)
+		return -ENOMEM;
+	priv->size = buf_size;
+
+	return 0;
+}
 
-		/*
-		 * The buffers on this queue are meant as intermediate
-		 * buffers for the decoder, so no mapping is needed.
-		 */
-		priv->attrs = DMA_ATTR_NO_KERNEL_MAPPING;
-		priv->cpu = dma_alloc_attrs(vpu->dev, buf_size, &priv->dma,
-					    GFP_KERNEL, priv->attrs);
-		if (!priv->cpu)
-			return -ENOMEM;
-		priv->size = buf_size;
+int hantro_postproc_init(struct hantro_ctx *ctx)
+{
+	struct v4l2_m2m_ctx *m2m_ctx = ctx->fh.m2m_ctx;
+	struct vb2_queue *cap_queue = &m2m_ctx->cap_q_ctx.q;
+	unsigned int num_buffers = vb2_get_num_buffers(cap_queue);
+	unsigned int i;
+	int ret;
+
+	for (i = 0; i < num_buffers; i++) {
+		ret = hantro_postproc_alloc(ctx, i);
+		if (ret)
+			return ret;
 	}
+
 	return 0;
 }
 
+dma_addr_t
+hantro_postproc_get_dec_buf_addr(struct hantro_ctx *ctx, int index)
+{
+	struct hantro_aux_buf *priv = &ctx->postproc.dec_q[index];
+	unsigned int buf_size = hantro_postproc_buffer_size(ctx);
+	struct hantro_dev *vpu = ctx->dev;
+	int ret;
+
+	if (priv->size < buf_size && priv->cpu) {
+		/* buffer is too small, release it */
+		dma_free_attrs(vpu->dev, priv->size, priv->cpu,
+			       priv->dma, priv->attrs);
+		priv->cpu = NULL;
+	}
+
+	if (!priv->cpu) {
+		/* buffer not already allocated, try getting a new one */
+		ret = hantro_postproc_alloc(ctx, index);
+		if (ret)
+			return 0;
+	}
+
+	if (!priv->cpu)
+		return 0;
+
+	return priv->dma;
+}
+
 static void hantro_postproc_g1_disable(struct hantro_ctx *ctx)
 {
 	struct hantro_dev *vpu = ctx->dev;
diff --git a/drivers/media/platform/verisilicon/hantro_v4l2.c b/drivers/media/platform/verisilicon/hantro_v4l2.c
index b3ae037a50f6..f0d8b165abcd 100644
--- a/drivers/media/platform/verisilicon/hantro_v4l2.c
+++ b/drivers/media/platform/verisilicon/hantro_v4l2.c
@@ -933,7 +933,7 @@ static int hantro_start_streaming(struct vb2_queue *q, unsigned int count)
 		}
 
 		if (hantro_needs_postproc(ctx, ctx->vpu_dst_fmt)) {
-			ret = hantro_postproc_alloc(ctx);
+			ret = hantro_postproc_init(ctx);
 			if (ret)
 				goto err_codec_exit;
 		}
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2023-10-31 16:32 UTC|newest]

Thread overview: 399+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-31 16:30 [PATCH v14 00/56] Add DELETE_BUF ioctl Benjamin Gaignard
2023-10-31 16:30 ` Benjamin Gaignard
2023-10-31 16:30 ` Benjamin Gaignard
2023-10-31 16:30 ` [PATCH v14 01/56] media: videobuf2: Rename offset parameter Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-08 15:11   ` Andrzej Pietrasiewicz
2023-11-08 15:11     ` Andrzej Pietrasiewicz
2023-11-08 15:11     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 02/56] media: videobuf2: Rework offset 'cookie' encoding pattern Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-08  6:23   ` Tomasz Figa
2023-11-08  6:23     ` Tomasz Figa
2023-11-08  6:23     ` Tomasz Figa
2023-11-08 10:14     ` Benjamin Gaignard
2023-11-08 10:14       ` Benjamin Gaignard
2023-11-08 10:14       ` Benjamin Gaignard
2023-11-08 10:31       ` Hans Verkuil
2023-11-08 10:31         ` Hans Verkuil
2023-11-08 10:31         ` Hans Verkuil
2023-10-31 16:30 ` [PATCH v14 03/56] media: videobuf2: Stop spamming kernel log with all queue counter Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-08 15:26   ` Andrzej Pietrasiewicz
2023-11-08 15:26     ` Andrzej Pietrasiewicz
2023-11-08 15:26     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 04/56] media: videobuf2: Use vb2_buffer instead of index Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-08  8:08   ` Tomasz Figa
2023-11-08  8:08     ` Tomasz Figa
2023-11-08  8:08     ` Tomasz Figa
2023-11-08 15:52   ` Andrzej Pietrasiewicz
2023-11-08 15:52     ` Andrzej Pietrasiewicz
2023-11-08 15:52     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 05/56] media: videobuf2: Access vb2_queue bufs array through helper functions Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-08  8:50   ` Tomasz Figa
2023-11-08  8:50     ` Tomasz Figa
2023-11-08  8:50     ` Tomasz Figa
2023-11-08 10:24     ` Benjamin Gaignard
2023-11-08 10:24       ` Benjamin Gaignard
2023-11-08 10:24       ` Benjamin Gaignard
2023-11-09  4:27       ` Tomasz Figa
2023-11-09  4:27         ` Tomasz Figa
2023-11-09  4:27         ` Tomasz Figa
2023-10-31 16:30 ` [PATCH v14 06/56] media: videobuf2: Remove duplicated index vs q->num_buffers check Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-08 16:46   ` Andrzej Pietrasiewicz
2023-11-08 16:46     ` Andrzej Pietrasiewicz
2023-11-08 16:46     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 07/56] media: videobuf2: Add helper to get queue number of buffers Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-08 16:50   ` Andrzej Pietrasiewicz
2023-11-08 16:50     ` Andrzej Pietrasiewicz
2023-11-08 16:50     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 08/56] media: videobuf2: Use vb2_get_num_buffers() helper Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-08  9:42   ` Tomasz Figa
2023-11-08  9:42     ` Tomasz Figa
2023-11-08  9:42     ` Tomasz Figa
2023-11-08 13:22     ` Benjamin Gaignard
2023-11-08 13:22       ` Benjamin Gaignard
2023-11-08 13:22       ` Benjamin Gaignard
2023-11-09  4:36       ` Tomasz Figa
2023-11-09  4:36         ` Tomasz Figa
2023-11-09  4:36         ` Tomasz Figa
2023-10-31 16:30 ` [PATCH v14 09/56] media: amphion: Use vb2_get_buffer() instead of directly access to buffers array Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-08 16:55   ` Andrzej Pietrasiewicz
2023-11-08 16:55     ` Andrzej Pietrasiewicz
2023-11-08 16:55     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 10/56] media: amphion: Stop direct calls to queue num_buffers field Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-08 16:56   ` Andrzej Pietrasiewicz
2023-11-08 16:56     ` Andrzej Pietrasiewicz
2023-11-08 16:56     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 11/56] media: mediatek: jpeg: Use vb2_get_buffer() instead of directly access to buffers array Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-08 17:00   ` Andrzej Pietrasiewicz
2023-11-08 17:00     ` Andrzej Pietrasiewicz
2023-11-08 17:00     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 12/56] media: mediatek: vdec: Remove useless loop Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09  9:15   ` Andrzej Pietrasiewicz
2023-11-09  9:15     ` Andrzej Pietrasiewicz
2023-11-09  9:15     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 13/56] media: mediatek: vcodec: Stop direct calls to queue num_buffers field Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09  9:21   ` Andrzej Pietrasiewicz
2023-11-09  9:21     ` Andrzej Pietrasiewicz
2023-11-09  9:21     ` Andrzej Pietrasiewicz
2023-11-09  9:23   ` Andrzej Pietrasiewicz
2023-11-09  9:23     ` Andrzej Pietrasiewicz
2023-11-09  9:23     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 14/56] media: sti: hva: Use vb2_get_buffer() instead of directly access to buffers array Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09  9:29   ` Andrzej Pietrasiewicz
2023-11-09  9:29     ` Andrzej Pietrasiewicz
2023-11-09  9:29     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 15/56] media: visl: " Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09  9:38   ` Andrzej Pietrasiewicz
2023-11-09  9:38     ` Andrzej Pietrasiewicz
2023-11-09  9:38     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 16/56] media: atomisp: " Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30 ` [PATCH v14 17/56] media: atomisp: Stop direct calls to queue num_buffers field Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30 ` [PATCH v14 18/56] media: dvb-core: Use vb2_get_buffer() instead of directly access to buffers array Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09  9:46   ` Andrzej Pietrasiewicz
2023-11-09  9:46     ` Andrzej Pietrasiewicz
2023-11-09  9:46     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 19/56] media: dvb-core: Do not initialize twice queue num_buffer field Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09  9:50   ` Andrzej Pietrasiewicz
2023-11-09  9:50     ` Andrzej Pietrasiewicz
2023-11-09  9:50     ` Andrzej Pietrasiewicz
2023-11-09 10:14     ` Benjamin Gaignard
2023-11-09 10:14       ` Benjamin Gaignard
2023-11-09 10:14       ` Benjamin Gaignard
2023-10-31 16:30 ` [PATCH v14 20/56] media: dvb-frontends: rtl2832: Stop direct calls to queue num_buffers field Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09  9:56   ` Andrzej Pietrasiewicz
2023-11-09  9:56     ` Andrzej Pietrasiewicz
2023-11-09  9:56     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 21/56] media: pci: dt3155: Remove useless check Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 10:03   ` Andrzej Pietrasiewicz
2023-11-09 10:03     ` Andrzej Pietrasiewicz
2023-11-09 10:03     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 22/56] media: pci: tw686x: Stop direct calls to queue num_buffers field Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 10:05   ` Andrzej Pietrasiewicz
2023-11-09 10:05     ` Andrzej Pietrasiewicz
2023-11-09 10:05     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 23/56] media: pci: cx18: " Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 10:07   ` Andrzej Pietrasiewicz
2023-11-09 10:07     ` Andrzej Pietrasiewicz
2023-11-09 10:07     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 24/56] media: pci: netup_unidvb: " Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 10:09   ` Andrzej Pietrasiewicz
2023-11-09 10:09     ` Andrzej Pietrasiewicz
2023-11-09 10:09     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 25/56] media: pci: tw68: " Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 10:13   ` Andrzej Pietrasiewicz
2023-11-09 10:13     ` Andrzej Pietrasiewicz
2023-11-09 10:13     ` Andrzej Pietrasiewicz
2023-11-09 10:23     ` Benjamin Gaignard
2023-11-09 10:23       ` Benjamin Gaignard
2023-11-09 10:23       ` Benjamin Gaignard
2023-10-31 16:30 ` [PATCH v14 26/56] media: i2c: video-i2c: " Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 10:18   ` Andrzej Pietrasiewicz
2023-11-09 10:18     ` Andrzej Pietrasiewicz
2023-11-09 10:18     ` Andrzej Pietrasiewicz
2023-11-09 10:26     ` Benjamin Gaignard
2023-11-09 10:26       ` Benjamin Gaignard
2023-11-09 10:26       ` Benjamin Gaignard
2023-10-31 16:30 ` [PATCH v14 27/56] media: coda: " Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 10:22   ` Andrzej Pietrasiewicz
2023-11-09 10:22     ` Andrzej Pietrasiewicz
2023-11-09 10:22     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 28/56] media: nxp: " Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 10:26   ` Andrzej Pietrasiewicz
2023-11-09 10:26     ` Andrzej Pietrasiewicz
2023-11-09 10:26     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 29/56] media: verisilicon: " Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 10:28   ` Andrzej Pietrasiewicz
2023-11-09 10:28     ` Andrzej Pietrasiewicz
2023-11-09 10:28     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 30/56] media: test-drivers: " Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 11:10   ` Andrzej Pietrasiewicz
2023-11-09 11:10     ` Andrzej Pietrasiewicz
2023-11-09 11:10     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 31/56] media: imx: " Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 11:12   ` Andrzej Pietrasiewicz
2023-11-09 11:12     ` Andrzej Pietrasiewicz
2023-11-09 11:12     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 32/56] media: meson: vdec: " Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 11:17   ` Andrzej Pietrasiewicz
2023-11-09 11:17     ` Andrzej Pietrasiewicz
2023-11-09 11:17     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 33/56] touchscreen: sur40: " Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 11:19   ` Andrzej Pietrasiewicz
2023-11-09 11:19     ` Andrzej Pietrasiewicz
2023-11-09 11:19     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 34/56] sample: v4l: " Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 11:19   ` Andrzej Pietrasiewicz
2023-11-09 11:19     ` Andrzej Pietrasiewicz
2023-11-09 11:19     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 35/56] media: cedrus: " Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 11:27   ` Andrzej Pietrasiewicz
2023-11-09 11:27     ` Andrzej Pietrasiewicz
2023-11-09 11:27     ` Andrzej Pietrasiewicz
2023-11-09 14:14     ` Paul Kocialkowski
2023-11-09 14:14       ` Paul Kocialkowski
2023-11-09 14:14       ` Paul Kocialkowski
2023-11-09 15:48       ` Andrzej Pietrasiewicz
2023-11-09 15:48         ` Andrzej Pietrasiewicz
2023-11-09 15:48         ` Andrzej Pietrasiewicz
2023-11-09 15:54         ` Benjamin Gaignard
2023-11-09 15:54           ` Benjamin Gaignard
2023-11-09 15:54           ` Benjamin Gaignard
2023-11-09 16:29           ` Paul Kocialkowski
2023-11-09 16:29             ` Paul Kocialkowski
2023-11-09 16:29             ` Paul Kocialkowski
2023-10-31 16:30 ` [PATCH v14 36/56] media: nuvoton: " Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 11:29   ` Andrzej Pietrasiewicz
2023-11-09 11:29     ` Andrzej Pietrasiewicz
2023-11-09 11:29     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 37/56] media: renesas: " Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 11:30   ` Andrzej Pietrasiewicz
2023-11-09 11:30     ` Andrzej Pietrasiewicz
2023-11-09 11:30     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 38/56] media: ti: " Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 11:32   ` Andrzej Pietrasiewicz
2023-11-09 11:32     ` Andrzej Pietrasiewicz
2023-11-09 11:32     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 39/56] media: usb: airspy: " Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 11:33   ` Andrzej Pietrasiewicz
2023-11-09 11:33     ` Andrzej Pietrasiewicz
2023-11-09 11:33     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 40/56] media: usb: cx231xx: " Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 11:35   ` Andrzej Pietrasiewicz
2023-11-09 11:35     ` Andrzej Pietrasiewicz
2023-11-09 11:35     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 41/56] media: usb: hackrf: " Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 11:36   ` Andrzej Pietrasiewicz
2023-11-09 11:36     ` Andrzej Pietrasiewicz
2023-11-09 11:36     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 42/56] media: usb: usbtv: " Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 11:37   ` Andrzej Pietrasiewicz
2023-11-09 11:37     ` Andrzej Pietrasiewicz
2023-11-09 11:37     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 43/56] media: videobuf2: Be more flexible on the number of queue stored buffers Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-02  8:17   ` Hans Verkuil
2023-11-02  8:17     ` Hans Verkuil
2023-11-02  8:17     ` Hans Verkuil
2023-11-06 14:29     ` Benjamin Gaignard
2023-11-06 14:29       ` Benjamin Gaignard
2023-11-06 14:29       ` Benjamin Gaignard
2023-10-31 16:30 ` [PATCH v14 44/56] media: core: Report the maximum possible number of buffers for the queue Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 12:28   ` Andrzej Pietrasiewicz
2023-11-09 12:28     ` Andrzej Pietrasiewicz
2023-11-09 12:28     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 45/56] media: test-drivers: vivid: Increase max supported buffers for capture queues Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 12:31   ` Andrzej Pietrasiewicz
2023-11-09 12:31     ` Andrzej Pietrasiewicz
2023-11-09 12:31     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 46/56] media: test-drivers: vicodec: Increase max supported capture queue buffers Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 12:32   ` Andrzej Pietrasiewicz
2023-11-09 12:32     ` Andrzej Pietrasiewicz
2023-11-09 12:32     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` Benjamin Gaignard [this message]
2023-10-31 16:30   ` [PATCH v14 47/56] media: verisilicon: Refactor postprocessor to store more buffers Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 13:58   ` Andrzej Pietrasiewicz
2023-11-09 13:58     ` Andrzej Pietrasiewicz
2023-11-09 13:58     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 48/56] media: verisilicon: Store chroma and motion vectors offset Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 14:12   ` Andrzej Pietrasiewicz
2023-11-09 14:12     ` Andrzej Pietrasiewicz
2023-11-09 14:12     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 49/56] media: verisilicon: g2: Use common helpers to compute chroma and mv offsets Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 14:25   ` Andrzej Pietrasiewicz
2023-11-09 14:25     ` Andrzej Pietrasiewicz
2023-11-09 14:25     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 50/56] media: verisilicon: vp9: Allow to change resolution while streaming Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-11-09 14:59   ` Andrzej Pietrasiewicz
2023-11-09 14:59     ` Andrzej Pietrasiewicz
2023-11-09 14:59     ` Andrzej Pietrasiewicz
2023-10-31 16:30 ` [PATCH v14 51/56] media: core: Rework how create_buf index returned value is computed Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:30   ` Benjamin Gaignard
2023-10-31 16:31 ` [PATCH v14 52/56] media: core: Add bitmap manage bufs array entries Benjamin Gaignard
2023-10-31 16:31   ` Benjamin Gaignard
2023-10-31 16:31   ` Benjamin Gaignard
2023-11-08 10:44   ` Tomasz Figa
2023-11-08 10:44     ` Tomasz Figa
2023-11-08 10:44     ` Tomasz Figa
2023-11-08 15:30     ` Benjamin Gaignard
2023-11-08 15:30       ` Benjamin Gaignard
2023-11-08 15:30       ` Benjamin Gaignard
2023-11-09  7:28       ` Tomasz Figa
2023-11-09  7:28         ` Tomasz Figa
2023-11-09  7:28         ` Tomasz Figa
2023-10-31 16:31 ` [PATCH v14 53/56] media: core: Free range of buffers Benjamin Gaignard
2023-10-31 16:31   ` Benjamin Gaignard
2023-10-31 16:31   ` Benjamin Gaignard
2023-11-09  9:10   ` Tomasz Figa
2023-11-09  9:10     ` Tomasz Figa
2023-11-09  9:10     ` Tomasz Figa
2023-10-31 16:31 ` [PATCH v14 54/56] media: v4l2: Add DELETE_BUFS ioctl Benjamin Gaignard
2023-10-31 16:31   ` Benjamin Gaignard
2023-10-31 16:31   ` Benjamin Gaignard
2023-11-09  9:30   ` Tomasz Figa
2023-11-09  9:30     ` Tomasz Figa
2023-11-09  9:30     ` Tomasz Figa
2023-11-09 10:10     ` Benjamin Gaignard
2023-11-09 10:10       ` Benjamin Gaignard
2023-11-09 10:10       ` Benjamin Gaignard
2023-11-10  8:58       ` Tomasz Figa
2023-11-10  8:58         ` Tomasz Figa
2023-11-10  8:58         ` Tomasz Figa
2023-11-10  9:14         ` Hans Verkuil
2023-11-10  9:14           ` Hans Verkuil
2023-11-10  9:14           ` Hans Verkuil
2023-11-10  9:19           ` Tomasz Figa
2023-11-10  9:19             ` Tomasz Figa
2023-11-10  9:19             ` Tomasz Figa
2023-10-31 16:31 ` [PATCH v14 55/56] media: v4l2: Add mem2mem helpers for " Benjamin Gaignard
2023-10-31 16:31   ` Benjamin Gaignard
2023-10-31 16:31   ` Benjamin Gaignard
2023-10-31 16:31 ` [PATCH v14 56/56] media: test-drivers: Use helper " Benjamin Gaignard
2023-10-31 16:31   ` Benjamin Gaignard
2023-10-31 16:31   ` Benjamin Gaignard
2023-11-09  9:43   ` Tomasz Figa
2023-11-09  9:43     ` Tomasz Figa
2023-11-09  9:43     ` Tomasz Figa
2023-11-09  9:46     ` Benjamin Gaignard
2023-11-09  9:46       ` Benjamin Gaignard
2023-11-09  9:46       ` Benjamin Gaignard
2023-11-09  9:48       ` Tomasz Figa
2023-11-09  9:48         ` Tomasz Figa
2023-11-09  9:48         ` Tomasz Figa

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=20231031163104.112469-48-benjamin.gaignard@collabora.com \
    --to=benjamin.gaignard@collabora.com \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=gregkh@linuxfoundation.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=kernel@collabora.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=m.szyprowski@samsung.com \
    --cc=mchehab@kernel.org \
    --cc=ming.qian@nxp.com \
    --cc=nicolas.dufresne@collabora.com \
    --cc=p.zabel@pengutronix.de \
    --cc=tfiga@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.