summaryrefslogtreecommitdiffstats
path: root/meta-ti-bsp/recipes-graphics/mesa
diff options
context:
space:
mode:
authorRandolph Sapp <rs@ti.com>2023-02-24 10:12:15 +0000
committerRyan Eatmon <reatmon@ti.com>2023-02-24 08:38:07 -0600
commit600d45cdb01499cc07e0a28b6abc732e2e46e94d (patch)
treeebf8f7b167b910cc288e1655ae6393a2b985a3f8 /meta-ti-bsp/recipes-graphics/mesa
parentb5d687fe4607c41bc4dfed2364bbea0d7fad34d7 (diff)
downloadmeta-ti-600d45cdb01499cc07e0a28b6abc732e2e46e94d.tar.gz
meta-ti-bsp: graphics: Resolve dependency chain
Patched mesa will now be configured based on what virtual/gpudriver preferred provider is selected. The gpu drivers will now runtime recommend the associated UM components. Signed-off-by: Randolph Sapp <rs@ti.com> Signed-off-by: Denys Dmytriyenko <denys@konsulko.com> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
Diffstat (limited to 'meta-ti-bsp/recipes-graphics/mesa')
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa-gl_22.%.bbappend1
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa_22.%.bbappend1
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc48
3 files changed, 50 insertions, 0 deletions
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-gl_22.%.bbappend b/meta-ti-bsp/recipes-graphics/mesa/mesa-gl_22.%.bbappend
new file mode 100644
index 00000000..912e9e9d
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-gl_22.%.bbappend
@@ -0,0 +1 @@
require ${@bb.utils.contains_any('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-img-rogue-driver ti-sgx-ddk-km', 'pvr-mesa.inc', '', d)}
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa_22.%.bbappend b/meta-ti-bsp/recipes-graphics/mesa/mesa_22.%.bbappend
new file mode 100644
index 00000000..912e9e9d
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa_22.%.bbappend
@@ -0,0 +1 @@
require ${@bb.utils.contains_any('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-img-rogue-driver ti-sgx-ddk-km', 'pvr-mesa.inc', '', d)}
diff --git a/meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc b/meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc
new file mode 100644
index 00000000..96c484a7
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc
@@ -0,0 +1,48 @@
1# PowerVR Graphics require several patches that have not made their way
2# upstream yet. This allows us to build the shims we need without completely
3# clobbering mesa.
4
5FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
6
7LIC_FILES_CHKSUM = "file://docs/license.rst;md5=9a383ee9f65a4e939d6630e9b067ff58"
8
9BRANCH = "powervr/kirkstone/22.0"
10
11SRC_URI = " \
12 git://gitlab.freedesktop.org/StaticRocket/mesa.git;protocol=https;branch=${BRANCH} \
13 file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
14 file://0002-meson.build-make-TLS-ELF-optional.patch \
15 file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
16 file://0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch \
17 file://0001-util-format-Check-for-NEON-before-using-it.patch \
18 file://0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch \
19"
20
21S = "${WORKDIR}/git"
22
23SRCREV = "44b82a7b6fa8a86243911b1b0d6a07b0fd8ecfba"
24
25PACKAGECONFIG:append = " \
26 ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-img-rogue-driver', 'pvr', '', d)} \
27 ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-sgx-ddk-km', 'sgx', '', d)} \
28"
29
30PVR_DISPLAY_CONTROLLER_ALIAS ??= "tidss"
31PACKAGECONFIG[pvr] = "-Dgallium-pvr-alias=${PVR_DISPLAY_CONTROLLER_ALIAS},"
32PACKAGECONFIG[sgx] = "-Dgallium-sgx-alias=${PVR_DISPLAY_CONTROLLER_ALIAS},"
33
34PACKAGECONFIG:remove = "video-codecs"
35PACKAGECONFIG[video-codecs] = ""
36
37PACKAGE_ARCH = "${MACHINE_ARCH}"
38PV = "22.0.3+pvr"
39
40GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pvr', ',pvr', '', d)}"
41GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'sgx', ',sgx', '', d)}"
42
43do_install:append () {
44 # remove pvr custom pkgconfig
45 rm -rf ${D}${datadir}/pkgconfig
46}
47
48RRECOMMENDS:mesa-megadriver:append:class-target = " ${@d.getVar('PREFERRED_PROVIDER_virtual/gpudriver')}"