[libcamera-devel,v1,1/2] build: controls: Add Raspberry Pi vendor specific controls
diff mbox series

Message ID 20231204161901.6632-2-naush@raspberrypi.com
State Accepted
Headers show
Series
  • Raspberry Pi vendor controls
Related show

Commit Message

Naushir Patuck Dec. 4, 2023, 4:19 p.m. UTC
Add a new control_ids_rpi.yaml file to hold the Raspberry Pi specific
vendor controls.

Define a control StatsOutputEnable to allow the ISP hardware statistics
to be output through metadata via the Bcm2835StatsOutput control. The
implementation of these controls will follow in a subsequent patch.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
---
 include/libcamera/meson.build      |  1 +
 src/libcamera/control_ids_rpi.yaml | 29 +++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 src/libcamera/control_ids_rpi.yaml

Comments

David Plowman Dec. 6, 2023, 4:55 p.m. UTC | #1
Hi Naush

Yes, this sounds like a good idea. My only slight worry is that folks
will start writing application code where they'd be better off
implementing a proper "algorithm", but I guess that's not really a
concern here!

On Mon, 4 Dec 2023 at 16:18, Naushir Patuck via libcamera-devel
<libcamera-devel@lists.libcamera.org> wrote:
>
> Add a new control_ids_rpi.yaml file to hold the Raspberry Pi specific
> vendor controls.
>
> Define a control StatsOutputEnable to allow the ISP hardware statistics
> to be output through metadata via the Bcm2835StatsOutput control. The
> implementation of these controls will follow in a subsequent patch.
>
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>

Reviewed-by: David Plowman <david.plowman@raspberrypi.com>

Thanks!
David

> ---
>  include/libcamera/meson.build      |  1 +
>  src/libcamera/control_ids_rpi.yaml | 29 +++++++++++++++++++++++++++++
>  2 files changed, 30 insertions(+)
>  create mode 100644 src/libcamera/control_ids_rpi.yaml
>
> diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build
> index bab858a3790f..84c6c4cb8bf6 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',
> +        'rpi/vc4': 'control_ids_rpi.yaml',
>      },
>
>      'properties': {
> diff --git a/src/libcamera/control_ids_rpi.yaml b/src/libcamera/control_ids_rpi.yaml
> new file mode 100644
> index 000000000000..cb097f887e16
> --- /dev/null
> +++ b/src/libcamera/control_ids_rpi.yaml
> @@ -0,0 +1,29 @@
> +# SPDX-License-Identifier: LGPL-2.1-or-later
> +#
> +# Copyright (C) 2023, Raspberry Pi Ltd
> +#
> +%YAML 1.1
> +---
> +# Raspberry Pi (VC4 and PiSP) specific vendor controls
> +vendor: rpi
> +controls:
> +  - StatsOutputEnable:
> +      type: bool
> +      description: |
> +        Toggles the Raspberry Pi IPA to output a binary dump of the hardware
> +        generated statistics through the Request metadata in the Bcm2835StatsOutput
> +        control.
> +
> +        \sa Bcm2835StatsOutput
> +
> +  - Bcm2835StatsOutput:
> +      type: uint8_t
> +      size: [n]
> +      description: |
> +        Span of the BCM2835 ISP generated statistics for the current frame. This
> +        is sent in the Request metadata if the StatsOutputEnable is set to true.
> +        The statistics struct definition can be found in include/linux/bcm2835-isp.h.
> +
> +        \sa StatsOutputEnable
> +
> +...
> --
> 2.34.1
>
David Plowman Dec. 6, 2023, 5:07 p.m. UTC | #2
Hi Naush

I thought I'd already reviewed this one, but I can't seem to spot it.
Anyway, here's a second review tag just in case it really got lost!!

Reviewed-by: David Plowman <david.plowman@raspberrypi.com>

Thanks
David

On Mon, 4 Dec 2023 at 16:18, Naushir Patuck via libcamera-devel
<libcamera-devel@lists.libcamera.org> wrote:
>
> Add a new control_ids_rpi.yaml file to hold the Raspberry Pi specific
> vendor controls.
>
> Define a control StatsOutputEnable to allow the ISP hardware statistics
> to be output through metadata via the Bcm2835StatsOutput control. The
> implementation of these controls will follow in a subsequent patch.
>
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
> ---
>  include/libcamera/meson.build      |  1 +
>  src/libcamera/control_ids_rpi.yaml | 29 +++++++++++++++++++++++++++++
>  2 files changed, 30 insertions(+)
>  create mode 100644 src/libcamera/control_ids_rpi.yaml
>
> diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build
> index bab858a3790f..84c6c4cb8bf6 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',
> +        'rpi/vc4': 'control_ids_rpi.yaml',
>      },
>
>      'properties': {
> diff --git a/src/libcamera/control_ids_rpi.yaml b/src/libcamera/control_ids_rpi.yaml
> new file mode 100644
> index 000000000000..cb097f887e16
> --- /dev/null
> +++ b/src/libcamera/control_ids_rpi.yaml
> @@ -0,0 +1,29 @@
> +# SPDX-License-Identifier: LGPL-2.1-or-later
> +#
> +# Copyright (C) 2023, Raspberry Pi Ltd
> +#
> +%YAML 1.1
> +---
> +# Raspberry Pi (VC4 and PiSP) specific vendor controls
> +vendor: rpi
> +controls:
> +  - StatsOutputEnable:
> +      type: bool
> +      description: |
> +        Toggles the Raspberry Pi IPA to output a binary dump of the hardware
> +        generated statistics through the Request metadata in the Bcm2835StatsOutput
> +        control.
> +
> +        \sa Bcm2835StatsOutput
> +
> +  - Bcm2835StatsOutput:
> +      type: uint8_t
> +      size: [n]
> +      description: |
> +        Span of the BCM2835 ISP generated statistics for the current frame. This
> +        is sent in the Request metadata if the StatsOutputEnable is set to true.
> +        The statistics struct definition can be found in include/linux/bcm2835-isp.h.
> +
> +        \sa StatsOutputEnable
> +
> +...
> --
> 2.34.1
>

Patch
diff mbox series

diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build
index bab858a3790f..84c6c4cb8bf6 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',
+        'rpi/vc4': 'control_ids_rpi.yaml',
     },
 
     'properties': {
diff --git a/src/libcamera/control_ids_rpi.yaml b/src/libcamera/control_ids_rpi.yaml
new file mode 100644
index 000000000000..cb097f887e16
--- /dev/null
+++ b/src/libcamera/control_ids_rpi.yaml
@@ -0,0 +1,29 @@ 
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# Copyright (C) 2023, Raspberry Pi Ltd
+#
+%YAML 1.1
+---
+# Raspberry Pi (VC4 and PiSP) specific vendor controls
+vendor: rpi
+controls:
+  - StatsOutputEnable:
+      type: bool
+      description: |
+        Toggles the Raspberry Pi IPA to output a binary dump of the hardware
+        generated statistics through the Request metadata in the Bcm2835StatsOutput
+        control.
+
+        \sa Bcm2835StatsOutput
+
+  - Bcm2835StatsOutput:
+      type: uint8_t
+      size: [n]
+      description: |
+        Span of the BCM2835 ISP generated statistics for the current frame. This
+        is sent in the Request metadata if the StatsOutputEnable is set to true.
+        The statistics struct definition can be found in include/linux/bcm2835-isp.h.
+
+        \sa StatsOutputEnable
+
+...