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 | |
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>
-rw-r--r-- | meta-ti-bsp/conf/layer.conf | 2 | ||||
-rw-r--r-- | meta-ti-bsp/conf/machine/beagleplay.conf | 1 | ||||
-rw-r--r-- | meta-ti-bsp/conf/machine/include/am62xx.inc | 1 | ||||
-rw-r--r-- | meta-ti-bsp/conf/machine/include/am65xx.inc | 1 | ||||
-rw-r--r-- | meta-ti-bsp/conf/machine/include/j721e.inc | 1 | ||||
-rw-r--r-- | meta-ti-bsp/conf/machine/include/j721s2.inc | 1 | ||||
-rw-r--r-- | meta-ti-bsp/conf/machine/include/j784s4.inc | 1 | ||||
-rw-r--r-- | meta-ti-bsp/conf/machine/include/mesa-pvr.inc | 8 | ||||
-rw-r--r-- | meta-ti-bsp/conf/machine/include/omap-a15.inc | 1 | ||||
-rw-r--r-- | meta-ti-bsp/conf/machine/include/ti33x.inc | 1 | ||||
-rw-r--r-- | meta-ti-bsp/conf/machine/include/ti43x.inc | 1 | ||||
-rw-r--r-- | meta-ti-bsp/recipes-graphics/mesa/mesa-gl_23.%.bbappend | 1 | ||||
-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_23.%.bbappend | 1 |
14 files changed, 24 insertions, 7 deletions
diff --git a/meta-ti-bsp/conf/layer.conf b/meta-ti-bsp/conf/layer.conf index 5520c7c2..bb286c2b 100644 --- a/meta-ti-bsp/conf/layer.conf +++ b/meta-ti-bsp/conf/layer.conf | |||
@@ -19,7 +19,7 @@ LAYERDEPENDS_meta-ti-bsp = " \ | |||
19 | " | 19 | " |
20 | 20 | ||
21 | SIGGEN_EXCLUDERECIPES_ABISAFE += " \ | 21 | SIGGEN_EXCLUDERECIPES_ABISAFE += " \ |
22 | mesa \ | 22 | mesa-pvr \ |
23 | " | 23 | " |
24 | 24 | ||
25 | HOSTTOOLS_NONFATAL += "truncate xxd comm" | 25 | HOSTTOOLS_NONFATAL += "truncate xxd comm" |
diff --git a/meta-ti-bsp/conf/machine/beagleplay.conf b/meta-ti-bsp/conf/machine/beagleplay.conf index e8d25cd9..c7b1414a 100644 --- a/meta-ti-bsp/conf/machine/beagleplay.conf +++ b/meta-ti-bsp/conf/machine/beagleplay.conf | |||
@@ -10,6 +10,7 @@ MACHINE_FEATURES += "screen gpu" | |||
10 | SERIAL_CONSOLES = "115200;ttyS2" | 10 | SERIAL_CONSOLES = "115200;ttyS2" |
11 | SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" | 11 | SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" |
12 | 12 | ||
13 | require conf/machine/include/mesa-pvr.inc | ||
13 | PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" | 14 | PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" |
14 | 15 | ||
15 | TFA_BOARD = "lite" | 16 | TFA_BOARD = "lite" |
diff --git a/meta-ti-bsp/conf/machine/include/am62xx.inc b/meta-ti-bsp/conf/machine/include/am62xx.inc index a205a18c..c1e0ed0c 100644 --- a/meta-ti-bsp/conf/machine/include/am62xx.inc +++ b/meta-ti-bsp/conf/machine/include/am62xx.inc | |||
@@ -3,6 +3,7 @@ SOC_FAMILY:append = ":am62xx" | |||
3 | 3 | ||
4 | MACHINE_FEATURES += "screen gpu" | 4 | MACHINE_FEATURES += "screen gpu" |
5 | 5 | ||
6 | require conf/machine/include/mesa-pvr.inc | ||
6 | PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" | 7 | PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" |
7 | 8 | ||
8 | # Default tiboot3.bin on AM62x is for HS-FS | 9 | # Default tiboot3.bin on AM62x is for HS-FS |
diff --git a/meta-ti-bsp/conf/machine/include/am65xx.inc b/meta-ti-bsp/conf/machine/include/am65xx.inc index 9fe851f4..9cbce243 100644 --- a/meta-ti-bsp/conf/machine/include/am65xx.inc +++ b/meta-ti-bsp/conf/machine/include/am65xx.inc | |||
@@ -3,6 +3,7 @@ SOC_FAMILY:append = ":am65xx" | |||
3 | 3 | ||
4 | MACHINE_FEATURES += "screen touchscreen gpu" | 4 | MACHINE_FEATURES += "screen touchscreen gpu" |
5 | 5 | ||
6 | require conf/machine/include/mesa-pvr.inc | ||
6 | PREFERRED_PROVIDER_virtual/gpudriver ?= "" | 7 | PREFERRED_PROVIDER_virtual/gpudriver ?= "" |
7 | 8 | ||
8 | KERNEL_DEVICETREE_PREFIX = "ti/k3-am654" | 9 | KERNEL_DEVICETREE_PREFIX = "ti/k3-am654" |
diff --git a/meta-ti-bsp/conf/machine/include/j721e.inc b/meta-ti-bsp/conf/machine/include/j721e.inc index 5e325ffe..f707cf26 100644 --- a/meta-ti-bsp/conf/machine/include/j721e.inc +++ b/meta-ti-bsp/conf/machine/include/j721e.inc | |||
@@ -3,6 +3,7 @@ SOC_FAMILY:append = ":j721e" | |||
3 | 3 | ||
4 | MACHINE_FEATURES += "screen gpu" | 4 | MACHINE_FEATURES += "screen gpu" |
5 | 5 | ||
6 | require conf/machine/include/mesa-pvr.inc | ||
6 | PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" | 7 | PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" |
7 | 8 | ||
8 | # On J721e the file tiboot3.bin comes from the bootloader not ti-sci-fw | 9 | # On J721e the file tiboot3.bin comes from the bootloader not ti-sci-fw |
diff --git a/meta-ti-bsp/conf/machine/include/j721s2.inc b/meta-ti-bsp/conf/machine/include/j721s2.inc index 70569a16..98cc611f 100644 --- a/meta-ti-bsp/conf/machine/include/j721s2.inc +++ b/meta-ti-bsp/conf/machine/include/j721s2.inc | |||
@@ -3,6 +3,7 @@ SOC_FAMILY:append = ":j721s2" | |||
3 | 3 | ||
4 | MACHINE_FEATURES += "screen gpu" | 4 | MACHINE_FEATURES += "screen gpu" |
5 | 5 | ||
6 | require conf/machine/include/mesa-pvr.inc | ||
6 | PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" | 7 | PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" |
7 | 8 | ||
8 | TFA_BOARD = "generic" | 9 | TFA_BOARD = "generic" |
diff --git a/meta-ti-bsp/conf/machine/include/j784s4.inc b/meta-ti-bsp/conf/machine/include/j784s4.inc index d03ee4a4..de207687 100644 --- a/meta-ti-bsp/conf/machine/include/j784s4.inc +++ b/meta-ti-bsp/conf/machine/include/j784s4.inc | |||
@@ -3,6 +3,7 @@ SOC_FAMILY:append = ":j784s4" | |||
3 | 3 | ||
4 | MACHINE_FEATURES += "screen gpu" | 4 | MACHINE_FEATURES += "screen gpu" |
5 | 5 | ||
6 | require conf/machine/include/mesa-pvr.inc | ||
6 | PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" | 7 | PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" |
7 | 8 | ||
8 | TFA_BOARD = "j784s4" | 9 | TFA_BOARD = "j784s4" |
diff --git a/meta-ti-bsp/conf/machine/include/mesa-pvr.inc b/meta-ti-bsp/conf/machine/include/mesa-pvr.inc new file mode 100644 index 00000000..d5581315 --- /dev/null +++ b/meta-ti-bsp/conf/machine/include/mesa-pvr.inc | |||
@@ -0,0 +1,8 @@ | |||
1 | PREFERRED_PROVIDER_virtual/mesa ?= "mesa-pvr" | ||
2 | PREFERRED_PROVIDER_virtual/egl ?= "mesa-pvr" | ||
3 | PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa-pvr" | ||
4 | PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa-pvr" | ||
5 | PREFERRED_PROVIDER_virtual/libgles3 ?= "mesa-pvr" | ||
6 | PREFERRED_PROVIDER_virtual/libgbm ?= "mesa-pvr" | ||
7 | PREFERRED_PROVIDER_virtual/libglx ?= "mesa-pvr" | ||
8 | PREFERRED_PROVIDER_virtual/libgl ?= "mesa-pvr" | ||
diff --git a/meta-ti-bsp/conf/machine/include/omap-a15.inc b/meta-ti-bsp/conf/machine/include/omap-a15.inc index 49db1cb6..700b1a11 100644 --- a/meta-ti-bsp/conf/machine/include/omap-a15.inc +++ b/meta-ti-bsp/conf/machine/include/omap-a15.inc | |||
@@ -12,6 +12,7 @@ PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging" | |||
12 | PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging" | 12 | PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging" |
13 | 13 | ||
14 | # Graphics providers and variables | 14 | # Graphics providers and variables |
15 | require conf/machine/include/mesa-pvr.inc | ||
15 | PREFERRED_PROVIDER_virtual/gpudriver ?= "" | 16 | PREFERRED_PROVIDER_virtual/gpudriver ?= "" |
16 | PVR_DISPLAY_CONTROLLER_ALIAS ?= "omapdrm" | 17 | PVR_DISPLAY_CONTROLLER_ALIAS ?= "omapdrm" |
17 | 18 | ||
diff --git a/meta-ti-bsp/conf/machine/include/ti33x.inc b/meta-ti-bsp/conf/machine/include/ti33x.inc index 4f6d90bf..bce88309 100644 --- a/meta-ti-bsp/conf/machine/include/ti33x.inc +++ b/meta-ti-bsp/conf/machine/include/ti33x.inc | |||
@@ -13,6 +13,7 @@ PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging" | |||
13 | PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging" | 13 | PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging" |
14 | 14 | ||
15 | # Graphics providers and variables | 15 | # Graphics providers and variables |
16 | require conf/machine/include/mesa-pvr.inc | ||
16 | PREFERRED_PROVIDER_virtual/gpudriver ?= "" | 17 | PREFERRED_PROVIDER_virtual/gpudriver ?= "" |
17 | PVR_DISPLAY_CONTROLLER_ALIAS ?= "tilcdc" | 18 | PVR_DISPLAY_CONTROLLER_ALIAS ?= "tilcdc" |
18 | 19 | ||
diff --git a/meta-ti-bsp/conf/machine/include/ti43x.inc b/meta-ti-bsp/conf/machine/include/ti43x.inc index 5b40925e..c1009dc6 100644 --- a/meta-ti-bsp/conf/machine/include/ti43x.inc +++ b/meta-ti-bsp/conf/machine/include/ti43x.inc | |||
@@ -13,6 +13,7 @@ PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging" | |||
13 | PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging" | 13 | PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging" |
14 | 14 | ||
15 | # Graphics providers and variables | 15 | # Graphics providers and variables |
16 | require conf/machine/include/mesa-pvr.inc | ||
16 | PREFERRED_PROVIDER_virtual/gpudriver ?= "" | 17 | PREFERRED_PROVIDER_virtual/gpudriver ?= "" |
17 | PVR_DISPLAY_CONTROLLER_ALIAS ?= "omapdrm" | 18 | PVR_DISPLAY_CONTROLLER_ALIAS ?= "omapdrm" |
18 | 19 | ||
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-gl_23.%.bbappend b/meta-ti-bsp/recipes-graphics/mesa/mesa-gl_23.%.bbappend deleted file mode 100644 index 912e9e9d..00000000 --- a/meta-ti-bsp/recipes-graphics/mesa/mesa-gl_23.%.bbappend +++ /dev/null | |||
@@ -1 +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/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 | ||
5 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | 5 | require recipes-graphics/mesa/mesa.inc |
6 | |||
7 | SUMMARY += " (with PowerVR support for TI platforms)" | ||
6 | 8 | ||
7 | LIC_FILES_CHKSUM = "file://docs/license.rst;md5=63779ec98d78d823a9dc533a0735ef10" | 9 | LIC_FILES_CHKSUM = "file://docs/license.rst;md5=63779ec98d78d823a9dc533a0735ef10" |
8 | 10 | ||
9 | BRANCH = "powervr/kirkstone/22.3.5" | 11 | BRANCH = "powervr/kirkstone/${PV}" |
10 | 12 | ||
11 | SRC_URI = " \ | 13 | SRC_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" | |||
38 | PACKAGECONFIG[xvmc] = "" | 40 | PACKAGECONFIG[xvmc] = "" |
39 | 41 | ||
40 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 42 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
41 | PV = "22.3.5+pvr" | ||
42 | 43 | ||
43 | GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pvr', ',pvr', '', d)}" | 44 | GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pvr', ',pvr', '', d)}" |
44 | GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'sgx', ',sgx', '', d)}" | 45 | GALLIUMDRIVERS: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 | ||
53 | FILES:mesa-vulkan-drivers += " ${libdir}/libpvr_mesa_wsi.so" | 54 | FILES:${PN}-dev += "${datadir}/mesa/wayland-drm.xml" |
55 | FILES:mesa-vulkan-drivers += "${libdir}/libpvr_mesa_wsi.so" | ||
54 | 56 | ||
55 | RRECOMMENDS:mesa-megadriver:append:class-target = " ${@d.getVar('PREFERRED_PROVIDER_virtual/gpudriver')}" | 57 | RRECOMMENDS:mesa-megadriver:append:class-target = " ${@d.getVar('PREFERRED_PROVIDER_virtual/gpudriver')}" |
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa_23.%.bbappend b/meta-ti-bsp/recipes-graphics/mesa/mesa_23.%.bbappend deleted file mode 100644 index 912e9e9d..00000000 --- a/meta-ti-bsp/recipes-graphics/mesa/mesa_23.%.bbappend +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | require ${@bb.utils.contains_any('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-img-rogue-driver ti-sgx-ddk-km', 'pvr-mesa.inc', '', d)} | ||