[oe-commits] [openembedded-core] 10/12: mesa: Fix a case when gbm is enabled but DRIDRIVERS is not defined

git at git.openembedded.org git at git.openembedded.org
Fri May 24 16:55:16 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 3a22cfc00ce09de43668f725c17acba7200bc628
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Wed May 22 11:28:27 2019 -0700

    mesa: Fix a case when gbm is enabled but DRIDRIVERS is not defined
    
    This is a typical scenario with arm platforms, with meson if DRIDRIVERS
    is empty then dri is disabled automatically, but gbm needs dri2 enabled
    for it to have proper backend, in autotools we could use --enable-gbm
    --enable-dri and get correct behaviour but with meson enabling dri2 only
    works if DRIDRIVERS is not empty
    
    This fixes mesa-gl build for rpi machines when using userland graphics
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Signed-off-by: Andrei Gherzan <andrei at gherzan.ro>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 ...0001-Allow-enable-DRI-without-DRI-drivers.patch | 45 ++++++++++++++++++++++
 meta/recipes-graphics/mesa/mesa.inc                |  2 +-
 meta/recipes-graphics/mesa/mesa_19.0.3.bb          |  1 +
 3 files changed, 47 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/mesa/files/0001-Allow-enable-DRI-without-DRI-drivers.patch b/meta/recipes-graphics/mesa/files/0001-Allow-enable-DRI-without-DRI-drivers.patch
new file mode 100644
index 0000000..52d670a
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0001-Allow-enable-DRI-without-DRI-drivers.patch
@@ -0,0 +1,45 @@
+From 8e0a58c8eea7ed70071cac139655700fdfa16445 Mon Sep 17 00:00:00 2001
+From: Andrei Gherzan <andrei at gherzan.ro>
+Date: Wed, 22 May 2019 18:32:07 +0100
+Subject: [PATCH] Allow enable DRI without DRI drivers
+
+Upstream-status: Pending
+Signed-off-by: Andrei Gherzan <andrei at gherzan.ro>
+---
+ meson.build       | 2 +-
+ meson_options.txt | 6 ++++++
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 53d02e3..9a8578f 100644
+--- a/meson.build
++++ b/meson.build
+@@ -119,7 +119,7 @@ with_dri_r200 = _drivers.contains('r200')
+ with_dri_nouveau = _drivers.contains('nouveau')
+ with_dri_swrast = _drivers.contains('swrast')
+ 
+-with_dri = _drivers.length() != 0 and _drivers != ['']
++with_dri = get_option('dri') or (_drivers.length() != 0 and _drivers != [''])
+ 
+ _drivers = get_option('gallium-drivers')
+ if _drivers.contains('auto')
+diff --git a/meson_options.txt b/meson_options.txt
+index ccf7065..5174320 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -34,6 +34,12 @@ option(
+   choices : ['auto', 'true', 'false'],
+   description : 'enable support for dri3'
+ )
++option(
++  'dri',
++  type : 'boolean',
++  value : false,
++  description : 'enable support for dri'
++)
+ option(
+   'dri-drivers',
+   type : 'array',
+-- 
+2.17.1
+
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index cd3ddfd..3ecfb85 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -70,7 +70,7 @@ DRIDRIVERS_class-nativesdk = "swrast"
 DRIDRIVERS_append_x86_class-target = ",r100,r200,nouveau,i965,i915"
 DRIDRIVERS_append_x86-64_class-target = ",r100,r200,nouveau,i965,i915"
 # "dri" requires "opengl"
-PACKAGECONFIG[dri] = "-Ddri-drivers=${DRIDRIVERS}, -Ddri-drivers='', xorgproto libdrm"
+PACKAGECONFIG[dri] = "-Ddri=true -Ddri-drivers=${DRIDRIVERS}, -Ddri=false -Ddri-drivers='', xorgproto libdrm"
 PACKAGECONFIG[dri3] = "-Ddri3=true, -Ddri3=false, xorgproto libxshmfence"
 
 # Vulkan drivers need dri3 enabled
diff --git a/meta/recipes-graphics/mesa/mesa_19.0.3.bb b/meta/recipes-graphics/mesa/mesa_19.0.3.bb
index 36faa4a..8a72df1 100644
--- a/meta/recipes-graphics/mesa/mesa_19.0.3.bb
+++ b/meta/recipes-graphics/mesa/mesa_19.0.3.bb
@@ -3,6 +3,7 @@ require ${BPN}.inc
 SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
            file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
            file://0001-meson.build-make-TLS-GLX-optional-again.patch \
+           file://0001-Allow-enable-DRI-without-DRI-drivers.patch \
            "
 
 SRC_URI[md5sum] = "d03bf14e42c0e54ebae5730712ccc408"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list