| Message ID | 20251023144841.403689-34-stefan.klug@ideasonboard.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
On Thu, Oct 23, 2025 at 04:48:34PM +0200, Stefan Klug wrote: > It is not mentioned when the sensorFormat is allowed to have zero size. > Add a warning and todo to that case but leave it in place for now. > CameraSensor::getformat() documentation mentions this no ? and both derived classes seem to log a debug message if a size cannot be decided. if (!bestSize) { LOG(CameraSensor, Debug) << "No supported format or size found"; return {}; } > Signed-off-by: Stefan Klug <stefan.klug@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 da3cfc0ffdeb..9a156d4a01f2 100644 > --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp > +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp > @@ -782,8 +782,16 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate() > sensorFormat_ = sensor->getFormat(mbusCodes, accumulatedSensorSize, > mainPath->maxResolution()); > > - if (sensorFormat_.size.isNull()) > + if (sensorFormat_.size.isNull()) { > + /* > + * \todo When can this happen? Should we return a failure in > + * this case? > + */ > sensorFormat_.size = sensor->resolution(); > + LOG(RkISP1, Warning) > + << "Failed to select sensor format. Default to " > + << sensorFormat_; > + } > > return status; > } > -- > 2.48.1 >
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index da3cfc0ffdeb..9a156d4a01f2 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -782,8 +782,16 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate() sensorFormat_ = sensor->getFormat(mbusCodes, accumulatedSensorSize, mainPath->maxResolution()); - if (sensorFormat_.size.isNull()) + if (sensorFormat_.size.isNull()) { + /* + * \todo When can this happen? Should we return a failure in + * this case? + */ sensorFormat_.size = sensor->resolution(); + LOG(RkISP1, Warning) + << "Failed to select sensor format. Default to " + << sensorFormat_; + } return status; }
It is not mentioned when the sensorFormat is allowed to have zero size. Add a warning and todo to that case but leave it in place for now. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> --- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)