[v2,4/4] mesa: make gallium virgl optional

Submitted by Marco Felsch on May 2, 2019, 6:09 p.m. | Patch ID: 160841

Details

Message ID 20190502180916.32114-5-m.felsch@pengutronix.de
State New
Headers show

Commit Message

Marco Felsch May 2, 2019, 6:09 p.m.
Same as for the swrast target it isn't a good solution to enable the
target per default since we compiling for embedded targets most the
time. Make this target optional to save some memory.

Upstream-Status: Submitted [openembedded-core@lists.openembedded.org]

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
Changelog:

v2:
- new patch

 meta/recipes-graphics/mesa/mesa.inc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index b41d3054c3..6a55848c8a 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -87,6 +87,8 @@  PACKAGECONFIG[egl] = "-Degl=true, -Degl=false"
 PACKAGECONFIG[etnaviv] = ""
 PACKAGECONFIG[kmsro] = ""
 PACKAGECONFIG[swrast] = ""
+PACKAGECONFIG[r600] = ""
+PACKAGECONFIG[virgl] = ""
 
 GALLIUMDRIVERS = ""
 GALLIUMDRIVERS +="${@bb.utils.contains('PACKAGECONFIG', 'swrast', 'swrast', '', d)}"
@@ -98,11 +100,9 @@  GALLIUMDRIVERS_LLVM33 = "${@bb.utils.contains('PACKAGECONFIG', 'r600', 'radeonsi
 GALLIUMDRIVERS_LLVM33_ENABLED = "${@oe.utils.version_less_or_equal('MESA_LLVM_RELEASE', '3.2', False, len('${GALLIUMDRIVERS_LLVM33}') > 0, d)}"
 GALLIUMDRIVERS_LLVM = "r300 svga nouveau ${@'${GALLIUMDRIVERS_LLVM33}' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}"
 
-PACKAGECONFIG[r600] = ""
-
 GALLIUMDRIVERS += "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', '${GALLIUMDRIVERS_LLVM}', '', d)}"
 GALLIUMDRIVERS += "${@bb.utils.contains('PACKAGECONFIG', 'r600', 'r600', '', d)}"
-GALLIUMDRIVERS += "virgl"
+GALLIUMDRIVERS += "${@bb.utils.contains('PACKAGECONFIG', 'virgl', 'virgl', '', d)}"
 GALLIUMDRIVERS_MESON = "${@",".join("${GALLIUMDRIVERS}".split())}"
 
 # keep --with-gallium-drivers separate, because when only one of gallium versions is enabled, other 2 were adding --without-gallium-drivers

Comments

Alexander Kanavin May 3, 2019, 10:17 a.m.
On Thu, 2 May 2019 at 20:09, Marco Felsch <m.felsch@pengutronix.de> wrote:
> Same as for the swrast target it isn't a good solution to enable the
> target per default since we compiling for embedded targets most the
> time. Make this target optional to save some memory.

This will probably break virgl oe-selftests as they expect target mesa
to be configured with virgl.
Try 'oe-selftest -r runtime_test.TestImage.test_testimage_virgl_gtk'
and 'oe-selftest -r
runtime_test.TestImage.test_testimage_virgl_headless'

You can address this by setting PACKAGECONFIG_append_qemuall = " virgl".


> Upstream-Status: Submitted [openembedded-core@lists.openembedded.org]

This is not necessary. It is only used for patches to the recipes that
live as files in the layer tree.

Alex
Marco Felsch May 6, 2019, 5:52 a.m.
On 19-05-03 12:17, Alexander Kanavin wrote:
> On Thu, 2 May 2019 at 20:09, Marco Felsch <m.felsch@pengutronix.de> wrote:
> > Same as for the swrast target it isn't a good solution to enable the
> > target per default since we compiling for embedded targets most the
> > time. Make this target optional to save some memory.
> 
> This will probably break virgl oe-selftests as they expect target mesa
> to be configured with virgl.
> Try 'oe-selftest -r runtime_test.TestImage.test_testimage_virgl_gtk'
> and 'oe-selftest -r
> runtime_test.TestImage.test_testimage_virgl_headless'
> 
> You can address this by setting PACKAGECONFIG_append_qemuall = " virgl".

Thanks for covering that. I will add this line in my v3.

> 
> > Upstream-Status: Submitted [openembedded-core@lists.openembedded.org]
> 
> This is not necessary. It is only used for patches to the recipes that
> live as files in the layer tree.

Oh.. Okay now I got it.

Regards,
  Marco

> 
> Alex
>