Skip to contentSkip to conversation

all: Graphics recipe overhaul

PATCH In review Randolph Sapp 3 participants 8 messages Jan 19, 2023 – Jan 23, 2023 1 message not in the archive Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 all: Graphics recipe overhaul

Individually package rogue graphics components to prevent conflicts with other recipes.

The package ti-img-rogue-umlibs will now distribute the window system agnostic components of the DDK. This being the IMG's implementations of OpenGLES, OpenCL, and Vulkan in binary format and the device firmware. These are the only components that cannot be open source currently.

The mesa component is currently piggybacking off the default mesa package. It's not elegant, but it reflects the implementation well and allows users to config mesa as needed.

This introduces the following combined features:
- powervr-rogue-graphics
- powervr-sgx-graphics

Combined features work by requiring both a matching machine feature and distro feature to be present. This seemed to be the most applicable for us considering graphics support relies on out of tree modules users may want to exclude as well as specific hardware to be present.

Mesa and other userspace tools are modified to suite sgx / rogue when both features are present. Anything not specifically carrying patches for sgx / rogue was made to be dependent on opengl as a distro feature to align with oe-core.

This has a daughter patch with the same name submitted to meta-arago.

---

Sorry for the rename. This is actually the 5th version of this patch but I wanted it to keep a similar name between meta-arago and meta-ti since these two hinge off each other.

 meta-ti-bsp/README                            |   9 +
 meta-ti-bsp/conf/machine/am62xx-lp-evm.conf   |   2 -
 meta-ti-bsp/conf/machine/include/am62xx.inc   |   8 +-
 meta-ti-bsp/conf/machine/include/am65xx.inc   |   8 +-
 meta-ti-bsp/conf/machine/include/j721e.inc    |   8 +-
 meta-ti-bsp/conf/machine/include/j721s2.inc   |   8 +-
 meta-ti-bsp/conf/machine/include/omap-a15.inc |   7 +-
 meta-ti-bsp/conf/machine/include/ti33x.inc    |   7 +-
 meta-ti-bsp/conf/machine/include/ti43x.inc    |   7 +-
 meta-ti-bsp/conf/machine/j784s4-evm.conf      |   2 +-
 ...-OpenEmbedded-nodistro-internal-aarc.patch |  29 --
 ...bb => ti-img-rogue-driver_1.18.6276027.bb} |  16 +-
 .../ti-sgx-ddk-km_1.17.4948957.bb             |   4 +-
 .../ti-img-rogue-umlibs_1.15.6133109.bb       |  71 ----
 .../ti-img-rogue-umlibs_1.18.6276027.bb       |  41 +++
 .../libgles/ti-sgx-ddk-um_1.17.4948957.bb     |   2 +-
 ...nd-deprecate-drm_handle_format-and-d.patch | 158 +++++++++
 ...fine-__NR_futex-if-it-does-not-exist.patch |  34 ++
 ...sdetects-64bit-atomics-on-mips-clang.patch |  25 ++
 ...k-for-all-linux-host_os-combinations.patch |  43 +++
 ...ormat-Check-for-NEON-before-using-it.patch |  47 +++
 ...02-meson.build-make-TLS-ELF-optional.patch |  61 ++++
 .../recipes-graphics/mesa/mesa-gl_22.0.3.bb   |  13 +
 meta-ti-bsp/recipes-graphics/mesa/mesa.inc    | 323 ++++++++++++++++++
 .../recipes-graphics/mesa/mesa_22.0.3.bb      |   2 +
 .../recipes-graphics/mesa/rogue-mesa.inc      |  29 ++
 26 files changed, 801 insertions(+), 163 deletions(-)
 delete mode 100644 meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver/0001-compiler-support-OpenEmbedded-nodistro-internal-aarc.patch
 rename meta-ti-bsp/recipes-bsp/powervr-drivers/{ti-img-rogue-driver_1.15.6133109.bb => ti-img-rogue-driver_1.18.6276027.bb} (72%)
 delete mode 100644 meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.15.6133109.bb
 create mode 100644 meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.18.6276027.bb
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa-gl_22.0.3.bb
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa.inc
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa_22.0.3.bb
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/rogue-mesa.inc
meta-ti-bsp/README +9 -0
index c5780531..15fa627f 100644
@@ -22,6 +22,15 @@ distro-less (only with OE-Core), with Yocto/Poky, with Angstrom or Arago.
 Please follow the recommended setup procedures of your OE distribution.
 
 
+GRAPHICS NOTICE: Onboard graphics accelerators are enabled through the use of
+one of the following DISTRO_FEATURES if present:
+ - powervr-sgx-graphics
+ - powervr-rogue-graphics
+
+If the according accelerator isn't present for the selected machine and opengl
+is selected as a DISTRO_FEATURE, software rendering will be used.
+
+
 Send pull requests, patches, comments or questions to:
 [email protected]
 
meta-ti-bsp/conf/machine/am62xx-lp-evm.conf +0 -2
index ef8e8692..ec9ce596 100644
@@ -4,8 +4,6 @@
 
 require conf/machine/include/am62xx.inc
 
-MACHINE_FEATURES += "gpu"
-
 KERNEL_DEVICETREE = " \
     ti/k3-am62x-lp-sk.dtb \
     ti/k3-am625-skeleton.dtb \
meta-ti-bsp/conf/machine/include/am62xx.inc +1 -7
index a5aad994..d4c5fd6e 100644
@@ -1,17 +1,11 @@
 require conf/machine/include/k3.inc
 SOC_FAMILY:append = ":am62xx"
 
-MACHINE_FEATURES += "screen touchscreen gpu"
+MACHINE_FEATURES += "screen touchscreen powervr-rogue-graphics"
 
 SERIAL_CONSOLES = "115200;ttyS2"
 SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
 
-PREFERRED_PROVIDER_virtual/egl ?= "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/libgbm ?= "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver"
-
 do_image_wic[mcdepends] = "mc::k3r5:ti-sci-fw:do_deploy"
 do_image_tar[mcdepends] = "mc::k3r5:ti-sci-fw:do_deploy"
 
