[v2] libcamera: software_isp: debayer_egl: Demote unsupported format log to Info
diff mbox series

Message ID 20260602012601.2799275-1-qi.hou@nxp.com
State New
Headers show
Series
  • [v2] libcamera: software_isp: debayer_egl: Demote unsupported format log to Info
Related show

Commit Message

Qi Hou June 2, 2026, 1:26 a.m. UTC
From: Hou Qi <qi.hou@nxp.com>

DebayerEGL::getInputConfig() logs at Error level when it encounters an
unsupported input format. This function is called during format
enumeration from the simple pipeline handler's tryPipeline(), which
iterates over all pixel formats reported by the video capture device,
including non-Bayer formats such as UYVY and YUYV. The caller already
handles the failure gracefully by checking the return value. Similarly,
DebayerEGL::getOutputConfig() logs at Error level for unsupported
output formats, but is called from strideAndFrameSize() which also
handles failures via the return value.

Demote both log messages from Error to Info for consistency with
DebayerCpu, which uses Info level in getInputConfig() and
getOutputConfig() for the same situation.

Signed-off-by: Qi Hou <qi.hou@nxp.com>
---
 src/libcamera/software_isp/debayer_egl.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Bryan O'Donoghue June 2, 2026, 8:28 a.m. UTC | #1
On 02/06/2026 02:26, Qi Hou wrote:
> From: Hou Qi <qi.hou@nxp.com>
> 
> DebayerEGL::getInputConfig() logs at Error level when it encounters an
> unsupported input format. This function is called during format
> enumeration from the simple pipeline handler's tryPipeline(), which
> iterates over all pixel formats reported by the video capture device,
> including non-Bayer formats such as UYVY and YUYV. The caller already
> handles the failure gracefully by checking the return value. Similarly,
> DebayerEGL::getOutputConfig() logs at Error level for unsupported
> output formats, but is called from strideAndFrameSize() which also
> handles failures via the return value.
> 
> Demote both log messages from Error to Info for consistency with
> DebayerCpu, which uses Info level in getInputConfig() and
> getOutputConfig() for the same situation.
> 
> Signed-off-by: Qi Hou <qi.hou@nxp.com>
> ---
>   src/libcamera/software_isp/debayer_egl.cpp | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp
> index 7b9e02d9..68779893 100644
> --- a/src/libcamera/software_isp/debayer_egl.cpp
> +++ b/src/libcamera/software_isp/debayer_egl.cpp
> @@ -78,7 +78,7 @@ int DebayerEGL::getInputConfig(PixelFormat inputFormat, DebayerInputConfig &conf
>   		return 0;
>   	}
> 
> -	LOG(Debayer, Error)
> +	LOG(Debayer, Info)
>   		<< "Unsupported input format " << inputFormat;
> 
>   	return -EINVAL;
> @@ -92,7 +92,7 @@ int DebayerEGL::getOutputConfig(PixelFormat outputFormat, DebayerOutputConfig &c
>   		return 0;
>   	}
> 
> -	LOG(Debayer, Error)
> +	LOG(Debayer, Info)
>   		<< "Unsupported output format " << outputFormat;
> 
>   	return -EINVAL;
> --
> 2.34.1
> 

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

