Reanimate the corpse of SGX
v2 cover Reanimate the corpse of SGX
From: Randolph Sapp <[email protected]>
Brining back SGX on kirkstone (and hopefully making it easier for the community to port to other distros).
This overhauls the SGX drivers, fixing a few bugs and setting things up to achieve three things:
1) OpenGLES2 Acceleration under kirkstone (even if it is limited)
2) Break out a common interface to use newer versions of mesa
3) Revamp building / packaging procedures to try and match ROGUE where possible
I'll absolutely need community involvement for further testing / development as this driver will more than likely continue to take the backseat to ROGUE in the future. I hope the people asking about SGX on kirkstone earlier this year hear that... :)
This revision actually tests AM654, adds a fix for Yocto's dev-so stripping shenanigans, and enables the SGX on the ti43x platforms as well.
Randolph Sapp (3):
ti-sgx-ddk-*: version bump to support kirkstone
mesa-pvr: bump srcrev for sgx support
machine: include: enable sgx on tested platforms
meta-ti-bsp/conf/machine/include/am65xx.inc | 2 +- meta-ti-bsp/conf/machine/include/omap-a15.inc | 2 +- meta-ti-bsp/conf/machine/include/ti33x.inc | 2 +- meta-ti-bsp/conf/machine/include/ti43x.inc | 2 +- .../ti-img-rogue-driver_23.1.6404501.bb | 2 +- .../ti-sgx-ddk-km_1.17.4948957.bb | 27 +++++----- .../recipes-graphics/mesa/mesa-pvr_22.3.5.bb | 2 +- .../ti-sgx-ddk-um/pvrsrvkm.rules | 1 - .../ti-sgx-ddk-um_1.17.4948957.bb | 53 +++++++------------ 9 files changed, 38 insertions(+), 55 deletions(-) delete mode 100644 meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-sgx-ddk-um/pvrsrvkm.rules
Signature · 1 line
2.42.0
PATCH v2 1/3 ti-sgx-ddk-*: version bump to support kirkstone
From: Randolph Sapp <[email protected]>
Bump ti-sgx-ddk-um and ti-sgx-ddk-km to the new branch for Kirkstone and mesa independent builds. This also sets up SGX to use the latest mesa revision rogue uses.
Changelog:
- IMG Support has officially ended. This repo will not be getting regular updates after this unless things are really broken.
- The Mesa patches which were previously being relicensed internally were opened and combined with the unofficial rogue efforts on freedesktop.
- Toolchains were upgraded and multiple warnings and issues were addressed. Hardware recoveries work now, but there are still some longstanding issues with SGX that remain to be addressed if further resources are set aside for that.
- We moved to an lws-generic build target to avoid rebuilding external components. As such, these external components must be patched as needed. Libdrm is an example of this and the required patches can be found in meta-ti.
Known bugs:
- Buffer allocations under Weston may misbehave
- GLSL macro redefinitions will cause errors regardless of whether or not they are identical
--- .../ti-img-rogue-driver_23.1.6404501.bb | 2 +- .../ti-sgx-ddk-km_1.17.4948957.bb | 27 +++++----- .../ti-sgx-ddk-um/pvrsrvkm.rules | 1 - .../ti-sgx-ddk-um_1.17.4948957.bb | 53 +++++++------------ 4 files changed, 33 insertions(+), 50 deletions(-) delete mode 100644 meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-sgx-ddk-um/pvrsrvkm.rules
meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_23.1.6404501.bb +1 -1
@@ -22,7 +22,7 @@ SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-driver.git;protocol=https; S = "${WORKDIR}/git" -SRCREV = "c0adc3c36f4a0b2f590abfe0609b03096d58c648" +SRCREV = "2cb2c9609b7740cb2c348e669a96f26e1cc858da" TARGET_PRODUCT:j721e = "j721e_linux" TARGET_PRODUCT:j721s2 = "j721s2_linux"
meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb +12 -15
@@ -1,7 +1,7 @@ DESCRIPTION = "Kernel drivers for the PowerVR SGX chipset found in the TI SoCs" HOMEPAGE = "https://git.ti.com/graphics/omap5-sgx-ddk-linux" LICENSE = "MIT | GPL-2.0-only" -LIC_FILES_CHKSUM = "file://eurasia_km/README;beginline=13;endline=22;md5=74506d9b8e5edbce66c2747c50fcef12" +LIC_FILES_CHKSUM = "file://GPL-COPYING;md5=60422928ba677faaa13d6ab5f5baaa1e" inherit module
@@ -16,33 +16,30 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" DEPENDS = "virtual/kernel" -BRANCH = "ti-img-sgx/${PV}/k5.10" +BRANCH = "${PV}/mesa/k6.1" SRC_URI = "git://git.ti.com/git/graphics/omap5-sgx-ddk-linux.git;protocol=https;branch=${BRANCH}" S = "${WORKDIR}/git" -SRCREV = "eda7780bfd5277e16913c9bc0b0e6892b4e79063" +SRCREV = "e1bbee4d3f7cfedbce3f78a4ac432096f92b858c" -TARGET_PRODUCT:omap-a15 = "jacinto6evm" -TARGET_PRODUCT:ti33x = "ti335x" -TARGET_PRODUCT:ti43x = "ti437x" -TARGET_PRODUCT:am65xx = "ti654x" +TARGET_PRODUCT:omap-a15 = "ti572x_linux" +TARGET_PRODUCT:ti33x = "ti335x_linux" +TARGET_PRODUCT:ti43x = "ti437x_linux" +TARGET_PRODUCT:am65xx = "ti654x_linux" PVR_BUILD = "release" -PVR_WS = "nulldrmws" +PVR_WS = "lws-generic" -EXTRA_OEMAKE += 'KERNELDIR="${STAGING_KERNEL_DIR}" BUILD=${PVR_BUILD} TARGET_PRODUCT=${TARGET_PRODUCT} WINDOW_SYSTEM=${PVR_WS}' - -do_compile:prepend() { - cd ${S}/eurasia_km/eurasiacon/build/linux2/omap_linux -} +EXTRA_OEMAKE += 'KERNELDIR="${STAGING_KERNEL_DIR}" BUILD=${PVR_BUILD} \ +WINDOW_SYSTEM=${PVR_WS} PVR_BUILD_DIR=${TARGET_PRODUCT}' do_install() { - make -C ${STAGING_KERNEL_DIR} M=${B}/eurasia_km/eurasiacon/binary_omap_linux_${PVR_WS}_${PVR_BUILD}/target_armhf/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install + make -C ${STAGING_KERNEL_DIR} M=${B}/eurasiacon/binary_${TARGET_PRODUCT}_${PVR_WS}_${PVR_BUILD}/target_armhf/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install } do_install:am65xx() { - make -C ${STAGING_KERNEL_DIR} M=${B}/eurasia_km/eurasiacon/binary_omap_linux_${PVR_WS}_${PVR_BUILD}/target_aarch64/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install + make -C ${STAGING_KERNEL_DIR} M=${B}/eurasiacon/binary_${TARGET_PRODUCT}_${PVR_WS}_${PVR_BUILD}/target_aarch64/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install } RRECOMMENDS:${PN} += "ti-sgx-ddk-um"
meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-sgx-ddk-um/pvrsrvkm.rules deleted +0 -1
@@ -1 +0,0 @@ -SUBSYSTEM=="platform", ACTION=="bind", ENV{DRIVER}=="pvrsrvkm", RUN+="/usr/bin/pvrsrvctl --start --no-module"
meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-sgx-ddk-um_1.17.4948957.bb +20 -33
88 lines not on this page · raw message
Signature · 1 line
2.42.0
Re: [meta-ti][kirkstone][PATCHv2 1/3] ti-sgx-ddk-*: version bump to support kirkstone
Quoted 42 lines · Randolph Sapp via lists.yoctoproject.org
From: Randolph Sapp <[email protected]>
Bump ti-sgx-ddk-um and ti-sgx-ddk-km to the new branch for Kirkstone and mesa independent builds. This also sets up SGX to use the latest mesa revision rogue uses.
Changelog:
- IMG Support has officially ended. This repo will not be getting regular updates after this unless things are really broken.
- The Mesa patches which were previously being relicensed internally were opened and combined with the unofficial rogue efforts on freedesktop.
- Toolchains were upgraded and multiple warnings and issues were addressed. Hardware recoveries work now, but there are still some longstanding issues with SGX that remain to be addressed if further resources are set aside for that.
- We moved to an lws-generic build target to avoid rebuilding external components. As such, these external components must be patched as needed. Libdrm is an example of this and the required patches can be found in meta-ti.Known bugs:
- Buffer allocations under Weston may misbehave
- GLSL macro redefinitions will cause errors regardless of whether or not they are identicalSigned-off-by Randolph Sapp <[email protected]>--- .../ti-img-rogue-driver_23.1.6404501.bb | 2 +- .../ti-sgx-ddk-km_1.17.4948957.bb | 27 +++++----- .../ti-sgx-ddk-um/pvrsrvkm.rules | 1 - .../ti-sgx-ddk-um_1.17.4948957.bb | 53 +++++++------------ 4 files changed, 33 insertions(+), 50 deletions(-)delete mode 100644 meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-sgx-ddk-um/pvrsrvkm.rules
meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_23.1.6404501.bb +0
-0
meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_23.1.6404501.bb SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-driver.git;protocol=https; · line 28
Quoted 8 lines
meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_23.1.6404501.bb +1
-1@@ -22,7 +22,7 @@ SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-driver.git;protocol=https; S = "${WORKDIR}/git" -SRCREV = "c0adc3c36f4a0b2f590abfe0609b03096d58c648" +SRCREV = "2cb2c9609b7740cb2c348e669a96f26e1cc858da" TARGET_PRODUCT:j721e = "j721e_linux" TARGET_PRODUCT:j721s2 = "j721s2_linux"
Rats. Wrong driver. v3 to fix this.
Quoted 171 lines
meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb +12
-15@@ -1,7 +1,7 @@ DESCRIPTION = "Kernel drivers for the PowerVR SGX chipset found in the TI SoCs" HOMEPAGE = "https://git.ti.com/graphics/omap5-sgx-ddk-linux" LICENSE = "MIT | GPL-2.0-only" -LIC_FILES_CHKSUM = "file://eurasia_km/README;beginline=13;endline=22;md5=74506d9b8e5edbce66c2747c50fcef12" +LIC_FILES_CHKSUM = "file://GPL-COPYING;md5=60422928ba677faaa13d6ab5f5baaa1e" inherit module@@ -16,33 +16,30 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" DEPENDS = "virtual/kernel" -BRANCH = "ti-img-sgx/${PV}/k5.10" +BRANCH = "${PV}/mesa/k6.1" SRC_URI = "git://git.ti.com/git/graphics/omap5-sgx-ddk-linux.git;protocol=https;branch=${BRANCH}" S = "${WORKDIR}/git" -SRCREV = "eda7780bfd5277e16913c9bc0b0e6892b4e79063" +SRCREV = "e1bbee4d3f7cfedbce3f78a4ac432096f92b858c" -TARGET_PRODUCT:omap-a15 = "jacinto6evm" -TARGET_PRODUCT:ti33x = "ti335x" -TARGET_PRODUCT:ti43x = "ti437x" -TARGET_PRODUCT:am65xx = "ti654x" +TARGET_PRODUCT:omap-a15 = "ti572x_linux" +TARGET_PRODUCT:ti33x = "ti335x_linux" +TARGET_PRODUCT:ti43x = "ti437x_linux" +TARGET_PRODUCT:am65xx = "ti654x_linux" PVR_BUILD = "release" -PVR_WS = "nulldrmws" +PVR_WS = "lws-generic" -EXTRA_OEMAKE += 'KERNELDIR="${STAGING_KERNEL_DIR}" BUILD=${PVR_BUILD} TARGET_PRODUCT=${TARGET_PRODUCT} WINDOW_SYSTEM=${PVR_WS}' - -do_compile:prepend() { - cd ${S}/eurasia_km/eurasiacon/build/linux2/omap_linux -} +EXTRA_OEMAKE += 'KERNELDIR="${STAGING_KERNEL_DIR}" BUILD=${PVR_BUILD} \ +WINDOW_SYSTEM=${PVR_WS} PVR_BUILD_DIR=${TARGET_PRODUCT}' do_install() { - make -C ${STAGING_KERNEL_DIR} M=${B}/eurasia_km/eurasiacon/binary_omap_linux_${PVR_WS}_${PVR_BUILD}/target_armhf/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install + make -C ${STAGING_KERNEL_DIR} M=${B}/eurasiacon/binary_${TARGET_PRODUCT}_${PVR_WS}_${PVR_BUILD}/target_armhf/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install } do_install:am65xx() { - make -C ${STAGING_KERNEL_DIR} M=${B}/eurasia_km/eurasiacon/binary_omap_linux_${PVR_WS}_${PVR_BUILD}/target_aarch64/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install + make -C ${STAGING_KERNEL_DIR} M=${B}/eurasiacon/binary_${TARGET_PRODUCT}_${PVR_WS}_${PVR_BUILD}/target_aarch64/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install } RRECOMMENDS:${PN} += "ti-sgx-ddk-um"meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-sgx-ddk-um/pvrsrvkm.rules deleted +0
-1@@ -1 +0,0 @@ -SUBSYSTEM=="platform", ACTION=="bind", ENV{DRIVER}=="pvrsrvkm", RUN+="/usr/bin/pvrsrvctl --start --no-module"meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-sgx-ddk-um_1.17.4948957.bb +20
-34@@ -1,38 +1,35 @@ DESCRIPTION = "Userspace libraries for PowerVR SGX chipset on TI SoCs" HOMEPAGE = "https://git.ti.com/graphics/omap5-sgx-ddk-um-linux" LICENSE = "TI-TSPA" -LIC_FILES_CHKSUM = "file://TI-Linux-Graphics-DDK-UM-Manifest.doc;md5=b17390502bc89535c86cfbbae961a2a8" +LIC_FILES_CHKSUM = "file://LICENSE;md5=7232b98c1c58f99e3baa03de5207e76f" PACKAGE_ARCH = "${MACHINE_ARCH}" COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15|am65xx" PR = "r38" -BRANCH = "ti-img-sgx/kirkstone-mesa/${PV}" +BRANCH = "${PV}/mesa/glibc-2.35" SRC_URI = " \ git://git.ti.com/git/graphics/omap5-sgx-ddk-um-linux.git;protocol=https;branch=${BRANCH} \ - file://pvrsrvkm.rules \ " -SRCREV = "bbae7217051341f515515ec190e165119102f45a" - -TARGET_PRODUCT:ti33x = "ti335x" -TARGET_PRODUCT:ti43x = "ti437x" -TARGET_PRODUCT:omap-a15 = "ti572x" -TARGET_PRODUCT:am65xx = "ti654x" +SRCREV = "70364424dd496833fad5b243c9e6cc8b077f04ac" INITSCRIPT_NAME = "rc.pvr" INITSCRIPT_PARAMS = "defaults 8" PACKAGECONFIG ??= "udev" -PACKAGECONFIG[udev] = ",,,udev" +PACKAGECONFIG[udev] = "UDEV=true,,,udev" + +def use_sysvinit(d): + return d.getVar('VIRTUAL-RUNTIME_init_manager') == 'sysvinit' -def use_initscript(d): - sysvinit = bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) - udev = bb.utils.contains('PACKAGECONFIG', 'udev', True, False, d) - return sysvinit and not udev +inherit ${@oe.utils.ifelse(use_sysvinit(d), 'update-rc.d', '')} -inherit ${@oe.utils.ifelse(use_initscript(d), 'update-rc.d', '')} +TARGET_PRODUCT:ti33x = "ti335x_linux" +TARGET_PRODUCT:ti43x = "ti437x_linux" +TARGET_PRODUCT:omap-a15 = "ti572x_linux" +TARGET_PRODUCT:am65xx = "ti654x_linux" RDEPENDS:${PN} += "libdrm"@@ -40,24 +37,10 @@ RRECOMMENDS:${PN} += "ti-sgx-ddk-km" S = "${WORKDIR}/git" -do_install () { - oe_runmake install DESTDIR=${D} TARGET_PRODUCT=${TARGET_PRODUCT} - - without_sysvinit=${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)} - with_udev=${@bb.utils.contains('PACKAGECONFIG', 'udev', 'true', 'false', d)} +EXTRA_OEMAKE += "DESTDIR=${D} TARGET_PRODUCT=${TARGET_PRODUCT} ${PACKAGECONFIG_CONFARGS}" - # Delete initscript if it is not needed or would conflict with the udev rules - if ${@oe.utils.ifelse(use_initscript(d), 'false', 'true')}; then - rm -rf ${D}${sysconfdir}/init.d - rmdir --ignore-fail-on-non-empty ${D}${sysconfdir} - fi - - if $with_udev; then - install -m644 -D ${WORKDIR}/pvrsrvkm.rules \ - ${D}${nonarch_base_libdir}/udev/rules.d/80-pvrsrvkm.rules - fi - - chown -R root:root ${D} +do_install() { + oe_runmake install } FILES:${PN} = "${bindir}/*"@@ -66,6 +49,10 @@ FILES:${PN} += "${includedir}/*" FILES:${PN} += "${sysconfdir}/*" FILES:${PN} += "${datadir}/*" FILES:${PN} += "${nonarch_base_libdir}/udev/rules.d" +FILES:${PN} += "${nonarch_base_libdir}/systemd/system" + +# No debug or dev packages for this recipe +PACKAGES = "${PN}" INSANE_SKIP:${PN} += "ldflags" -INSANE_SKIP:${PN} += "already-stripped" +INSANE_SKIP:${PN} += "already-stripped dev-so" -=-=-=-=-=-=-=-=-=-=-=-Links: You receive all messages sent to this group.
View/Reply Online (#17125): https://lists.yoctoproject.org/g/meta-ti/message/17125
Mute This Topic: https://lists.yoctoproject.org/mt/102009262/7693777
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
PATCH v2 2/3 mesa-pvr: bump srcrev for sgx support
In reply to [email protected]From: Randolph Sapp <[email protected]>
Bump the SRCREV to include the required changes to build for SGX now.
--- meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_22.3.5.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_22.3.5.bb +1 -1
@@ -23,7 +23,7 @@ SRC_URI = " \ S = "${WORKDIR}/git" -SRCREV = "54fd9d7dea098b6f11c2a244b0c6763dc8c5690c" +SRCREV = "13829fd7ffa8e9e961cc8702869da55d72f99a84" PACKAGECONFIG:append = " \ ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-img-rogue-driver', 'pvr', '', d)} \
Signature · 1 line
2.42.0
PATCH v2 3/3 machine: include: enable sgx on tested platforms
In reply to [email protected]From: Randolph Sapp <[email protected]>
Enable SGX Graphics on the currently tested platforms.
--- meta-ti-bsp/conf/machine/include/am65xx.inc | 2 +- meta-ti-bsp/conf/machine/include/omap-a15.inc | 2 +- meta-ti-bsp/conf/machine/include/ti33x.inc | 2 +- meta-ti-bsp/conf/machine/include/ti43x.inc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
meta-ti-bsp/conf/machine/include/am65xx.inc +1 -1
@@ -4,7 +4,7 @@ SOC_FAMILY:append = ":am65xx" MACHINE_FEATURES += "screen touchscreen gpu" require conf/machine/include/mesa-pvr.inc -PREFERRED_PROVIDER_virtual/gpudriver ?= "" +PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km" KERNEL_DEVICETREE_PREFIX = "ti/k3-am654"
meta-ti-bsp/conf/machine/include/omap-a15.inc +1 -1
@@ -13,7 +13,7 @@ PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging" # Graphics providers and variables require conf/machine/include/mesa-pvr.inc -PREFERRED_PROVIDER_virtual/gpudriver ?= "" +PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km" PVR_DISPLAY_CONTROLLER_ALIAS ?= "omapdrm" KERNEL_IMAGETYPE = "zImage"
meta-ti-bsp/conf/machine/include/ti33x.inc +1 -1
@@ -14,7 +14,7 @@ PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging" # Graphics providers and variables require conf/machine/include/mesa-pvr.inc -PREFERRED_PROVIDER_virtual/gpudriver ?= "" +PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km" PVR_DISPLAY_CONTROLLER_ALIAS ?= "tilcdc" KERNEL_IMAGETYPE = "zImage"
meta-ti-bsp/conf/machine/include/ti43x.inc +1 -1
@@ -14,7 +14,7 @@ PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging" # Graphics providers and variables require conf/machine/include/mesa-pvr.inc -PREFERRED_PROVIDER_virtual/gpudriver ?= "" +PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km" PVR_DISPLAY_CONTROLLER_ALIAS ?= "omapdrm" KERNEL_IMAGETYPE = "zImage"
Signature · 1 line
2.42.0