[v1] libcamera: pipeline: simple: Reject multiple processed streams with software ISP
diff mbox series

Message ID 20260821094546.2252561-1-alexi.birlinger@nxp.com
State New
Headers show
Series
  • [v1] libcamera: pipeline: simple: Reject multiple processed streams with software ISP
Related show

Commit Message

Alexi Birlinger Aug. 21, 2026, 9:45 a.m. UTC
The software ISP is defined with 2 streams. However, it only supports
a single processed stream, with an optional raw stream.
Return a null configuration early in generateConfiguration() when multiple
processed streams are requested while the software ISP is enabled.

Signed-off-by: Alexi Birlinger <alexi.birlinger@nxp.com>
---
 src/libcamera/pipeline/simple/simple.cpp | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Barnabás Pőcze Aug. 21, 2026, 10:15 a.m. UTC | #1
2026. 08. 21. 11:45 keltezéssel, Alexi Birlinger írta:
> The software ISP is defined with 2 streams. However, it only supports
> a single processed stream, with an optional raw stream.
> Return a null configuration early in generateConfiguration() when multiple
> processed streams are requested while the software ISP is enabled.
> 
> Signed-off-by: Alexi Birlinger <alexi.birlinger@nxp.com>
> ---

It is unfortunately not sufficient to check this only in `generateConfiguration()`
because the user is allowed to modify the configuration after it has been generated.
So `SimpleCameraConfiguration::validate()` needs to be adjusted.


>   src/libcamera/pipeline/simple/simple.cpp | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
> index 02a98f594..b293a13e8 100644
> --- a/src/libcamera/pipeline/simple/simple.cpp
> +++ b/src/libcamera/pipeline/simple/simple.cpp
> @@ -1427,6 +1427,11 @@ SimplePipelineHandler::generateConfiguration(Camera *camera, Span<const StreamRo
>   			}
>   			rawRequested = true;
>   		} else {
> +			if (swIspEnabled_ && processedRequested) {
> +				LOG(SimplePipeline, Error)
> +					<< "Software ISP can't capture multiple processed streams";
> +				return nullptr;
> +			}
>   			processedRequested = true;
>   		}
>

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
index 02a98f594..b293a13e8 100644
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -1427,6 +1427,11 @@  SimplePipelineHandler::generateConfiguration(Camera *camera, Span<const StreamRo
 			}
 			rawRequested = true;
 		} else {
+			if (swIspEnabled_ && processedRequested) {
+				LOG(SimplePipeline, Error)
+					<< "Software ISP can't capture multiple processed streams";
+				return nullptr;
+			}
 			processedRequested = true;
 		}