---
bod
Kieran Bingham June 2, 2026, 9:39 a.m. UTC | #2
Quoting Qi Hou (2026-06-02 02:26:01)
> From: Hou Qi <qi.hou@nxp.com>
> 
> DebayerEGL::getInputConfig() logs at Error level when it encounters an
> unsupported input format. This function is called during format
> enumeration from the simple pipeline handler's tryPipeline(), which
> iterates over all pixel formats reported by the video capture device,
> including non-Bayer formats such as UYVY and YUYV. The caller already
> handles the failure gracefully by checking the return value. Similarly,
> DebayerEGL::getOutputConfig() logs at Error level for unsupported
> output formats, but is called from strideAndFrameSize() which also
> handles failures via the return value.
> 
> Demote both log messages from Error to Info for consistency with
> DebayerCpu, which uses Info level in getInputConfig() and
> getOutputConfig() for the same situation.
> 


Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> Signed-off-by: Qi Hou <qi.hou@nxp.com>
> ---
>  src/libcamera/software_isp/debayer_egl.cpp | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp
> index 7b9e02d9..68779893 100644
> --- a/src/libcamera/software_isp/debayer_egl.cpp
> +++ b/src/libcamera/software_isp/debayer_egl.cpp
> @@ -78,7 +78,7 @@ int DebayerEGL::getInputConfig(PixelFormat inputFormat, DebayerInputConfig &conf
>                 return 0;
>         }
>  
> -       LOG(Debayer, Error)
> +       LOG(Debayer, Info)
>                 << "Unsupported input format " << inputFormat;
>  
>         return -EINVAL;
> @@ -92,7 +92,7 @@ int DebayerEGL::getOutputConfig(PixelFormat outputFormat, DebayerOutputConfig &c
>                 return 0;
>         }
>  
> -       LOG(Debayer, Error)
> +       LOG(Debayer, Info)
>                 << "Unsupported output format " << outputFormat;
>  
>         return -EINVAL;
> -- 
> 2.34.1
>
Kieran Bingham June 2, 2026, 2:24 p.m. UTC | #3
Hello,

Quoting Qi Hou (2026-06-02 02:26:01)
> From: Hou Qi <qi.hou@nxp.com>
> Signed-off-by: Qi Hou <qi.hou@nxp.com>

The 'From' tag and the 'Signed off by' tags do not match, and the git
server has hooks to reject this.

I can rewrite either one, which is your preferred or correct ordering?

  Hou Qi
or
  Qi Hou
?

--
Kieran


> 
> DebayerEGL::getInputConfig() logs at Error level when it encounters an
> unsupported input format. This function is called during format
> enumeration from the simple pipeline handler's tryPipeline(), which
> iterates over all pixel formats reported by the video capture device,
> including non-Bayer formats such as UYVY and YUYV. The caller already
> handles the failure gracefully by checking the return value. Similarly,
> DebayerEGL::getOutputConfig() logs at Error level for unsupported
> output formats, but is called from strideAndFrameSize() which also
> handles failures via the return value.
> 
> Demote both log messages from Error to Info for consistency with
> DebayerCpu, which uses Info level in getInputConfig() and
> getOutputConfig() for the same situation.
> 
> Signed-off-by: Qi Hou <qi.hou@nxp.com>
> ---
>  src/libcamera/software_isp/debayer_egl.cpp | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp
> index 7b9e02d9..68779893 100644
> --- a/src/libcamera/software_isp/debayer_egl.cpp
> +++ b/src/libcamera/software_isp/debayer_egl.cpp
> @@ -78,7 +78,7 @@ int DebayerEGL::getInputConfig(PixelFormat inputFormat, DebayerInputConfig &conf
>                 return 0;
>         }
>  
> -       LOG(Debayer, Error)
> +       LOG(Debayer, Info)
>                 << "Unsupported input format " << inputFormat;
>  
>         return -EINVAL;
> @@ -92,7 +92,7 @@ int DebayerEGL::getOutputConfig(PixelFormat outputFormat, DebayerOutputConfig &c
>                 return 0;
>         }
>  
> -       LOG(Debayer, Error)
> +       LOG(Debayer, Info)
>                 << "Unsupported output format " << outputFormat;
>  
>         return -EINVAL;
> -- 
> 2.34.1
>

Patch
diff mbox series

diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp
index 7b9e02d9..68779893 100644
--- a/src/libcamera/software_isp/debayer_egl.cpp
+++ b/src/libcamera/software_isp/debayer_egl.cpp
@@ -78,7 +78,7 @@  int DebayerEGL::getInputConfig(PixelFormat inputFormat, DebayerInputConfig &conf
 		return 0;
 	}
 
-	LOG(Debayer, Error)
+	LOG(Debayer, Info)
 		<< "Unsupported input format " << inputFormat;
 
 	return -EINVAL;
@@ -92,7 +92,7 @@  int DebayerEGL::getOutputConfig(PixelFormat outputFormat, DebayerOutputConfig &c
 		return 0;
 	}
 
-	LOG(Debayer, Error)
+	LOG(Debayer, Info)
 		<< "Unsupported output format " << outputFormat;
 
 	return -EINVAL;