Message ID | 20250808141315.413839-11-stefan.klug@ideasonboard.com |
---|---|
State | New |
Headers | show |
Series |
|
Related | show |
On 08/08/2025 15:12, Stefan Klug wrote: > When the extensible parameters queued to the kernel contain an unknown > block type it fails with -EINVAL. This should not happen as user land is > supposed to check for the supported parameter types. But it took a while > to figure out where things went wrong. Add a error statement when > queuing of the parameter buffer fails for whatever reason. > > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> > Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> > --- > > Changes in v4: > - Improved commit message > > Changes in v3: > - Collected tags > - Removed hint regarding unsupported parameter types as this will be > handled using the now upstreamed RKISP1_CID_SUPPORTED_PARAMS_BLOCKS. > > Changes in v2: > - Also print the error code in case of failure > --- > src/libcamera/pipeline/rkisp1/rkisp1.cpp | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp > index 8b434a56ea04..06785cb2fd57 100644 > --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp > +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp > @@ -429,7 +429,14 @@ 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: " > + << strerror(-ret); > + return; > + } > + > pipe->stat_->queueBuffer(info->statBuffer); > > if (info->mainPathBuffer)
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index 8b434a56ea04..06785cb2fd57 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -429,7 +429,14 @@ 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: " + << strerror(-ret); + return; + } + pipe->stat_->queueBuffer(info->statBuffer); if (info->mainPathBuffer)