[libdrm] meson: honor -Detnaviv=auto

Submitted by Guido Günther on Sept. 21, 2018, 3:30 p.m.

Details

Message ID 20180921153042.GA16431@bogon.m.sigxcpu.org
State New
Headers show
Series "meson: honor -Detnaviv=auto" ( rev: 1 ) in DRI devel

Not browsing as part of any series.

Commit Message

Guido Günther Sept. 21, 2018, 3:30 p.m.
We support that value so it should work as expected. This does not make
'auto' the default since the API is still marked as experimental.
---
 meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meson.build b/meson.build
index 75c7bdff..8001a9cc 100644
--- a/meson.build
+++ b/meson.build
@@ -142,11 +142,11 @@  endif
 
 with_etnaviv = false
 _etnaviv = get_option('etnaviv')
-if _etnaviv == 'true'
+if _etnaviv != 'false'
   if not with_atomics
     error('libdrm_etnaviv requires atomics.')
   endif
-  with_etnaviv = true
+  with_etnaviv = _etnaviv == 'true' or ['arm', 'aarch64'].contains(host_machine.cpu_family())
 endif
 
 with_exynos = get_option('exynos') == 'true'

Comments

On Friday, 2018-09-21 17:30:42 +0200, Guido Günther wrote:
> We support that value so it should work as expected. This does not make
> 'auto' the default since the API is still marked as experimental.
> ---
>  meson.build | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index 75c7bdff..8001a9cc 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -142,11 +142,11 @@ endif
>  
>  with_etnaviv = false
>  _etnaviv = get_option('etnaviv')
> -if _etnaviv == 'true'
> +if _etnaviv != 'false'
>    if not with_atomics
>      error('libdrm_etnaviv requires atomics.')

We shouldn't error out in the 'auto' case; please modify the `with_atomic`
if above to add `_etnaviv == 'true' and ...`. With that, the patch is:
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>

>    endif
> -  with_etnaviv = true
> +  with_etnaviv = _etnaviv == 'true' or ['arm', 'aarch64'].contains(host_machine.cpu_family())

That said, I have no idea if enabling it by default on ARM is the right
thing, so I'll let Lucas and/or Christian decide this :)

(You should wait for their reply before sending your v2)

>  endif
>  
>  with_exynos = get_option('exynos') == 'true'
> -- 
> 2.18.0
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel