All of lore.kernel.org
 help / color / mirror / Atom feed
From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] mesa: Fix a case when gbm is enabled but DRIDRIVERS is not defined
Date: Wed, 22 May 2019 10:58:27 -0700	[thread overview]
Message-ID: <20190522175827.3530-1-raj.khem@gmail.com> (raw)

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@gmail.com>
---
 .../mesa/files/dri-drivers-auto.patch         | 31 +++++++++++++++++++
 meta/recipes-graphics/mesa/mesa_19.0.3.bb     |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 meta/recipes-graphics/mesa/files/dri-drivers-auto.patch

diff --git a/meta/recipes-graphics/mesa/files/dri-drivers-auto.patch b/meta/recipes-graphics/mesa/files/dri-drivers-auto.patch
new file mode 100644
index 0000000000..532b2370b3
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/dri-drivers-auto.patch
@@ -0,0 +1,31 @@
+Fix meson regression for --enable-dri --enable-gbm combo equivalent
+
+For arm if DRIDRIVERS is set to 'auto' then respect that
+to enable dri support, this is required for devices where
+we use mesa to provide gl/libgbm implementation and rest
+comes from some proprietary driver, typical case is userland
+graphics driver for raspberrypi devices.
+
+This would mean that when we set 
+
+DRIDRIVERS_rpi = ",auto"
+
+Then the meson system will build the dri with gbm backend
+as was the case with autotools where --enable-dri did the
+same thing
+
+Upstream-Status: Inappropriate [Might be specific to arm systems]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- a/meson.build
++++ b/meson.build
+@@ -98,7 +98,7 @@ if _drivers.contains('auto')
+     if ['x86', 'x86_64'].contains(host_machine.cpu_family())
+       _drivers = ['i915', 'i965', 'r100', 'r200', 'nouveau']
+     elif ['arm', 'aarch64'].contains(host_machine.cpu_family())
+-      _drivers = []
++      _drivers = ['auto']
+     else
+       error('Unknown architecture @0@. Please pass -Ddri-drivers to set driver options. Patches gladly accepted to fix this.'.format(
+             host_machine.cpu_family()))
diff --git a/meta/recipes-graphics/mesa/mesa_19.0.3.bb b/meta/recipes-graphics/mesa/mesa_19.0.3.bb
index 36faa4a99d..c1703e04d2 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://dri-drivers-auto.patch \
            "
 
 SRC_URI[md5sum] = "d03bf14e42c0e54ebae5730712ccc408"
-- 
2.21.0



                 reply	other threads:[~2019-05-22 17:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190522175827.3530-1-raj.khem@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.