[v2,16/25] libtuning: Handle cases, where no lsc tuning images are present
diff mbox series

Message ID 20240628104828.2928109-17-stefan.klug@ideasonboard.com
State Superseded
Headers show
Series
  • Add ccm calibration to libtuning
Related show

Commit Message

Stefan Klug June 28, 2024, 10:47 a.m. UTC
Make it clear that no lsc calibration was done by returning None instead
of a incomplete configuration.

Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
---
 utils/tuning/libtuning/modules/lsc/rkisp1.py | 3 +++
 1 file changed, 3 insertions(+)

Comments

Laurent Pinchart June 28, 2024, 11:51 p.m. UTC | #1
Hi Stefan,

Thank you for the patch.

On Fri, Jun 28, 2024 at 12:47:09PM +0200, Stefan Klug wrote:
> Make it clear that no lsc calibration was done by returning None instead
> of a incomplete configuration.
> 
> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  utils/tuning/libtuning/modules/lsc/rkisp1.py | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/utils/tuning/libtuning/modules/lsc/rkisp1.py b/utils/tuning/libtuning/modules/lsc/rkisp1.py
> index 074f3b272dbf..5874f10c936f 100644
> --- a/utils/tuning/libtuning/modules/lsc/rkisp1.py
> +++ b/utils/tuning/libtuning/modules/lsc/rkisp1.py
> @@ -107,6 +107,9 @@ class LSCRkISP1(LSC):
>  
>          output['sets'] = self._do_all_lsc(images)
>  
> +        if len(output['sets']) == 0:
> +            return None
> +
>          # \todo Validate images from greyscale camera and force grescale mode
>          # \todo Debug functionality
>

Patch
diff mbox series

diff --git a/utils/tuning/libtuning/modules/lsc/rkisp1.py b/utils/tuning/libtuning/modules/lsc/rkisp1.py
index 074f3b272dbf..5874f10c936f 100644
--- a/utils/tuning/libtuning/modules/lsc/rkisp1.py
+++ b/utils/tuning/libtuning/modules/lsc/rkisp1.py
@@ -107,6 +107,9 @@  class LSCRkISP1(LSC):
 
         output['sets'] = self._do_all_lsc(images)
 
+        if len(output['sets']) == 0:
+            return None
+
         # \todo Validate images from greyscale camera and force grescale mode
         # \todo Debug functionality