meta-ti-bsp/conf/machine/include/am65xx.inc +1 -7
index 80aa6d27..412c83c8 100644
@@ -1,17 +1,11 @@
 require conf/machine/include/k3.inc
 SOC_FAMILY:append = ":am65xx"
 
-MACHINE_FEATURES += "screen touchscreen gpu"
+MACHINE_FEATURES += "screen touchscreen powervr-sgx-graphics"
 
 SERIAL_CONSOLES = "115200;ttyS2 115200;ttyS1"
 SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
 
-PREFERRED_PROVIDER_virtual/egl ?= "ti-sgx-ddk-um"
-PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-sgx-ddk-um"
-PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-sgx-ddk-um"
-PREFERRED_PROVIDER_virtual/libgbm ?= "ti-sgx-ddk-um"
-PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km"
-
 KERNEL_DEVICETREE = " \
     ti/k3-am654-base-board.dtb \
     ti/k3-am654-base-board-sr1.dtbo \
meta-ti-bsp/conf/machine/include/j721e.inc +1 -7
index fe260178..002279d0 100644
@@ -1,10 +1,4 @@
 require conf/machine/include/j7.inc
 SOC_FAMILY:append = ":j721e"
 
-MACHINE_FEATURES += "gpu"
-
-PREFERRED_PROVIDER_virtual/egl ?= "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/libgbm ?= "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver"
+MACHINE_FEATURES += "powervr-rogue-graphics"
meta-ti-bsp/conf/machine/include/j721s2.inc +1 -7
index 5cd74683..c7ddf7f8 100644
@@ -1,10 +1,4 @@
 require conf/machine/include/j7.inc
 SOC_FAMILY:append = ":j721s2"
 
-MACHINE_FEATURES += "gpu"
-
-PREFERRED_PROVIDER_virtual/egl ?= "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/libgbm ?= "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver"
+MACHINE_FEATURES += "powervr-rogue-graphics"
meta-ti-bsp/conf/machine/include/omap-a15.inc +1 -6
index f548f3fd..c8ecfe17 100644
@@ -10,11 +10,6 @@ MACHINE_KERNEL_PR = "r7"
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging"
 PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging"
 PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging"
-PREFERRED_PROVIDER_virtual/egl ?= "ti-sgx-ddk-um"
-PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-sgx-ddk-um"
-PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-sgx-ddk-um"
-PREFERRED_PROVIDER_virtual/libgbm ?= "ti-sgx-ddk-um"
-PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km"
 
 KERNEL_IMAGETYPE = "zImage"
 KERNEL_IMAGETYPES = "zImage uImage"
@@ -45,7 +40,7 @@ EXTRA_IMAGEDEPENDS += "virtual/bootloader"
 UBI_VOLNAME = "rootfs"
 
 # List common SoC features, may need to add touchscreen for specific machines
-MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen alsa ethernet gpu mmip dsp gc320"
+MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen alsa ethernet powervr-sgx-graphics mmip dsp gc320"
 
 IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap"
 WKS_FILE ?= "sdimage-2part.wks"
meta-ti-bsp/conf/machine/include/ti33x.inc +1 -6
index cfacc30d..99fdb48a 100644
@@ -11,11 +11,6 @@ MACHINE_KERNEL_PR = "r22"
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging"
 PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging"
 PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging"
-PREFERRED_PROVIDER_virtual/egl ?= "ti-sgx-ddk-um"
-PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-sgx-ddk-um"
-PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-sgx-ddk-um"
-PREFERRED_PROVIDER_virtual/libgbm ?= "ti-sgx-ddk-um"
-PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km"
 
 KERNEL_IMAGETYPE = "zImage"
 
@@ -55,7 +50,7 @@ UBI_VOLNAME = "rootfs"
 EXTRA_IMAGEDEPENDS += "virtual/bootloader"
 
 # List common SoC features, may need to add touchscreen for specific machines
-MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 alsa ethernet gpu"
+MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 alsa ethernet powervr-sgx-graphics"
 
 IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap"
 WKS_FILE ?= "sdimage-2part.wks"
meta-ti-bsp/conf/machine/include/ti43x.inc +1 -6
index 5509a54d..f8bbb1f9 100644
@@ -11,11 +11,6 @@ MACHINE_KERNEL_PR = "r3"
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging"
 PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging"
 PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging"
-PREFERRED_PROVIDER_virtual/egl ?= "ti-sgx-ddk-um"
-PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-sgx-ddk-um"
-PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-sgx-ddk-um"
-PREFERRED_PROVIDER_virtual/libgbm ?= "ti-sgx-ddk-um"
-PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km"
 
 KERNEL_IMAGETYPE = "zImage"
 
@@ -54,7 +49,7 @@ UBI_VOLNAME = "rootfs"
 EXTRA_IMAGEDEPENDS += "u-boot"
 
 # List common SoC features, may need to add touchscreen for specific machines
-MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen alsa ethernet gpu"
+MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen alsa ethernet powervr-sgx-graphics"
 
 IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap"
 WKS_FILE ?= "sdimage-2part.wks"
meta-ti-bsp/conf/machine/j784s4-evm.conf +1 -1
index 96acca13..57905b52 100644
@@ -4,7 +4,7 @@
 
 require conf/machine/include/j7.inc
 
-MACHINE_FEATURES += "gpu"
+MACHINE_FEATURES += "powervr-rogue-graphics"
 
 SERIAL_CONSOLES = "115200;ttyS2"
 SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver/0001-compiler-support-OpenEmbedded-nodistro-internal-aarc.patch deleted +0 -29
