[v3,1/7] libcamera: Add debug control space
diff mbox series

Message ID 20241008153031.429906-2-stefan.klug@ideasonboard.com
State Accepted
Headers show
Series
  • Add support for IPA debugging metadata
Related show

Commit Message

Stefan Klug Oct. 8, 2024, 3:29 p.m. UTC
Add a new 'debug' controls namespace for the upcoming implementation of
debug metadata. While at it, sort the entries alphabetically.

Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

---
Changes in v2:
- Order lists in meson file alphabetically
- Fix wording in control-ranges
---
 include/libcamera/meson.build        | 5 +++--
 src/libcamera/control_ids_debug.yaml | 6 ++++++
 src/libcamera/control_ranges.yaml    | 4 +++-
 3 files changed, 12 insertions(+), 3 deletions(-)
 create mode 100644 src/libcamera/control_ids_debug.yaml

Comments

Kieran Bingham Oct. 9, 2024, 11:20 p.m. UTC | #1
Quoting Stefan Klug (2024-10-08 16:29:39)
> Add a new 'debug' controls namespace for the upcoming implementation of
> debug metadata. While at it, sort the entries alphabetically.
> 
> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 

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

> ---
> Changes in v2:
> - Order lists in meson file alphabetically
> - Fix wording in control-ranges
> ---
>  include/libcamera/meson.build        | 5 +++--
>  src/libcamera/control_ids_debug.yaml | 6 ++++++
>  src/libcamera/control_ranges.yaml    | 4 +++-
>  3 files changed, 12 insertions(+), 3 deletions(-)
>  create mode 100644 src/libcamera/control_ids_debug.yaml
> 
> diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build
> index a969a95dbf7a..fd69a5172b6a 100644
> --- a/include/libcamera/meson.build
> +++ b/include/libcamera/meson.build
> @@ -34,8 +34,9 @@ libcamera_headers_install_dir = get_option('includedir') / libcamera_include_dir
>  
>  controls_map = {
>      'controls': {
> -        'draft': 'control_ids_draft.yaml',
>          'core': 'control_ids_core.yaml',
> +        'debug': 'control_ids_debug.yaml',
> +        'draft': 'control_ids_draft.yaml',
>          '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', 'debug', 'draft']
>              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..797532712099
> --- /dev/null
> +++ b/src/libcamera/control_ids_debug.yaml
> @@ -0,0 +1,6 @@
> +# SPDX-License-Identifier: LGPL-2.1-or-later
> +#
> +%YAML 1.1
> +---
> +vendor: debug
> +controls: []
> diff --git a/src/libcamera/control_ranges.yaml b/src/libcamera/control_ranges.yaml
> index d42447d04647..6752eb986ac6 100644
> --- a/src/libcamera/control_ranges.yaml
> +++ b/src/libcamera/control_ranges.yaml
> @@ -13,6 +13,8 @@ ranges:
>    draft: 10000
>    # Raspberry Pi vendor controls
>    rpi: 20000
> -  # Next range starts at 30000
> +  # Controls for debug metadata
> +  debug: 30000
> +  # Next range starts at 40000
>  
>  ...
> -- 
> 2.43.0
>

Patch
diff mbox series

diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build
index a969a95dbf7a..fd69a5172b6a 100644
--- a/include/libcamera/meson.build
+++ b/include/libcamera/meson.build
@@ -34,8 +34,9 @@  libcamera_headers_install_dir = get_option('includedir') / libcamera_include_dir
 
 controls_map = {
     'controls': {
-        'draft': 'control_ids_draft.yaml',
         'core': 'control_ids_core.yaml',
+        'debug': 'control_ids_debug.yaml',
+        'draft': 'control_ids_draft.yaml',
         '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', 'debug', 'draft']
             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..797532712099
--- /dev/null
+++ b/src/libcamera/control_ids_debug.yaml
@@ -0,0 +1,6 @@ 
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+%YAML 1.1
+---
+vendor: debug
+controls: []
diff --git a/src/libcamera/control_ranges.yaml b/src/libcamera/control_ranges.yaml
index d42447d04647..6752eb986ac6 100644
--- a/src/libcamera/control_ranges.yaml
+++ b/src/libcamera/control_ranges.yaml
@@ -13,6 +13,8 @@  ranges:
   draft: 10000
   # Raspberry Pi vendor controls
   rpi: 20000
-  # Next range starts at 30000
+  # Controls for debug metadata
+  debug: 30000
+  # Next range starts at 40000
 
 ...