| Message ID | 20251118132720.18468-1-kieran.bingham@ideasonboard.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp index 91715b7f8afd..118b4186c8bf 100644 --- a/src/libcamera/pipeline/simple/simple.cpp +++ b/src/libcamera/pipeline/simple/simple.cpp @@ -710,9 +710,14 @@ void SimpleCameraData::tryPipeline(unsigned int code, const Size &size) << " ]"; for (const auto &videoFormat : videoFormats) { - PixelFormat pixelFormat = videoFormat.first.toPixelFormat(); - if (!pixelFormat) + PixelFormat pixelFormat = videoFormat.first.toPixelFormat(false); + if (!pixelFormat) { + LOG(SimplePipeline, Debug) + << "Unsupported V4L2 pixel format " + << videoFormat.first.toString(); + continue; + } Configuration config; config.code = code;
The Simple Pipeline is designed to support a wide variety of pipeline configurations and attached devices and will enumerate the pixel formats of the connected sensors to map these to libcamera formats where available. In fixed pipelines, where the pixel format is not mapped correctly it is a desired behaviour to express this warning so that the pixelformat can be added, while in the simple-pipeline case we do not expect warnings for every discovered pixel format which is not supported by libcamera. This currently manifests itself as very highly verbose warnings about unsupported pixel formats are not desired when there are working formats that have already been enumerated. Fortunately in commit 434edb7b4480 ("libcamera: formats: Fix warning for unknown V4L2 pixfmt") we have a mechanism to disable the warning for occasions where we wish to ignore unsupported formats. Use this feature to disable the warning in the core V4L2PixelFormat and instead report only a debug level print from the simple pipeline handler. On devices such as the Pinephone, this removes overly verbose warnings for tiled YUV formats: [0:06:39.291083146] [1922] ERROR SimplePipeline simple.cpp:1600 No valid pipeline for sensor 'gc2145 0-003c', skipping [0:06:39.302229740] [1922] WARN V4L2 v4l2_pixelformat.cpp:346 Unsupported V4L2 pixel format HM12 [0:06:39.302779117] [1922] WARN V4L2 v4l2_pixelformat.cpp:346 Unsupported V4L2 pixel format HM12 [0:06:39.303417578] [1922] WARN V4L2 v4l2_pixelformat.cpp:346 Unsupported V4L2 pixel format HM12 [0:06:39.303928998] [1922] WARN V4L2 v4l2_pixelformat.cpp:346 Unsupported V4L2 pixel format HM12 [0:06:39.304615751] [1922] WARN V4L2 v4l2_pixelformat.cpp:346 Unsupported V4L2 pixel format HM12 Closes: https://gitlab.freedesktop.org/camera/libcamera/-/issues/291 Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> --- v2: - Maintain the ability to discover the unsupported formats when enabling debug prints. src/libcamera/pipeline/simple/simple.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)