diff options
author | Randolph Sapp <rs@ti.com> | 2023-02-24 10:12:15 +0000 |
---|---|---|
committer | Ryan Eatmon <reatmon@ti.com> | 2023-02-24 08:38:07 -0600 |
commit | 600d45cdb01499cc07e0a28b6abc732e2e46e94d (patch) | |
tree | ebf8f7b167b910cc288e1655ae6393a2b985a3f8 /meta-ti-bsp/recipes-graphics/mesa | |
parent | b5d687fe4607c41bc4dfed2364bbea0d7fad34d7 (diff) | |
download | meta-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.%.bbappend | 1 | ||||
-rw-r--r-- | meta-ti-bsp/recipes-graphics/mesa/mesa_22.%.bbappend | 1 | ||||
-rw-r--r-- | meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc | 48 |
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 | |||
5 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
6 | |||
7 | LIC_FILES_CHKSUM = "file://docs/license.rst;md5=9a383ee9f65a4e939d6630e9b067ff58" | ||
8 | |||
9 | BRANCH = "powervr/kirkstone/22.0" | ||
10 | |||
11 | SRC_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 | |||
21 | S = "${WORKDIR}/git" | ||
22 | |||
23 | SRCREV = "44b82a7b6fa8a86243911b1b0d6a07b0fd8ecfba" | ||
24 | |||
25 | PACKAGECONFIG: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 | |||
30 | PVR_DISPLAY_CONTROLLER_ALIAS ??= "tidss" | ||
31 | PACKAGECONFIG[pvr] = "-Dgallium-pvr-alias=${PVR_DISPLAY_CONTROLLER_ALIAS}," | ||
32 | PACKAGECONFIG[sgx] = "-Dgallium-sgx-alias=${PVR_DISPLAY_CONTROLLER_ALIAS}," | ||
33 | |||
34 | PACKAGECONFIG:remove = "video-codecs" | ||
35 | PACKAGECONFIG[video-codecs] = "" | ||
36 | |||
37 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
38 | PV = "22.0.3+pvr" | ||
39 | |||
40 | GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pvr', ',pvr', '', d)}" | ||
41 | GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'sgx', ',sgx', '', d)}" | ||
42 | |||
43 | do_install:append () { | ||
44 | # remove pvr custom pkgconfig | ||
45 | rm -rf ${D}${datadir}/pkgconfig | ||
46 | } | ||
47 | |||
48 | RRECOMMENDS:mesa-megadriver:append:class-target = " ${@d.getVar('PREFERRED_PROVIDER_virtual/gpudriver')}" | ||