deleted file mode 100644
index f021cc39..00000000
@@ -1,29 +0,0 @@
-From 80d32fee3d768abbd77cce77ea9a7574651460a9 Mon Sep 17 00:00:00 2001
-From: Denys Dmytriyenko <[email protected]>
-Date: Wed, 7 Jul 2021 13:11:56 -0400
-Subject: [PATCH] compiler: support OpenEmbedded "nodistro" internal aarch64
- toolchain
-
-Upstream-Status: Pending
-
-Signed-off-by: Denys Dmytriyenko <[email protected]>
----
- build/linux/config/compiler.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/build/linux/config/compiler.mk b/build/linux/config/compiler.mk
-index 53a0bef..d788579 100644
---- a/build/linux/config/compiler.mk
-+++ b/build/linux/config/compiler.mk
-@@ -65,7 +65,7 @@ define calculate-compiler-preferred-target
-    ifneq ($$(filter i386-% i486-% i586-% i686-%,$$($(1)_compiler_preferred_target)),)
-     $(1)_compiler_preferred_target := i386-linux-gnu
-    endif
--   ifneq ($$(filter aarch64-poky-linux,$$($(1)_compiler_preferred_target)),)
-+   ifneq ($$(filter aarch64-oe-linux aarch64-poky-linux,$$($(1)_compiler_preferred_target)),)
-     $(1)_compiler_preferred_target := aarch64-linux-gnu
-    endif
-    ifneq ($$(filter armv7a-cros-linux-gnueabi armv7l-tizen-linux-gnueabi,$$($(1)_compiler_preferred_target)),)
--- 
-2.7.4
-
meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.18.6276027.bb renamed from meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.15.6133109.bb +6 -10
similarity index 72%
rename from meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.15.6133109.bb
rename to meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.18.6276027.bb
index b4d19195..bbfe66c2 100644
@@ -5,35 +5,31 @@ LIC_FILES_CHKSUM = "file://README;beginline=14;endline=19;md5=0403c7dea01a2b8232
 
 inherit module features_check
 
-REQUIRED_MACHINE_FEATURES = "gpu"
+REQUIRED_COMBINED_FEATURES = "powervr-rogue-graphics"
 
 MACHINE_KERNEL_PR:append = "b"
 PR = "${MACHINE_KERNEL_PR}"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
+
 COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|am62xx"
 
 DEPENDS = "virtual/kernel"
 
-PROVIDES = "virtual/gpudriver"
-
-BRANCH = "linuxws/dunfell/k5.10/${PV}_unified_fw_pagesize"
+BRANCH = "linuxws/kirkstone/k5.10/${PV}"
 
-SRC_URI = " \
-    git://git.ti.com/git/graphics/ti-img-rogue-driver.git;protocol=https;branch=${BRANCH} \
-    file://0001-compiler-support-OpenEmbedded-nodistro-internal-aarc.patch \
-"
+SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-driver.git;protocol=https;branch=${BRANCH}"
 
 S = "${WORKDIR}/git"
 
-SRCREV = "c901804e8221d477983a6f7224a9cdc6e832f050"
+SRCREV = "d575e4f64c95a3534e10e85da15bd303febf133f"
 
 TARGET_PRODUCT:j721e = "j721e_linux"
 TARGET_PRODUCT:j721s2 = "j721s2_linux"
 TARGET_PRODUCT:j784s4 = "j784s4_linux"
 TARGET_PRODUCT:am62xx = "am62_linux"
 PVR_BUILD = "release"
-PVR_WS = "wayland"
+PVR_WS = "lws-generic"
 
 EXTRA_OEMAKE += 'KERNELDIR="${STAGING_KERNEL_DIR}" BUILD=${PVR_BUILD} PVR_BUILD_DIR=${TARGET_PRODUCT} WINDOW_SYSTEM=${PVR_WS}'
 
meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb +1 -3
index c22e3096..3e77dfd2 100644
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://eurasia_km/README;beginline=13;endline=22;md5=74506d9
 
 inherit module features_check
 
-REQUIRED_MACHINE_FEATURES = "gpu"
+REQUIRED_MACHINE_FEATURES = "powervr-sgx-graphics"
 
 COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15|k3"
 
@@ -16,8 +16,6 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 DEPENDS = "virtual/kernel"
 
-PROVIDES = "virtual/gpudriver"
-
 BRANCH = "ti-img-sgx/${PV}/k5.10"
 
 SRC_URI = "git://git.ti.com/git/graphics/omap5-sgx-ddk-linux.git;protocol=https;branch=${BRANCH}"
meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.15.6133109.bb deleted +0 -71

71 lines not on this page · raw message

meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.18.6276027.bb new file +41 -0

41 lines not on this page · raw message

meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb +1 -1
index d0edf1fe..7ff09980 100644
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://TI-Linux-Graphics-DDK-UM-Manifest.doc;md5=b17390502bc
 
 inherit features_check
 
-REQUIRED_MACHINE_FEATURES = "gpu"
+REQUIRED_COMBINED_FEATURES = "powervr-sgx-graphics"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15|am65xx"
meta-ti-bsp/recipes-graphics/mesa/files/0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch new file +158 -0

158 lines not on this page · raw message

