[libcamera-devel,01/12] meson: options: Add an option to select Android memory backend
diff mbox series

Message ID 20210226132932.165484-2-jacopo@jmondi.org
State Superseded
Headers show
Series
  • android: Support memory backends
Related show

Commit Message

Jacopo Mondi Feb. 26, 2021, 1:29 p.m. UTC
The Android Camera3 HAL implementation interfaces with platform
specific implementations of the memory management infrastructure.

On regular Android systems it is usually a vendor specific
implementation of the gralloc framework, on Chromium OS memory
is managed through the system-specific libcbm implementation and
so far the only supported backend was a generic implementation that
relies on the Linux kernel primitives to access memory buffer.

Define a combo option to select which memory backend to use and
define the currently existing implementation as 'android_generic'.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
 meson_options.txt | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Laurent Pinchart Feb. 28, 2021, 6:15 p.m. UTC | #1
Hi Jacopo,

Thank you for the patch.

On Fri, Feb 26, 2021 at 02:29:21PM +0100, Jacopo Mondi wrote:
> The Android Camera3 HAL implementation interfaces with platform
> specific implementations of the memory management infrastructure.
> 
> On regular Android systems it is usually a vendor specific
> implementation of the gralloc framework, on Chromium OS memory
> is managed through the system-specific libcbm implementation and
> so far the only supported backend was a generic implementation that
> relies on the Linux kernel primitives to access memory buffer.
> 
> Define a combo option to select which memory backend to use and
> define the currently existing implementation as 'android_generic'.
> 
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
> ---
>  meson_options.txt | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/meson_options.txt b/meson_options.txt
> index 22efb3235c19..34063172f4ba 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -10,6 +10,12 @@ option('cros',
>         value : 'false',
>         description : 'Compile libcamera with the cros Camera3 HAL interface (depends on android option)')
>  
> +option('android_memory_backend',
> +        type : 'combo',
> +        choices : ['android_generic'],
> +        value : 'android_generic',
> +        description : 'Select the memory backend in use for the Android Camera3 HAL')

Same comment as on "[PATCH 1/3] meson: Add cros build option", could we
merge android_memory_backend and cros into a single android_platform
option ?

> +
>  option('documentation',
>          type : 'feature',
>          description : 'Generate the project documentation')

Patch
diff mbox series

diff --git a/meson_options.txt b/meson_options.txt
index 22efb3235c19..34063172f4ba 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -10,6 +10,12 @@  option('cros',
        value : 'false',
        description : 'Compile libcamera with the cros Camera3 HAL interface (depends on android option)')
 
+option('android_memory_backend',
+        type : 'combo',
+        choices : ['android_generic'],
+        value : 'android_generic',
+        description : 'Select the memory backend in use for the Android Camera3 HAL')
+
 option('documentation',
         type : 'feature',
         description : 'Generate the project documentation')