[PATCH 1/7] media: rppx1: Drop max_size param from rppx1_params()

Daniel Scally dan.scally at ideasonboard.com
Wed Nov 4 04:28:16 PST 2026


The maximum size of the buffer is currently passed in from the caller
but is available in rppx1-config.h. Include the header and drop the
parameter from the function.

Signed-off-by: Daniel Scally <dan.scally at ideasonboard.com>
---

I hope this change is ok; I'm not familiar with future plans for the
library driver, but it looks like the parameters max size should be
the same for any user of the library and that not parametising it is
ok.
---
 drivers/media/platform/dreamchip/rppx1/rpp_params.c | 7 +++++--
 drivers/media/platform/renesas/rcar-isp/core-io.c   | 3 +--
 include/media/rppx1.h                               | 2 +-
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/media/platform/dreamchip/rppx1/rpp_params.c b/drivers/media/platform/dreamchip/rppx1/rpp_params.c
index 5e6727d58946405322a8dae3c8d5727fe07135e0..e804440f369b7bd6d85cc1a23a2610c1cca307fa 100644
--- a/drivers/media/platform/dreamchip/rppx1/rpp_params.c
+++ b/drivers/media/platform/dreamchip/rppx1/rpp_params.c
@@ -5,6 +5,8 @@
  * Copyright (C) 2026 Ragnatech AB
  */
 
+#include <linux/media/dreamchip/rppx1-config.h>
+
 #include <media/v4l2-isp.h>
 #include <media/videobuf2-v4l2.h>
 
@@ -37,7 +39,7 @@ rppx1_ext_params_blocks_info[] = {
 	RPPX1_PARAMS_BLOCK_INFO(GA_MV, ga),
 };
 
-int rppx1_params(struct rppx1 *rpp, struct vb2_buffer *vb, size_t max_size,
+int rppx1_params(struct rppx1 *rpp, struct vb2_buffer *vb,
 		 rppx1_reg_write write, void *priv)
 {
 	struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb);
@@ -45,7 +47,8 @@ int rppx1_params(struct rppx1 *rpp, struct vb2_buffer *vb, size_t max_size,
 	size_t block_offset;
 	int ret;
 
-	ret = v4l2_isp_params_validate_buffer_size(rpp->dev, vb, max_size);
+	ret = v4l2_isp_params_validate_buffer_size(rpp->dev, vb,
+				v4l2_isp_buffer_size(RPPX1_PARAMS_MAX_SIZE));
 	if (ret)
 		return ret;
 
diff --git a/drivers/media/platform/renesas/rcar-isp/core-io.c b/drivers/media/platform/renesas/rcar-isp/core-io.c
index b60b91f43d42deed16c8feb3526bbb77a43b5b96..5eea8c721a25a01cc6c01ab49fef001ae2065a6b 100644
--- a/drivers/media/platform/renesas/rcar-isp/core-io.c
+++ b/drivers/media/platform/renesas/rcar-isp/core-io.c
@@ -536,8 +536,7 @@ static int risp_io_params_buffer_prepare(struct vb2_buffer *vb)
 	desc.count = 0;
 
 	/* Fill params body. */
-	ret = rppx1_params(io->core->rpp, vb, io->format.fmt.meta.buffersize,
-			   risp_conf_dma_prepare, &desc);
+	ret = rppx1_params(io->core->rpp, vb, risp_conf_dma_prepare, &desc);
 	if (ret)
 		return ret;
 
diff --git a/include/media/rppx1.h b/include/media/rppx1.h
index 2e761046db384a8dd17b1c66bb62c5ac14dec9a9..bb5f91f3174df5e29988a4ec3fb1d29f9db01ca6 100644
--- a/include/media/rppx1.h
+++ b/include/media/rppx1.h
@@ -28,7 +28,7 @@ int rppx1_stop(struct rppx1 *rpp);
 bool rppx1_interrupt(struct rppx1 *rpp, u32 *isc);
 
 typedef int (*rppx1_reg_write)(void *priv, u32 offset, u32 value);
-int rppx1_params(struct rppx1 *rpp, struct vb2_buffer *vb, size_t max_size,
+int rppx1_params(struct rppx1 *rpp, struct vb2_buffer *vb,
 		 rppx1_reg_write write, void *priv);
 
 void rppx1_stats_fill_isr(struct rppx1 *rpp, u32 isc, void *buf);

-- 
2.43.0




More information about the Linux-rockchip mailing list