[PATCH v1 1/8] libcamera: Add debug control space

Laurent Pinchart laurent.pinchart at ideasonboard.com
Thu Oct 3 01:48:32 CEST 2024


Hi Stefan,

Thank you for the patch.

On Wed, Oct 02, 2024 at 06:19:19PM +0200, Stefan Klug wrote:
> Add a new 'debug' controls namespace for the upcoming implementation of
> debug metadata.
> 
> Signed-off-by: Stefan Klug <stefan.klug at ideasonboard.com>
> ---
>  include/libcamera/meson.build        |  3 ++-
>  src/libcamera/control_ids_debug.yaml | 11 +++++++++++
>  src/libcamera/control_ranges.yaml    |  5 ++++-
>  3 files changed, 17 insertions(+), 2 deletions(-)
>  create mode 100644 src/libcamera/control_ids_debug.yaml
> 
> diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build
> index a969a95dbf7a..152806988479 100644
> --- a/include/libcamera/meson.build
> +++ b/include/libcamera/meson.build
> @@ -36,6 +36,7 @@ controls_map = {
>      'controls': {
>          'draft': 'control_ids_draft.yaml',
>          'core': 'control_ids_core.yaml',
> +        'debug': 'control_ids_debug.yaml',

While at it, could you sort these alphabetically ?

>          'rpi/vc4': 'control_ids_rpi.yaml',
>      },
>  
> @@ -55,7 +56,7 @@ foreach mode, entry : controls_map
>      files_list = []
>      input_files = []
>      foreach vendor, header : entry
> -        if vendor != 'core' and vendor != 'draft'
> +        if vendor not in ['core', 'draft', 'debug']

Alphabetical order here too.

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

>              if vendor not in pipelines
>                  continue
>              endif
> diff --git a/src/libcamera/control_ids_debug.yaml b/src/libcamera/control_ids_debug.yaml
> new file mode 100644
> index 000000000000..11ddfd7cc8d8
> --- /dev/null
> +++ b/src/libcamera/control_ids_debug.yaml
> @@ -0,0 +1,11 @@
> +# SPDX-License-Identifier: LGPL-2.1-or-later
> +#
> +# Copyright (C) 2024, Ideas on Board Oy
> +#
> +%YAML 1.1
> +---
> +# Unless otherwise stated, all controls are bi-directional, i.e. they can be
> +# set through Request::controls() and returned out through Request::metadata().
> +vendor: debug
> +controls:
> +
> diff --git a/src/libcamera/control_ranges.yaml b/src/libcamera/control_ranges.yaml
> index d42447d04647..b89a517a64cd 100644
> --- a/src/libcamera/control_ranges.yaml
> +++ b/src/libcamera/control_ranges.yaml
> @@ -13,6 +13,9 @@ ranges:
>    draft: 10000
>    # Raspberry Pi vendor controls
>    rpi: 20000
> -  # Next range starts at 30000
> +  # Development controls
> +  debug: 30000
> +  # Next range starts at 40000
> +
>  
>  ...

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list