[PATCH 6/9] pipeline: rkisp1: Add more info when parameter queue fails

Stefan Klug stefan.klug at ideasonboard.com
Mon Mar 31 16:43:45 CEST 2025


When the rkisp1 driver of the running kernel supports less parameter
types than the libcamera build and such a parameter is used, queuing of
the parameter buffer fails with -EINVAL. For the time being we have no
way to query the kernel for supported parameter types at runtime. So at
least print a error message that points the user in that direction.

Signed-off-by: Stefan Klug <stefan.klug at ideasonboard.com>
---
 src/libcamera/pipeline/rkisp1/rkisp1.cpp | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index 52633fe3cb85..132ab40fdbf7 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -409,7 +409,15 @@ void RkISP1CameraData::paramsComputed(unsigned int frame, unsigned int bytesused
 		return;
 
 	info->paramBuffer->_d()->metadata().planes()[0].bytesused = bytesused;
-	pipe->param_->queueBuffer(info->paramBuffer);
+
+	int ret = pipe->param_->queueBuffer(info->paramBuffer);
+	if (ret < 0) {
+		LOG(RkISP1, Error) << "Failed to queue parameter buffer. "
+				   << "Maybe the kernel doesn't support the"
+				   << " required parameter types.";
+		return;
+	}
+
 	pipe->stat_->queueBuffer(info->statBuffer);
 
 	if (info->mainPathBuffer)
-- 
2.43.0



More information about the libcamera-devel mailing list