diff mbox series

[PATCHv4] graphene: add a PACKAGECONFIG for arm_neon

Message ID 20230213120407.1092455-1-f_l_k@t-online.de
State Accepted, archived
Commit 72778f6a647f47926c6ba1b77f0984999a22e44a
Headers show
Series [PATCHv4] graphene: add a PACKAGECONFIG for arm_neon | expand

Commit Message

Markus Volk Feb. 13, 2023, 12:04 p.m. UTC
Not all arm platforms support neon and runtime detection for this feature is
currently not reliable. Add a PACKAGECONFIG that disables neon support for arm
but can be manually enabled.

Enable neon for aarch64 by default

Signed-off-by: Markus Volk <f_l_k@t-online.de>
---
 meta/recipes-graphics/graphene/graphene_1.10.8.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Carlos Alberto Lopez Perez Feb. 13, 2023, 3:31 p.m. UTC | #1
On 13/02/2023 13:04, Markus Volk wrote:
> Not all arm platforms support neon and runtime detection for this feature is
> currently not reliable. Add a PACKAGECONFIG that disables neon support for arm
> but can be manually enabled.
> 
> Enable neon for aarch64 by default
> 
> Signed-off-by: Markus Volk <f_l_k@t-online.de>
> ---
>  meta/recipes-graphics/graphene/graphene_1.10.8.bb | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-graphics/graphene/graphene_1.10.8.bb b/meta/recipes-graphics/graphene/graphene_1.10.8.bb
> index 813ff74adf..199c460feb 100644
> --- a/meta/recipes-graphics/graphene/graphene_1.10.8.bb
> +++ b/meta/recipes-graphics/graphene/graphene_1.10.8.bb
> @@ -10,8 +10,10 @@ inherit gnomebase gobject-introspection gtk-doc
>  SRC_URI[archive.sha256sum] = "a37bb0e78a419dcbeaa9c7027bcff52f5ec2367c25ec859da31dfde2928f279a"
>  
>  # gtk4 & mutter 41.0 requires graphene build with introspection
> -PACKAGECONFIG ?= "introspection"
> +PACKAGECONFIG ?= "introspection ${@bb.utils.contains('TUNE_FEATURES', 'aarch64', 'neon', '', d)}"
> +
>  PACKAGECONFIG[introspection] = "-Dintrospection=enabled,-Dintrospection=disabled,"
> +PACKAGECONFIG[neon] = "-Darm_neon=true,-Darm_neon=false,"
>  
>  GTKDOC_MESON_OPTION = "gtk_doc"
>  
> 
> 

Can you please add a comment in the .bb file with a note saying that
Neon support gets disabled by default on ARM-32 platforms because of the
following upstream bug: https://github.com/ebassi/graphene/issues/215

?

That way anyone can known in the future why that was disabled for ARM-32
and check if the upstream issue got fixed in order to enable it back by
default.

There is a related discussion at:
https://github.com/Igalia/meta-webkit/pull/448
Bastian Krause Feb. 13, 2023, 4:14 p.m. UTC | #2
On 2/13/23 13:04, Markus Volk wrote:
> Not all arm platforms support neon and runtime detection for this feature is
> currently not reliable. Add a PACKAGECONFIG that disables neon support for arm
> but can be manually enabled.
> 
> Enable neon for aarch64 by default
> 
> Signed-off-by: Markus Volk <f_l_k@t-online.de>
> ---
>   meta/recipes-graphics/graphene/graphene_1.10.8.bb | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)

0e0849cd1 ("graphene: disable neon support on arm 32bits") from meta-oe
needs to be reverted to make this patch work, right?

Regards,
Bastian

> 
> diff --git a/meta/recipes-graphics/graphene/graphene_1.10.8.bb b/meta/recipes-graphics/graphene/graphene_1.10.8.bb
> index 813ff74adf..199c460feb 100644
> --- a/meta/recipes-graphics/graphene/graphene_1.10.8.bb
> +++ b/meta/recipes-graphics/graphene/graphene_1.10.8.bb
> @@ -10,8 +10,10 @@ inherit gnomebase gobject-introspection gtk-doc
>   SRC_URI[archive.sha256sum] = "a37bb0e78a419dcbeaa9c7027bcff52f5ec2367c25ec859da31dfde2928f279a"
>   
>   # gtk4 & mutter 41.0 requires graphene build with introspection
> -PACKAGECONFIG ?= "introspection"
> +PACKAGECONFIG ?= "introspection ${@bb.utils.contains('TUNE_FEATURES', 'aarch64', 'neon', '', d)}"
> +
>   PACKAGECONFIG[introspection] = "-Dintrospection=enabled,-Dintrospection=disabled,"
> +PACKAGECONFIG[neon] = "-Darm_neon=true,-Darm_neon=false,"
>   
>   GTKDOC_MESON_OPTION = "gtk_doc"
Markus Volk Feb. 13, 2023, 6:05 p.m. UTC | #3
Am Mo, 13. Feb 2023 um 16:31:51 +0100 schrieb Carlos Alberto Lopez 
Perez <clopez@igalia.com>:
> Can you please add a comment in the .bb file with a note saying that
> Neon support gets disabled by default on ARM-32 platforms because of 
> the
> following upstream bug: 
> <https://github.com/ebassi/graphene/issues/215>
> 
> ?

sure
Markus Volk Feb. 13, 2023, 6:07 p.m. UTC | #4
Am Mo, 13. Feb 2023 um 17:14:16 +0100 schrieb Bastian Krause 
<bst@pengutronix.de>:
> 0e0849cd1 ("graphene: disable neon support on arm 32bits") from 
> meta-oe
> needs to be reverted to make this patch work, right?

I guess we need to completely remove the recipe from meta-oe but I 
already sent a patch for that
diff mbox series

Patch

diff --git a/meta/recipes-graphics/graphene/graphene_1.10.8.bb b/meta/recipes-graphics/graphene/graphene_1.10.8.bb
index 813ff74adf..199c460feb 100644
--- a/meta/recipes-graphics/graphene/graphene_1.10.8.bb
+++ b/meta/recipes-graphics/graphene/graphene_1.10.8.bb
@@ -10,8 +10,10 @@  inherit gnomebase gobject-introspection gtk-doc
 SRC_URI[archive.sha256sum] = "a37bb0e78a419dcbeaa9c7027bcff52f5ec2367c25ec859da31dfde2928f279a"
 
 # gtk4 & mutter 41.0 requires graphene build with introspection
-PACKAGECONFIG ?= "introspection"
+PACKAGECONFIG ?= "introspection ${@bb.utils.contains('TUNE_FEATURES', 'aarch64', 'neon', '', d)}"
+
 PACKAGECONFIG[introspection] = "-Dintrospection=enabled,-Dintrospection=disabled,"
+PACKAGECONFIG[neon] = "-Darm_neon=true,-Darm_neon=false,"
 
 GTKDOC_MESON_OPTION = "gtk_doc"