Skip to contentSkip to conversation

meta-ti-bsp: Graphics recipe overhaul

PATCH New Denys Dmytriyenko 1 participant 1 message Jan 19, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meta-ti-bsp: Graphics recipe overhaul

From: Randolph Sapp <[email protected]>

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 all hinges off of the new rogue-gpu machine feature.

---
 meta-ti-bsp/conf/machine/include/am62xx.inc   |  8 +--
 meta-ti-bsp/conf/machine/include/j721e.inc    |  8 +--
 meta-ti-bsp/conf/machine/include/j721s2.inc   |  8 +--
 ...-OpenEmbedded-nodistro-internal-aarc.patch | 29 ---------
 ...bb => ti-img-rogue-driver_1.18.6276027.bb} | 12 ++--
 ...bb => ti-img-rogue-umlibs_1.18.6276027.bb} | 63 +++++--------------
 .../recipes-graphics/mesa/mesa_%.bbappend     |  2 +
 .../recipes-graphics/mesa/rogue-mesa.inc      | 29 +++++++++
 8 files changed, 54 insertions(+), 105 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} (77%)
 rename meta-ti-bsp/recipes-graphics/libgles/{ti-img-rogue-umlibs_1.15.6133109.bb => ti-img-rogue-umlibs_1.18.6276027.bb} (24%)
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa_%.bbappend
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/rogue-mesa.inc
meta-ti-bsp/conf/machine/include/am62xx.inc +1 -7
index 411e5265..8635a630 100644
@@ -1,17 +1,11 @@
 require conf/machine/include/k3.inc
 SOC_FAMILY:append = ":am62xx"
 
-MACHINE_FEATURES += "screen touchscreen gpu"
+MACHINE_FEATURES += "screen touchscreen gpu rogue-gpu"
 
 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"
-
 TFA_BOARD = "lite"
 TFA_K3_SYSTEM_SUSPEND = "1"
 
meta-ti-bsp/conf/machine/include/j721e.inc +1 -7
index 6322fe46..e71782a7 100644
@@ -1,13 +1,7 @@
 require conf/machine/include/k3.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 += "gpu rogue-gpu"
 
 # On J721e the file tiboot3.bin comes from the bootloader not ti-sci-fw
 do_image_wic[mcdepends] += "mc::k3r5:virtual/bootloader:do_deploy"
meta-ti-bsp/conf/machine/include/j721s2.inc +1 -7
index fc6493b8..15f2a506 100644
@@ -1,13 +1,7 @@
 require conf/machine/include/k3.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 += "gpu rogue-gpu"
 
 TFA_BOARD = "generic"
 
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 +5 -7
similarity index 77%
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..45df7c4b 100644
@@ -11,29 +11,27 @@ 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-graphics/libgles/ti-img-rogue-umlibs_1.18.6276027.bb renamed from meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.15.6133109.bb +15 -48

84 lines not on this page · raw message

meta-ti-bsp/recipes-graphics/mesa/mesa_%.bbappend new file +2 -0
new file mode 100644
index 00000000..c367cb7e
@@ -0,0 +1,2 @@
+# Apply rogue driver overrides if applicable
+require ${@bb.utils.contains('MACHINE_FEATURES', 'rogue-gpu', 'rogue-mesa.inc', '', d)}
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.25.1