diff options
author | Denys Dmytriyenko <denys@konsulko.com> | 2023-05-11 18:40:49 +0000 |
---|---|---|
committer | Ryan Eatmon <reatmon@ti.com> | 2023-05-11 14:19:01 -0500 |
commit | 24e9324551ecd853b7fa5326fadface547b96652 (patch) | |
tree | 87f05dc899485c047a3de1c9e1b14f7f6d18564a /meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_22.3.5.bb | |
parent | f3a081a6c22773bba1fdf5e488ff7dec30c3dc84 (diff) | |
download | meta-ti-24e9324551ecd853b7fa5326fadface547b96652.tar.gz |
mesa-pvr: convert bbappend into standalone alternative provider
There are some unobvious issues with adding PVR support to Mesa
via a bbappend:
1. We need to mark mesa package as machine-specific, due to
differences in builds between SGX, Rogue and software-rendering
2. We also need to then mark mesa package as providing safe
ABIs (EGL/GLES/GBM) in order for all generic dependent packages
to not be treated as machine-specific, allowing their re-use
across different machines of the same architecture
But doing the above alters the upstream mesa package and changes
its signatures even when not building for TI platforms, which is
a Yocto Project compliance violation.
In order to resolve this issue, convert Mesa bbappend, that adds
PVR support, into its own standalone alternative provider, called
mesa-pvr and allow selecting it with PREFERRED_PROVIDER settings.
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/mesa-pvr_22.3.5.bb')
-rw-r--r-- | meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_22.3.5.bb | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_22.3.5.bb b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_22.3.5.bb new file mode 100644 index 00000000..0de3cb94 --- /dev/null +++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_22.3.5.bb | |||
@@ -0,0 +1,57 @@ | |||
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 | require recipes-graphics/mesa/mesa.inc | ||
6 | |||
7 | SUMMARY += " (with PowerVR support for TI platforms)" | ||
8 | |||
9 | LIC_FILES_CHKSUM = "file://docs/license.rst;md5=63779ec98d78d823a9dc533a0735ef10" | ||
10 | |||
11 | BRANCH = "powervr/kirkstone/${PV}" | ||
12 | |||
13 | SRC_URI = " \ | ||
14 | git://gitlab.freedesktop.org/StaticRocket/mesa.git;protocol=https;branch=${BRANCH} \ | ||
15 | file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \ | ||
16 | file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \ | ||
17 | file://0001-util-format-Check-for-NEON-before-using-it.patch \ | ||
18 | file://0001-gbm-backend-fix-gbm-compile-without-dri.patch \ | ||
19 | file://0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch \ | ||
20 | " | ||
21 | |||
22 | S = "${WORKDIR}/git" | ||
23 | |||
24 | SRCREV = "54fd9d7dea098b6f11c2a244b0c6763dc8c5690c" | ||
25 | |||
26 | PACKAGECONFIG:append = " \ | ||
27 | ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-img-rogue-driver', 'pvr', '', d)} \ | ||
28 | ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-sgx-ddk-km', 'sgx', '', d)} \ | ||
29 | " | ||
30 | |||
31 | PVR_DISPLAY_CONTROLLER_ALIAS ??= "tidss" | ||
32 | PACKAGECONFIG[pvr] = "-Dgallium-pvr-alias=${PVR_DISPLAY_CONTROLLER_ALIAS}," | ||
33 | PACKAGECONFIG[sgx] = "-Dgallium-sgx-alias=${PVR_DISPLAY_CONTROLLER_ALIAS}," | ||
34 | |||
35 | PACKAGECONFIG:remove = "video-codecs" | ||
36 | PACKAGECONFIG[video-codecs] = "" | ||
37 | PACKAGECONFIG:remove = "elf-tls" | ||
38 | PACKAGECONFIG[elf-tls] = "" | ||
39 | PACKAGECONFIG:remove = "xvmc" | ||
40 | PACKAGECONFIG[xvmc] = "" | ||
41 | |||
42 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
43 | |||
44 | GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pvr', ',pvr', '', d)}" | ||
45 | GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'sgx', ',sgx', '', d)}" | ||
46 | |||
47 | VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pvr', ',pvr', '', d)}" | ||
48 | |||
49 | do_install:append () { | ||
50 | # remove pvr custom pkgconfig | ||
51 | rm -rf ${D}${datadir}/pkgconfig | ||
52 | } | ||
53 | |||
54 | FILES:${PN}-dev += "${datadir}/mesa/wayland-drm.xml" | ||
55 | FILES:mesa-vulkan-drivers += "${libdir}/libpvr_mesa_wsi.so" | ||
56 | |||
57 | RRECOMMENDS:mesa-megadriver:append:class-target = " ${@d.getVar('PREFERRED_PROVIDER_virtual/gpudriver')}" | ||