| Message ID | 20260926125646.47951-1-robert.mader@collabora.com |
|---|---|
| State | Accepted |
| Headers | show |
| Series |
|
| Related | show |
Quoting Robert Mader (2026-09-26 13:56:46) > On some platforms such as the PinePhone these logs clutter the output of > tools and the journal a lot. Let's silence them for normal usage. > > Also add error logs for the cases where hitting the path would actually > be errors. > > Signed-off-by: Robert Mader <robert.mader@collabora.com> > > --- Still seems reasonable to me: Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > > Changes in v2: > - Add error logs in callers > --- > src/libcamera/software_isp/debayer_cpu.cpp | 9 ++++++--- > src/libcamera/software_isp/debayer_egl.cpp | 7 +++++-- > 2 files changed, 11 insertions(+), 5 deletions(-) > > diff --git a/src/libcamera/software_isp/debayer_cpu.cpp b/src/libcamera/software_isp/debayer_cpu.cpp > index c6d5d1e1813b..ce8b3c647aee 100644 > --- a/src/libcamera/software_isp/debayer_cpu.cpp > +++ b/src/libcamera/software_isp/debayer_cpu.cpp > @@ -470,8 +470,8 @@ int DebayerCpu::getInputConfig(PixelFormat inputFormat, DebayerInputConfig &conf > return 0; > } > > - LOG(Debayer, Info) > - << "Unsupported input format " << inputFormat.toString(); > + LOG(Debayer, Debug) > + << "Unsupported input format " << inputFormat; > return -EINVAL; > } > > @@ -626,8 +626,11 @@ int DebayerCpu::configure(const StreamConfiguration &inputCfg, > const std::vector<std::reference_wrapper<const StreamConfiguration>> &outputCfgs, > bool ccmEnabled) > { > - if (getInputConfig(inputCfg.pixelFormat, inputConfig_) != 0) > + if (getInputConfig(inputCfg.pixelFormat, inputConfig_) != 0) { > + LOG(Debayer, Error) > + << "Unsupported input format " << inputCfg.pixelFormat; > return -EINVAL; > + } > > if (stats_->configure(inputCfg, threads_.size()) != 0) > return -EINVAL; > diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp > index 4477c928342f..300822f9d1b2 100644 > --- a/src/libcamera/software_isp/debayer_egl.cpp > +++ b/src/libcamera/software_isp/debayer_egl.cpp > @@ -91,7 +91,7 @@ int DebayerEGL::getInputConfig(PixelFormat inputFormat, DebayerInputConfig &conf > return 0; > } > > - LOG(Debayer, Info) > + LOG(Debayer, Debug) > << "Unsupported input format " << inputFormat; > > return -EINVAL; > @@ -275,8 +275,11 @@ int DebayerEGL::configure(const StreamConfiguration &inputCfg, > const std::vector<std::reference_wrapper<const StreamConfiguration>> &outputCfgs, > [[maybe_unused]] bool ccmEnabled) > { > - if (getInputConfig(inputCfg.pixelFormat, inputConfig_) != 0) > + if (getInputConfig(inputCfg.pixelFormat, inputConfig_) != 0) { > + LOG(Debayer, Error) > + << "Unsupported input format " << inputCfg.pixelFormat; > return -EINVAL; > + } > > if (stats_->configure(inputCfg) != 0) > return -EINVAL; > -- > 2.55.0 >
Robert Mader <robert.mader@collabora.com> writes: > On some platforms such as the PinePhone these logs clutter the output of > tools and the journal a lot. Let's silence them for normal usage. > > Also add error logs for the cases where hitting the path would actually > be errors. > > Signed-off-by: Robert Mader <robert.mader@collabora.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com> > > --- > > Changes in v2: > - Add error logs in callers > --- > src/libcamera/software_isp/debayer_cpu.cpp | 9 ++++++--- > src/libcamera/software_isp/debayer_egl.cpp | 7 +++++-- > 2 files changed, 11 insertions(+), 5 deletions(-) > > diff --git a/src/libcamera/software_isp/debayer_cpu.cpp b/src/libcamera/software_isp/debayer_cpu.cpp > index c6d5d1e1813b..ce8b3c647aee 100644 > --- a/src/libcamera/software_isp/debayer_cpu.cpp > +++ b/src/libcamera/software_isp/debayer_cpu.cpp > @@ -470,8 +470,8 @@ int DebayerCpu::getInputConfig(PixelFormat inputFormat, DebayerInputConfig &conf > return 0; > } > > - LOG(Debayer, Info) > - << "Unsupported input format " << inputFormat.toString(); > + LOG(Debayer, Debug) > + << "Unsupported input format " << inputFormat; > return -EINVAL; > } > > @@ -626,8 +626,11 @@ int DebayerCpu::configure(const StreamConfiguration &inputCfg, > const std::vector<std::reference_wrapper<const StreamConfiguration>> &outputCfgs, > bool ccmEnabled) > { > - if (getInputConfig(inputCfg.pixelFormat, inputConfig_) != 0) > + if (getInputConfig(inputCfg.pixelFormat, inputConfig_) != 0) { > + LOG(Debayer, Error) > + << "Unsupported input format " << inputCfg.pixelFormat; > return -EINVAL; > + } > > if (stats_->configure(inputCfg, threads_.size()) != 0) > return -EINVAL; > diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp > index 4477c928342f..300822f9d1b2 100644 > --- a/src/libcamera/software_isp/debayer_egl.cpp > +++ b/src/libcamera/software_isp/debayer_egl.cpp > @@ -91,7 +91,7 @@ int DebayerEGL::getInputConfig(PixelFormat inputFormat, DebayerInputConfig &conf > return 0; > } > > - LOG(Debayer, Info) > + LOG(Debayer, Debug) > << "Unsupported input format " << inputFormat; > > return -EINVAL; > @@ -275,8 +275,11 @@ int DebayerEGL::configure(const StreamConfiguration &inputCfg, > const std::vector<std::reference_wrapper<const StreamConfiguration>> &outputCfgs, > [[maybe_unused]] bool ccmEnabled) > { > - if (getInputConfig(inputCfg.pixelFormat, inputConfig_) != 0) > + if (getInputConfig(inputCfg.pixelFormat, inputConfig_) != 0) { > + LOG(Debayer, Error) > + << "Unsupported input format " << inputCfg.pixelFormat; > return -EINVAL; > + } > > if (stats_->configure(inputCfg) != 0) > return -EINVAL;
diff --git a/src/libcamera/software_isp/debayer_cpu.cpp b/src/libcamera/software_isp/debayer_cpu.cpp index c6d5d1e1813b..ce8b3c647aee 100644 --- a/src/libcamera/software_isp/debayer_cpu.cpp +++ b/src/libcamera/software_isp/debayer_cpu.cpp @@ -470,8 +470,8 @@ int DebayerCpu::getInputConfig(PixelFormat inputFormat, DebayerInputConfig &conf return 0; } - LOG(Debayer, Info) - << "Unsupported input format " << inputFormat.toString(); + LOG(Debayer, Debug) + << "Unsupported input format " << inputFormat; return -EINVAL; } @@ -626,8 +626,11 @@ int DebayerCpu::configure(const StreamConfiguration &inputCfg, const std::vector<std::reference_wrapper<const StreamConfiguration>> &outputCfgs, bool ccmEnabled) { - if (getInputConfig(inputCfg.pixelFormat, inputConfig_) != 0) + if (getInputConfig(inputCfg.pixelFormat, inputConfig_) != 0) { + LOG(Debayer, Error) + << "Unsupported input format " << inputCfg.pixelFormat; return -EINVAL; + } if (stats_->configure(inputCfg, threads_.size()) != 0) return -EINVAL; diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp index 4477c928342f..300822f9d1b2 100644 --- a/src/libcamera/software_isp/debayer_egl.cpp +++ b/src/libcamera/software_isp/debayer_egl.cpp @@ -91,7 +91,7 @@ int DebayerEGL::getInputConfig(PixelFormat inputFormat, DebayerInputConfig &conf return 0; } - LOG(Debayer, Info) + LOG(Debayer, Debug) << "Unsupported input format " << inputFormat; return -EINVAL; @@ -275,8 +275,11 @@ int DebayerEGL::configure(const StreamConfiguration &inputCfg, const std::vector<std::reference_wrapper<const StreamConfiguration>> &outputCfgs, [[maybe_unused]] bool ccmEnabled) { - if (getInputConfig(inputCfg.pixelFormat, inputConfig_) != 0) + if (getInputConfig(inputCfg.pixelFormat, inputConfig_) != 0) { + LOG(Debayer, Error) + << "Unsupported input format " << inputCfg.pixelFormat; return -EINVAL; + } if (stats_->configure(inputCfg) != 0) return -EINVAL;
On some platforms such as the PinePhone these logs clutter the output of tools and the journal a lot. Let's silence them for normal usage. Also add error logs for the cases where hitting the path would actually be errors. Signed-off-by: Robert Mader <robert.mader@collabora.com> --- Changes in v2: - Add error logs in callers --- src/libcamera/software_isp/debayer_cpu.cpp | 9 ++++++--- src/libcamera/software_isp/debayer_egl.cpp | 7 +++++-- 2 files changed, 11 insertions(+), 5 deletions(-)