summaryrefslogtreecommitdiffstats
path: root/meta-ti-bsp/recipes-graphics/mesa
diff options
context:
space:
mode:
authorRandolph Sapp <rs@ti.com>2023-01-30 17:20:05 -0600
committerRyan Eatmon <reatmon@ti.com>2023-02-16 13:31:05 -0600
commit15417ca726f75881a2c51c08d258ea923803cbb9 (patch)
tree8ba9ef844b0dda04b7d2273f43b4502ffbddaf04 /meta-ti-bsp/recipes-graphics/mesa
parent248bea1c505e2f401a8521bc7edf3bf314b237bd (diff)
downloadmeta-ti-15417ca726f75881a2c51c08d258ea923803cbb9.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: 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.0.%.bbappend1
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa_22.0.%.bbappend1
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc40
3 files changed, 42 insertions, 0 deletions
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-gl_22.0.%.bbappend b/meta-ti-bsp/recipes-graphics/mesa/mesa-gl_22.0.%.bbappend
new file mode 100644
index 00000000..912e9e9d
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-gl_22.0.%.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.0.%.bbappend b/meta-ti-bsp/recipes-graphics/mesa/mesa_22.0.%.bbappend
new file mode 100644
index 00000000..912e9e9d
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa_22.0.%.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..17edee8d
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc
@@ -0,0 +1,40 @@
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
5BRANCH = "powervr/kirkstone/22.0"
6
7SRC_URI = " \
8 git://gitlab.freedesktop.org/StaticRocket/mesa.git;protocol=https;branch=${BRANCH} \
9 file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
10 file://0002-meson.build-make-TLS-ELF-optional.patch \
11 file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
12 file://0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch \
13 file://0001-util-format-Check-for-NEON-before-using-it.patch \
14 file://0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch \
15"
16
17S = "${WORKDIR}/git"
18
19SRCREV = "44b82a7b6fa8a86243911b1b0d6a07b0fd8ecfba"
20
21PACKAGECONFIG:append = " \
22 ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-img-rogue-driver', 'pvr', '', d)} \
23 ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-sgx-ddk-km', 'sgx', '', d)} \
24"
25
26PVR_DISPLAY_CONTROLLER_ALIAS ??= "tidss"
27PACKAGECONFIG[pvr] = "-Dgallium-pvr-alias=${PVR_DISPLAY_CONTROLLER_ALIAS},"
28PACKAGECONFIG[sgx] = "-Dgallium-sgx-alias=${PVR_DISPLAY_CONTROLLER_ALIAS},"
29
30PV:append = "+pvr"
31
32GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pvr', ',pvr', '', d)}"
33GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'sgx', ',sgx', '', d)}"
34
35do_install:append () {
36 # remove pvr custom pkgconfig
37 rm -rf ${D}${datadir}/pkgconfig
38}
39
40RRECOMMENDS:mesa-megadriver:class-target:append = "${@d.getVar('PREFERRED_PROVIDER_virtual/gpudriver')}"