meta-ti-bsp/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch new file +34 -0
new file mode 100644
index 00000000..3b0bfa32
@@ -0,0 +1,34 @@
+From 253b042d2bf10e9abfa9cc508e0782aefd834145 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Fri, 16 Oct 2020 11:03:47 -0700
+Subject: [PATCH] futex.h: Define __NR_futex if it does not exist
+
+__NR_futex is not defines by newer architectures e.g. arc, riscv32 as
+they only have 64bit variant of time_t. Glibc defines SYS_futex interface based on
+__NR_futex, since this is used in applications, such applications start
+to fail to build for these newer architectures. This patch defines a
+fallback to alias __NR_futex to __NR_futex_tim64 so SYS_futex keeps
+working
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+
+---
+ src/util/futex.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/util/futex.h b/src/util/futex.h
+index 43097f4..941b0ec 100644
+--- a/src/util/futex.h
++++ b/src/util/futex.h
+@@ -34,6 +34,10 @@
+ #include <sys/syscall.h>
+ #include <sys/time.h>
+ 
++#if !defined(SYS_futex) && defined(SYS_futex_time64)
++# define SYS_futex SYS_futex_time64
++#endif
++
+ static inline long sys_futex(void *addr1, int op, int val1, const struct timespec *timeout, void *addr2, int val3)
+ {
+    return syscall(SYS_futex, addr1, op, val1, timeout, addr2, val3);
meta-ti-bsp/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch new file +25 -0
new file mode 100644
index 00000000..b08e4d86
@@ -0,0 +1,25 @@
+From d34bdbd80e5a1f309d2ba280cdc66ff0ee0e5c43 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 13 Jan 2020 15:23:47 -0800
+Subject: [PATCH] meson misdetects 64bit atomics on mips/clang
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+
+---
+ src/util/u_atomic.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/util/u_atomic.c b/src/util/u_atomic.c
+index 5a5eab4..e499516 100644
+--- a/src/util/u_atomic.c
++++ b/src/util/u_atomic.c
+@@ -21,7 +21,7 @@
+  * IN THE SOFTWARE.
+  */
+ 
+-#if defined(MISSING_64BIT_ATOMICS) && defined(HAVE_PTHREAD)
++#if !defined(__clang__) && defined(MISSING_64BIT_ATOMICS) && defined(HAVE_PTHREAD)
+ 
+ #include <stdint.h>
+ #include <pthread.h>
meta-ti-bsp/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch new file +43 -0

43 lines not on this page · raw message

meta-ti-bsp/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch new file +47 -0

47 lines not on this page · raw message

meta-ti-bsp/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch new file +61 -0

61 lines not on this page · raw message

meta-ti-bsp/recipes-graphics/mesa/mesa-gl_22.0.3.bb new file +13 -0
new file mode 100644
index 00000000..f2bc8f6b
@@ -0,0 +1,13 @@
+require mesa.inc
+
+SUMMARY += " (OpenGL only, no EGL/GLES)"
+
+PROVIDES = "virtual/libgl virtual/mesa"
+
+S = "${WORKDIR}/mesa-${PV}"
+
+# At least one DRI rendering engine is required to build mesa.
+# When no X11 is available, use osmesa for the rendering engine.
+PACKAGECONFIG ??= "opengl ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'osmesa gallium', d)}"
+PACKAGECONFIG:class-target = "opengl ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'osmesa gallium', d)}"
+
meta-ti-bsp/recipes-graphics/mesa/mesa.inc new file +323 -0

323 lines not on this page · raw message

meta-ti-bsp/recipes-graphics/mesa/mesa_22.0.3.bb new file +2 -0
new file mode 100644
index 00000000..96e8aa38
@@ -0,0 +1,2 @@
+require ${BPN}.inc
+
meta-ti-bsp/recipes-graphics/mesa/rogue-mesa.inc new file +29 -0
new file mode 100644
index 00000000..c5002fa7
@@ -0,0 +1,29 @@
+# Rogue graphics related mesa overrides
+
+BRANCH = "rogue/kirkstone/pvr-1.18/22.0"
+
+SRC_URI = "git://gitlab.freedesktop.org/StaticRocket/mesa.git;protocol=https;branch=${BRANCH} \
+           file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
+           file://0002-meson.build-make-TLS-ELF-optional.patch \
+           file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
+           file://0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch \
+           file://0001-util-format-Check-for-NEON-before-using-it.patch \
+           file://0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch \
+           "
+
+S = "${WORKDIR}/git"
+
+SRCREV = "fddf5106f04de2bd35892d30e5574c0b2881edd9"
+
+PV:append = "+rogue"
+
+GALLIUMDRIVERS:append = ",pvr"
+
+EXTRA_OEMESON:append = " -Dgallium-pvr-alias=tidss"
+
+do_install:append () {
+    # remove pvr custom pkgconfig
+    rm -rf ${D}${datadir}/pkgconfig
+}
+
+RRECOMMENDS:mesa-megadriver:class-target += "ti-img-rogue-driver ti-img-rogue-umlibs"
Signature · 1 line
2.34.1
#1 lore raw

First of all, thank you for including SGX into this, not just Rogue. Although, I don't see you plugging SGX into your Mesa rework, only Rogue?

But the already large patch grew even more to 60 KB and is impossible to review!

This should have been a series with several individual patches...

E.g. if you are copying the entire Mesa set of recipes, include files and patches, it should have been a separate patch with just that w/o any modifications, clearly stating that this is a verbatim copy and specify which repo and branch/tag they are being picked up from - openembedded-core repo, kirkstone branch.

But then I would argue that a simple mesa_%.bbappend is smaller and much easire to review. For example, I took your previous v4 revision of the patch and dropped all copies of upstream Mesa, replacing it with a bbappend:
https://patchwork.yoctoproject.org/project/ti/patch/[email protected]/

The functionality remains the same, but makes the patch much easier to review:
v4 of your patch is 50 KB, this v5 is 60 KB, and bbappend version is 15 KB.

Quoted 4 lines · Randolph Sapp via lists.yoctoproject.org

Individually package rogue graphics components to prevent conflicts with other recipes.

The package ti-img-rogue-umlibs will now distribute the window system

Here you only mention Rogue.

Quoted 11 lines

agnostic components of the DDK. This being the IMG's implementations of OpenGLES, OpenCL, and Vulkan in binary format and the device firmware. These are the only components that cannot be open source currently.

The mesa component is currently piggybacking off the default mesa package. It's not elegant, but it reflects the implementation well and allows users to config mesa as needed.

This introduces the following combined features:
- powervr-rogue-graphics
- powervr-sgx-graphics

Feels like a bit of an overkill with combined features and longer names... At this point I already got used to your previous "rogue-gpu", or it could be "powervr-rogue-gpu" if you insist. After all, it is really a machine feature first of all, even if you want to extend it to distro features as well...

Quoted 8 lines

Combined features work by requiring both a matching machine feature and distro feature to be present. This seemed to be the most applicable for us considering graphics support relies on out of tree modules users may want to exclude as well as specific hardware to be present.

Mesa and other userspace tools are modified to suite sgx / rogue when both features are present. Anything not specifically carrying patches for sgx / rogue was made to be dependent on opengl as a distro feature

And here you mention that SGX is supposed to also use the new Mesa-based framework...

Quoted 10 lines

to align with oe-core.

This has a daughter patch with the same name submitted to meta-arago.

---

Sorry for the rename. This is actually the 5th version of this patch but I wanted it to keep a similar name between meta-arago and meta-ti since these two hinge off each other.

<snip>

Quoted 6 lines
meta-ti-bsp/README +0 -0
index c5780531..15fa627f 100644
@@ -22,6 +22,15 @@ distro-less (only with OE-Core), with Yocto/Poky, with Angstrom or Arago.
 Please follow the recommended setup procedures of your OE distribution.

meta-ti-bsp/README distro-less (only with OE-Core), with Yocto/Poky, with Angstrom or Arago. · line 32

Quoted 10 lines
meta-ti-bsp/README +8 -0
 
 
+GRAPHICS NOTICE: Onboard graphics accelerators are enabled through the use of
+one of the following DISTRO_FEATURES if present:
+ - powervr-sgx-graphics
+ - powervr-rogue-graphics
+
+If the according accelerator isn't present for the selected machine and opengl
+is selected as a DISTRO_FEATURE, software rendering will be used.
+

Layer README is not the right place for this information. Should probably be a separate file or part of the recipe(s).

Quoted 38 lines
meta-ti-bsp/README +0 -0
 Send pull requests, patches, comments or questions to:
 [email protected]
 
meta-ti-bsp/conf/machine/am62xx-lp-evm.conf +0 -2
index ef8e8692..ec9ce596 100644
@@ -4,8 +4,6 @@
 
 require conf/machine/include/am62xx.inc
 
-MACHINE_FEATURES += "gpu"
-
 KERNEL_DEVICETREE = " \
     ti/k3-am62x-lp-sk.dtb \
     ti/k3-am625-skeleton.dtb \
meta-ti-bsp/conf/machine/include/am62xx.inc +1 -7
index a5aad994..d4c5fd6e 100644
@@ -1,17 +1,11 @@
 require conf/machine/include/k3.inc
 SOC_FAMILY:append = ":am62xx"
 
-MACHINE_FEATURES += "screen touchscreen gpu"
+MACHINE_FEATURES += "screen touchscreen powervr-rogue-graphics"
 SERIAL_CONSOLES = "115200;ttyS2"
 SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
 
-PREFERRED_PROVIDER_virtual/egl ?= "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/libgbm ?= "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver"
-
 do_image_wic[mcdepends] = "mc::k3r5:ti-sci-fw:do_deploy"
 do_image_tar[mcdepends] = "mc::k3r5:ti-sci-fw:do_deploy"
 

<snip>

meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.15.6133109.bb

Quoted 2 lines
meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.15.6133109.bb deleted +0 -0
deleted file mode 100644

Please use the correct git flags (pass a lower threshold to -M) to make this remove/add into a proper diff that can be reviewed. Again, take a look at my copy of your v4 revision:

https://patchwork.yoctoproject.org/project/ti/patch/[email protected]/

Quoted 112 lines

index a665c614..00000000

meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.15.6133109.bb deleted +0 -71
@@ -1,71 +0,0 @@
-DESCRIPTION = "Userspace libraries for PowerVR Rogue GPU on TI SoCs"
-HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-umlibs"
-LICENSE = "TI-TFL"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=7232b98c1c58f99e3baa03de5207e76f"
-
-inherit features_check
-
-REQUIRED_MACHINE_FEATURES = "gpu"
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|am62xx"
-
-PR = "r2"
-
-BRANCH = "linuxws/dunfell/k5.10/${PV}_unified_fw_pagesize"
-
-SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-umlibs.git;protocol=https;branch=${BRANCH}"
-SRCREV = "5977e82b96028f783d39c7219f016c1faf8dc5f5"
-
-TARGET_PRODUCT:j721e = "j721e_linux"
-TARGET_PRODUCT:j721s2 = "j721s2_linux"
-TARGET_PRODUCT:j784s4 = "j784s4_linux"
-TARGET_PRODUCT:am62xx = "am62_linux"
-PVR_BUILD ?= "release"
-PVR_WS = "wayland"
-
-INITSCRIPT_NAME = "rc.pvr"
-INITSCRIPT_PARAMS = "defaults 8"
-
-inherit update-rc.d
-
-PROVIDES += "virtual/egl virtual/libgles1 virtual/libgles2 virtual/libgbm"
-
-DEPENDS += "libdrm wayland expat"
-RDEPENDS:${PN} += "bash"
-RDEPENDS:${PN} += "wayland expat"
-
-RPROVIDES:${PN} = "libegl libgles1 libgles2 libgbm"
-RPROVIDES:${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev"
-RPROVIDES:${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg"
-
-RREPLACES:${PN} = "libegl libgles1 liblges2 libgbm"
-RREPLACES:${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev"
-RREPLACES:${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg"
-
-RCONFLICTS:${PN} = "libegl libgles1 libgles2 libgbm"
-RCONFLICTS:${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev"
-RCONFLICTS:${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg"
-
-RRECOMMENDS:${PN} += "ti-img-rogue-driver"
-
-S = "${WORKDIR}/git"
-
-do_install () {
-    oe_runmake install DESTDIR=${D} TARGET_PRODUCT=${TARGET_PRODUCT} BUILD=${PVR_BUILD} WINDOW_SYSTEM=${PVR_WS}
-    chown -R root:root ${D}
-}
-
-FILES:${PN} += " ${nonarch_base_libdir}/firmware/"
-FILES:${PN} += " ${datadir}/"
-
-PACKAGES =+ "${PN}-plugins"
-FILES:${PN}-plugins = "${libdir}/libGLESv2.so ${libdir}/libGLESv1_CM.so ${libdir}/libEGL.so ${libdir}/dri/pvr_dri.so"
-RDEPENDS:${PN} += "${PN}-plugins"
-
-ALLOW_EMPTY:${PN}-plugins = "1"
-
-INSANE_SKIP:${PN} += "ldflags arch already-stripped"
-INSANE_SKIP:${PN}-plugins = "dev-so"
-
-CLEANBROKEN = "1"
meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.18.6276027.bb new file +31 -0
new file mode 100644
index 00000000..cc3e720e
@@ -0,0 +1,41 @@
+DESCRIPTION = "Userspace libraries for PowerVR Rogue GPU on TI SoCs"
+HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-umlibs"
+LICENSE = "TI-TFL"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=7232b98c1c58f99e3baa03de5207e76f"
+
+inherit features_check bin_package
+
+REQUIRED_COMBINED_FEATURES = "powervr-rogue-graphics"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|am62xx"
+
+PR = "r2"
+
+BRANCH = "linuxws/kirkstone/k5.10/${PV}"
+SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-umlibs.git;protocol=https;branch=${BRANCH}"
+SRCREV = "51e598919641d51156a631efa5447124a3c0f543"
+S = "${WORKDIR}/git/targetfs/${TARGET_PRODUCT}/${PVR_WS}/${PVR_BUILD}"
+
+TARGET_PRODUCT:j721e = "j721e_linux"
+TARGET_PRODUCT:j721s2 = "j721s2_linux"
+TARGET_PRODUCT:j784s4 = "j784s4_linux"
+TARGET_PRODUCT:am62xx = "am62_linux"
+PVR_BUILD = "release"
+PVR_WS = "lws-generic"
+
+RDEPENDS:${PN} += "mesa-megadriver libdrm ti-img-rogue-driver"
+
+do_install:append() {
+    rm -rf "${D}/etc/init.d"
+    rm -rf "${D}/usr/lib/libvulkan.so"

meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.18.6276027.bb line 41

Quoted 10 lines
meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.18.6276027.bb new file +10 -0
+    rm -rf "${D}/usr/lib/libvulkan.so.0"
+    rm -rf "${D}/usr/lib/libvulkan.so.1"
+}
+
+PACKAGES = "${PN}-tools ${PN}"
+FILES:${PN}-tools = "${bindir}/"
+RDEPENDS:${PN}-tools = "python3-core"
+RRECOMMENDS:${PN} += "${PN}-tools"
+
+INSANE_SKIP:${PN} += "ldflags arch already-stripped dev-so"

<snip all the redundant Mesa stuff>

meta-ti-bsp/recipes-graphics/mesa/rogue-mesa.inc line 5

Quoted 11 lines
meta-ti-bsp/recipes-graphics/mesa/rogue-mesa.inc new file +5 -0
new file mode 100644
index 00000000..c5002fa7
@@ -0,0 +1,29 @@
+# Rogue graphics related mesa overrides
+
+BRANCH = "rogue/kirkstone/pvr-1.18/22.0"
+
+SRC_URI = "git://gitlab.freedesktop.org/StaticRocket/mesa.git;protocol=https;branch=${BRANCH} \

I looked at this repo - it's a personal copy of upstream Mesa with Imagination PVR patches applied on top. Was it reviewed and approved by OSRB? Were the patches made public before and/or permitted to be published/distributed?

meta-ti-bsp/recipes-graphics/mesa/rogue-mesa.inc line 18

Quoted 13 lines
meta-ti-bsp/recipes-graphics/mesa/rogue-mesa.inc new file +13 -0
+           file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
+           file://0002-meson.build-make-TLS-ELF-optional.patch \
+           file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
+           file://0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch \
+           file://0001-util-format-Check-for-NEON-before-using-it.patch \
+           file://0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch \
+           "
+
+S = "${WORKDIR}/git"
+
+SRCREV = "fddf5106f04de2bd35892d30e5574c0b2881edd9"
+
+PV:append = "+rogue"

Only rogue?

meta-ti-bsp/recipes-graphics/mesa/rogue-mesa.inc line 29

Quoted 10 lines
meta-ti-bsp/recipes-graphics/mesa/rogue-mesa.inc new file +10 -0
+GALLIUMDRIVERS:append = ",pvr"
+
+EXTRA_OEMESON:append = " -Dgallium-pvr-alias=tidss"
+
+do_install:append () {
+    # remove pvr custom pkgconfig
+    rm -rf ${D}${datadir}/pkgconfig
+}
+
+RRECOMMENDS:mesa-megadriver:class-target += "ti-img-rogue-driver ti-img-rogue-umlibs"

Only rogue?

#2 lore raw
Quoted 10 lines · Denys Dmytriyenko

E.g. if you are copying the entire Mesa set of recipes, include files and patches, it should have been a separate patch with just that w/o any modifications, clearly stating that this is a verbatim copy and specify which repo and branch/tag they are being picked up from - openembedded-core repo, kirkstone branch.

But then I would argue that a simple mesa_%.bbappend is smaller and much easire to review. For example, I took your previous v4 revision of the patch and dropped all copies of upstream Mesa, replacing it with a bbappend:
https://patchwork.yoctoproject.org/project/ti/patch/[email protected]/

Right, sorry about that. You are correct that the duplication of mesa and mesa patches should have occurred in a separate patch, however it should not be a blanket BB appends. The reason this duplication exists is that upstream mesa will move faster than our modified versions (as much as I would like to avoid it) and this will prevent things from silently creeping forward and breaking. The umlibs are still dependent on particular, patched releases of mesa.

Quoted 3 lines · Denys Dmytriyenko

I looked at this repo - it's a personal copy of upstream Mesa with Imagination PVR patches applied on top. Was it reviewed and approved by OSRB? Were the patches made public before and/or permitted to be published/distributed?

Those patches inherited the license of mesa and therefore did not need approval from OSRB. I did, however, get IMG's grace to release them anyway. The reason why it's a personal repo is there is certain functionality that I believe can be upstreamed and I believe hosting that process on freedesktop will help reduce friction and be a little more transparent about our efforts.

Quoted 1 line · Denys Dmytriyenko

Only rogue?

Only rogue. I added all the necessary hooks for sgx but it still needs work before it can fall in line with my changes. The mesa layer needs some TLC and the umlibs will need some packaging changes. Thankfully SGX can now be disabled until we have it working by removing powervr-sgx-graphics from the distro features string.

#3 lore raw
Quoted 18 lines · Randolph
Quoted 9 lines · Denys Dmytriyenko

E.g. if you are copying the entire Mesa set of recipes, include files and
patches, it should have been a separate patch with just that w/o any modifications, clearly stating that this is a verbatim copy and specify which
repo and branch/tag they are being picked up from - openembedded-core repo,
kirkstone branch.

Quoted 6 lines

But then I would argue that a simple mesa_%.bbappend is smaller and much
easire to review. For example, I took your previous v4 revision of the patch
and dropped all copies of upstream Mesa, replacing it with a bbappend:
https://patchwork.yoctoproject.org/project/ti/patch/[email protected]/

Quoted 7 lines

Right, sorry about that. You are correct that the duplication of mesa and mesa patches should have occurred in a separate patch, however it should not be a blanket BB appends. The reason this duplication exists is that upstream mesa will move faster than our modified versions (as much as I would like to avoid it) and this will prevent things from silently creeping forward and breaking. The umlibs are still dependent on particular, patched releases of mesa.

Well, there are pros and cons to both approaches. And I would be more inclined to agree with you that it is necessary to copy over the entire Mesa recipes, if you were trying to apply patches on top of the upstream version. But, you are completely changing SRC_URI and SRCREV anyway to point to your own tree, so it doesn't matter very much what underlying version of the recipe you start with. I do believe it would just work for the master with 22.2.3 version. Sure, recipes sometimes change significantly and break your bbappend, but that's when it will be the time to consider carrying the full set of older version, sometime in the future.

As an example, we've been carrying bbappends in meta-ti for upstream optee and trunsted-firmware-a recipes from meta-arm - sometimes we fall behind and stick to an older version, but sometimes we update to a newer version earlier than upstream. That's been working for several years and quite successful for the most part...

On the other side of the spectrum, there's ltp-ddt recipe that is based on top of the upstream ltp recipe of a specific version. It's not exactly a bbappend, but close enough. When upstream upgrades to a newer version, we end up copying the specific previous version locally side-by-side. Later, when we rebase ltp-ddt and catch up with the ltp version upstream, we can remove the duplicate.

In other words, *IF* we end up duplicating Mesa recipes locally, I'd argue we should keep them unmodified and apply any modifications through bbappend. If needed, you can make it version-specific, e.g. mesa_22.0.%.bbappend. That way in kirkstone you only need this bbappend, but in langdale/mickledore you may end up having a local copy of *unmodified* mesa_22.0.3.bb from kirkstone along with this mesa_22.0.%.bbappend on top. In other words - if you refrain from modifying the local duplicates of upstream files and keep them intact, it would be much easier to maintain long term...

Quoted 11 lines
Quoted 6 lines · Denys Dmytriyenko

I looked at this repo - it's a personal copy of upstream Mesa with Imagination
PVR patches applied on top. Was it reviewed and approved by OSRB? Were the
patches made public before and/or permitted to be published/distributed?

Those patches inherited the license of mesa and therefore did not need approval from OSRB.

Oh, you can never ever assume anything when it comes to legal matters! That's why OSRB was formed in the first place and I was around back then and indirectly involved in that...

Quoted 1 line

I did, however, get IMG's grace to release them anyway.

Ok, this is great!

Quoted 4 lines

The reason why it's a personal repo is there is certain functionality that I believe can be upstreamed and I believe hosting that process on freedesktop will help reduce friction and be a little more transparent about our efforts.

As far as I know, OSRB requires a special exception for official TI software to be hosted in personal repos. Please do due diligence and run it by the OSRB/Legal! Always CYA... :)

Quoted 9 lines
Quoted 1 line · Denys Dmytriyenko

Only rogue?

Only rogue. I added all the necessary hooks for sgx but it still needs work before it can fall in line with my changes. The mesa layer needs some TLC and the umlibs will need some packaging changes. Thankfully SGX can now be disabled until we have it working by removing powervr-sgx-graphics from the distro features string.

Well, the massive Beagle community would have to suffer longer... :(

Signature · 1 line
Denys
#4 lore raw
Quoted 23 lines · Denys Dmytriyenko

Well, there are pros and cons to both approaches. And I would be more inclined to agree with you that it is necessary to copy over the entire Mesa recipes, if you were trying to apply patches on top of the upstream version. But, you are completely changing SRC_URI and SRCREV anyway to point to your own tree, so it doesn't matter very much what underlying version of the recipe you start with. I do believe it would just work for the master with 22.2.3 version. Sure, recipes sometimes change significantly and break your bbappend, but that's when it will be the time to consider carrying the full set of older version, sometime in the future.

As an example, we've been carrying bbappends in meta-ti for upstream optee and trunsted-firmware-a recipes from meta-arm - sometimes we fall behind and stick to an older version, but sometimes we update to a newer version earlier than upstream. That's been working for several years and quite successful for the most part...

On the other side of the spectrum, there's ltp-ddt recipe that is based on top of the upstream ltp recipe of a specific version. It's not exactly a bbappend, but close enough. When upstream upgrades to a newer version, we end up copying the specific previous version locally side-by-side. Later, when we rebase ltp-ddt and catch up with the ltp version upstream, we can remove the duplicate.

Quoted 8 lines

In other words, *IF* we end up duplicating Mesa recipes locally, I'd argue we should keep them unmodified and apply any modifications through bbappend. If needed, you can make it version-specific, e.g. mesa_22.0.%.bbappend. That way in kirkstone you only need this bbappend, but in langdale/mickledore you may end up having a local copy of *unmodified* mesa_22.0.3.bb from kirkstone along with this mesa_22.0.%.bbappend on top. In other words - if you refrain from modifying the local duplicates of upstream files and keep them intact, it would be much easier to maintain long term...

Well what do you recommend? Version pinning (through the copy in meta-ti) in addition to a bbappend, or just a version globed bbappend?

#5 lore raw
Quoted 57 lines · Randolph Sapp via lists.yoctoproject.org
Quoted 39 lines · Denys Dmytriyenko

Well, there are pros and cons to both approaches. And I would be more inclined
to agree with you that it is necessary to copy over the entire Mesa recipes,
if you were trying to apply patches on top of the upstream version. But, you
are completely changing SRC_URI and SRCREV anyway to point to your own tree,
so it doesn't matter very much what underlying version of the recipe you start
with. I do believe it would just work for the master with 22.2.3 version.
Sure, recipes sometimes change significantly and break your bbappend, but
that's when it will be the time to consider carrying the full set of older
version, sometime in the future.

As an example, we've been carrying bbappends in meta-ti for upstream optee and
trunsted-firmware-a recipes from meta-arm - sometimes we fall behind and stick
to an older version, but sometimes we update to a newer version earlier than
upstream. That's been working for several years and quite successful for the
most part...

On the other side of the spectrum, there's ltp-ddt recipe that is based on top
of the upstream ltp recipe of a specific version. It's not exactly a bbappend,
but close enough. When upstream upgrades to a newer version, we end up copying
the specific previous version locally side-by-side. Later, when we rebase
ltp-ddt and catch up with the ltp version upstream, we can remove the duplicate.

Quoted 15 lines

In other words, *IF* we end up duplicating Mesa recipes locally, I'd argue we
should keep them unmodified and apply any modifications through bbappend. If
needed, you can make it version-specific, e.g. mesa_22.0.%.bbappend. That way
in kirkstone you only need this bbappend, but in langdale/mickledore you may
end up having a local copy of *unmodified* mesa_22.0.3.bb from kirkstone along
with this mesa_22.0.%.bbappend on top. In other words - if you refrain from
modifying the local duplicates of upstream files and keep them intact, it
would be much easier to maintain long term...

Quoted 3 lines

Well what do you recommend? Version pinning (through the copy in meta-ti) in addition to a bbappend, or just a version globed bbappend?

My recommendation would be to do a bbappend with partial version, i.e. 22.% or 22.0.%

That will be quite easy to review and test against kirkstone.

And then for master or later releases, you can add a local verbatim copy of the required mesa recipes from upstream w/o modifications as a separate patch and commit, still leaving bbappend around to apply required modifications on top.

Signature · 1 line
Denys
#6 lore raw
In reply to Denys Dmytriyenko
Quoted 96 lines · Denys Dmytriyenko
Quoted 18 lines · Randolph
Quoted 9 lines · Denys Dmytriyenko

E.g. if you are copying the entire Mesa set of recipes, include files and
patches, it should have been a separate patch with just that w/o any modifications, clearly stating that this is a verbatim copy and specify which
repo and branch/tag they are being picked up from - openembedded-core repo,
kirkstone branch.

Quoted 6 lines

But then I would argue that a simple mesa_%.bbappend is smaller and much
easire to review. For example, I took your previous v4 revision of the patch
and dropped all copies of upstream Mesa, replacing it with a bbappend:
https://patchwork.yoctoproject.org/project/ti/patch/[email protected]/

Quoted 7 lines

Right, sorry about that. You are correct that the duplication of mesa and mesa patches should have occurred in a separate patch, however it should not be a blanket BB appends. The reason this duplication exists is that upstream mesa will move faster than our modified versions (as much as I would like to avoid it) and this will prevent things from silently creeping forward and breaking. The umlibs are still dependent on particular, patched releases of mesa.

Well, there are pros and cons to both approaches. And I would be more inclined to agree with you that it is necessary to copy over the entire Mesa recipes, if you were trying to apply patches on top of the upstream version. But, you are completely changing SRC_URI and SRCREV anyway to point to your own tree, so it doesn't matter very much what underlying version of the recipe you start with. I do believe it would just work for the master with 22.2.3 version. Sure, recipes sometimes change significantly and break your bbappend, but that's when it will be the time to consider carrying the full set of older version, sometime in the future.

As an example, we've been carrying bbappends in meta-ti for upstream optee and trunsted-firmware-a recipes from meta-arm - sometimes we fall behind and stick to an older version, but sometimes we update to a newer version earlier than upstream. That's been working for several years and quite successful for the most part...

On the other side of the spectrum, there's ltp-ddt recipe that is based on top of the upstream ltp recipe of a specific version. It's not exactly a bbappend, but close enough. When upstream upgrades to a newer version, we end up copying the specific previous version locally side-by-side. Later, when we rebase ltp-ddt and catch up with the ltp version upstream, we can remove the duplicate.

In other words, *IF* we end up duplicating Mesa recipes locally, I'd argue we should keep them unmodified and apply any modifications through bbappend. If needed, you can make it version-specific, e.g. mesa_22.0.%.bbappend. That way in kirkstone you only need this bbappend, but in langdale/mickledore you may end up having a local copy of *unmodified* mesa_22.0.3.bb from kirkstone along with this mesa_22.0.%.bbappend on top. In other words - if you refrain from modifying the local duplicates of upstream files and keep them intact, it would be much easier to maintain long term...

Quoted 11 lines
Quoted 6 lines · Denys Dmytriyenko

I looked at this repo - it's a personal copy of upstream Mesa with Imagination
PVR patches applied on top. Was it reviewed and approved by OSRB? Were the
patches made public before and/or permitted to be published/distributed?

Those patches inherited the license of mesa and therefore did not need approval from OSRB.

Oh, you can never ever assume anything when it comes to legal matters! That's why OSRB was formed in the first place and I was around back then and indirectly involved in that...

Quoted 1 line

I did, however, get IMG's grace to release them anyway.

Ok, this is great!

Quoted 4 lines

The reason why it's a personal repo is there is certain functionality that I believe can be upstreamed and I believe hosting that process on freedesktop will help reduce friction and be a little more transparent about our efforts.

As far as I know, OSRB requires a special exception for official TI software to be hosted in personal repos. Please do due diligence and run it by the OSRB/Legal! Always CYA... :)

Quoted 4 lines
Quoted 1 line · Denys Dmytriyenko

Only rogue?

Quoted 8 lines
Quoted 5 lines

Only rogue. I added all the necessary hooks for sgx but it still needs work before it can fall in line with my changes. The mesa layer needs some TLC and the umlibs will need some packaging changes. Thankfully SGX can now be disabled until we have it working by removing powervr-sgx-graphics from the distro features string.

Well, the massive Beagle community would have to suffer longer... :(

They should be used to it by now :D

But really that shouldn't happen, the updated SGX umlibs I sent last week should (tested with Poky, Arago needs some more patches still..) get things back working on Kirkstone.

Plus once we finalize the strategy here with this Mesa shim stuff we already have the SGX version of the Mesa side staged and ready, should be a quick switchover at that point.

Andrew

Quoted 10 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#15615): https://lists.yoctoproject.org/g/meta-ti/message/15615
Mute This Topic: https://lists.yoctoproject.org/mt/96386295/3619733
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

A message that is not in the archive (sent off-list or not yet received): [email protected]

#8 lore raw
Quoted 1 line · Randolph Sapp via lists.yoctoproject.org

Well what do you recommend? Version pinning (through the copy in meta-ti) in addition to a bbappend, or just a version globed bbappend?

Sorry, suppose it's not what you would recommend, but rather what would you hate the least...