summaryrefslogtreecommitdiffstats
path: root/meta-ti-bsp/recipes-graphics
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denys@konsulko.com>2023-05-11 18:40:49 +0000
committerRyan Eatmon <reatmon@ti.com>2023-05-11 14:27:03 -0500
commit94635de40288b1ba132d873839704dd43ae96d56 (patch)
tree0d787f300aba89eaf75304f34b71b47fa49aeebf /meta-ti-bsp/recipes-graphics
parent51ce439263e9de02a800c0285f2d9c3c6d259676 (diff)
downloadmeta-ti-94635de40288b1ba132d873839704dd43ae96d56.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')
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa-gl_22.%.bbappend1
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_22.3.5.bb (renamed from meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc)10
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa_22.%.bbappend1
3 files changed, 6 insertions, 6 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
deleted file mode 100644
index 912e9e9d..00000000
--- a/meta-ti-bsp/recipes-graphics/mesa/mesa-gl_22.%.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require ${@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/mesa-pvr_22.3.5.bb
index caf94156..0de3cb94 100644
--- a/meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_22.3.5.bb
@@ -2,11 +2,13 @@
2# upstream yet. This allows us to build the shims we need without completely 2# upstream yet. This allows us to build the shims we need without completely
3# clobbering mesa. 3# clobbering mesa.
4 4
5FILESEXTRAPATHS:prepend := "${THISDIR}/files:" 5require recipes-graphics/mesa/mesa.inc
6
7SUMMARY += " (with PowerVR support for TI platforms)"
6 8
7LIC_FILES_CHKSUM = "file://docs/license.rst;md5=63779ec98d78d823a9dc533a0735ef10" 9LIC_FILES_CHKSUM = "file://docs/license.rst;md5=63779ec98d78d823a9dc533a0735ef10"
8 10
9BRANCH = "powervr/kirkstone/22.3.5" 11BRANCH = "powervr/kirkstone/${PV}"
10 12
11SRC_URI = " \ 13SRC_URI = " \
12 git://gitlab.freedesktop.org/StaticRocket/mesa.git;protocol=https;branch=${BRANCH} \ 14 git://gitlab.freedesktop.org/StaticRocket/mesa.git;protocol=https;branch=${BRANCH} \
@@ -38,7 +40,6 @@ PACKAGECONFIG:remove = "xvmc"
38PACKAGECONFIG[xvmc] = "" 40PACKAGECONFIG[xvmc] = ""
39 41
40PACKAGE_ARCH = "${MACHINE_ARCH}" 42PACKAGE_ARCH = "${MACHINE_ARCH}"
41PV = "22.3.5+pvr"
42 43
43GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pvr', ',pvr', '', d)}" 44GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pvr', ',pvr', '', d)}"
44GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'sgx', ',sgx', '', d)}" 45GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'sgx', ',sgx', '', d)}"
@@ -50,6 +51,7 @@ do_install:append () {
50 rm -rf ${D}${datadir}/pkgconfig 51 rm -rf ${D}${datadir}/pkgconfig
51} 52}
52 53
53FILES:mesa-vulkan-drivers += " ${libdir}/libpvr_mesa_wsi.so" 54FILES:${PN}-dev += "${datadir}/mesa/wayland-drm.xml"
55FILES:mesa-vulkan-drivers += "${libdir}/libpvr_mesa_wsi.so"
54 56
55RRECOMMENDS:mesa-megadriver:append:class-target = " ${@d.getVar('PREFERRED_PROVIDER_virtual/gpudriver')}" 57RRECOMMENDS:mesa-megadriver:append:class-target = " ${@d.getVar('PREFERRED_PROVIDER_virtual/gpudriver')}"
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa_22.%.bbappend b/meta-ti-bsp/recipes-graphics/mesa/mesa_22.%.bbappend
deleted file mode 100644
index 912e9e9d..00000000
--- a/meta-ti-bsp/recipes-graphics/mesa/mesa_22.%.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require ${@bb.utils.contains_any('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-img-rogue-driver ti-sgx-ddk-km', 'pvr-mesa.inc', '', d)}