diff mbox series

[meta-ti,master/scarthgap,PATCHv2,1/3] ti-img-rogue-*: add ddk 24.1 recipes for ltsprep

Message ID 20240502191843.2380555-2-rs@ti.com
State Accepted
Delegated to: Ryan Eatmon
Headers show
Series GFX driver and mesa update | expand

Commit Message

Randolph Sapp May 2, 2024, 7:18 p.m. UTC
From: Randolph Sapp <rs@ti.com>

Recipes for DDK 24.1, but lock them behind ltsprep tags because they
require device tree changes that do not work on the current default
kernel for this layer.

Signed-off-by: Randolph Sapp <rs@ti.com>
---
 .../ti-img-rogue-driver_24.1.6554834.bb       |  44 ++++++
 .../ti-img-rogue-umlibs_24.1.6554834.bb       | 148 ++++++++++++++++++
 2 files changed, 192 insertions(+)
 create mode 100644 meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_24.1.6554834.bb
 create mode 100644 meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_24.1.6554834.bb

Comments

Denys Dmytriyenko May 2, 2024, 7:45 p.m. UTC | #1
Can you make it a diff please? As shown previously, that helps with review and 
allows spotting issues much easier.


-M[<n>]
--find-renames[=<n>]

Detect renames. If n is specified, it is a threshold on the similarity index 
(i.e. amount of addition/deletions compared to the file’s size). For example, 
-M90% means Git should consider a delete/add pair to be a rename if more than 
90% of the file hasn’t changed. Without a % sign, the number is to be read as 
a fraction, with a decimal point before it. I.e., -M5 becomes 0.5, and is thus 
the same as -M50%. Similarly, -M05 is the same as -M5%. To limit detection to 
exact renames, use -M100%. The default similarity index is 50%.

-C[<n>]
--find-copies[=<n>]

Detect copies as well as renames. See also --find-copies-harder. If n is 
specified, it has the same meaning as for -M<n>.


--find-copies-harder

For performance reasons, by default, -C option finds copies only if the 
original file of the copy was modified in the same changeset. This flag makes 
the command inspect unmodified files as candidates for the source of copy. 
This is a very expensive operation for large projects, so use it with caution. 
Giving more than one -C option has the same effect.



On Thu, May 02, 2024 at 02:18:41PM -0500, rs@ti.com wrote:
> From: Randolph Sapp <rs@ti.com>
> 
> Recipes for DDK 24.1, but lock them behind ltsprep tags because they
> require device tree changes that do not work on the current default
> kernel for this layer.
> 
> Signed-off-by: Randolph Sapp <rs@ti.com>
> ---
>  .../ti-img-rogue-driver_24.1.6554834.bb       |  44 ++++++
>  .../ti-img-rogue-umlibs_24.1.6554834.bb       | 148 ++++++++++++++++++
>  2 files changed, 192 insertions(+)
>  create mode 100644 meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_24.1.6554834.bb
>  create mode 100644 meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_24.1.6554834.bb
> 
> diff --git a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_24.1.6554834.bb b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_24.1.6554834.bb
> new file mode 100644
> index 00000000..a1b76d27
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_24.1.6554834.bb
> @@ -0,0 +1,44 @@
> +DESCRIPTION =  "Kernel drivers for the PowerVR Rogue GPU found in the TI SoCs"
> +HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-driver"
> +LICENSE = "MIT | GPL-2.0-only"
> +LIC_FILES_CHKSUM = "file://README;beginline=14;endline=19;md5=0403c7dea01a2b8232261e805325fac2"
> +
> +DEFAULT_PREFERENCE = "-1"
> +
> +inherit module
> +
> +PROVIDES = "virtual/gpudriver"
> +
> +MACHINE_KERNEL_PR:append = "b"
> +PR = "${MACHINE_KERNEL_PR}"
> +
> +PACKAGE_ARCH = "${MACHINE_ARCH}"
> +
> +COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|am62xx|am62pxx|j722s"
> +
> +DEPENDS = "virtual/kernel"
> +
> +BRANCH = "linuxws/scarthgap/k6.6/${PV}"
> +
> +SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-driver.git;protocol=https;branch=${BRANCH}"
> +
> +S = "${WORKDIR}/git"
> +
> +SRCREV = "e2dfdfee991dadc18175f27fe9e8676e910a2f8d"
> +
> +TARGET_PRODUCT:j721e = "j721e_linux"
> +TARGET_PRODUCT:j721s2 = "j721s2_linux"
> +TARGET_PRODUCT:j784s4 = "j784s4_linux"
> +TARGET_PRODUCT:am62xx = "am62_linux"
> +TARGET_PRODUCT:am62pxx = "am62p_linux"
> +TARGET_PRODUCT:j722s = "j722s_linux"
> +PVR_BUILD = "release"
> +PVR_WS = "lws-generic"
> +
> +EXTRA_OEMAKE += 'KERNELDIR="${STAGING_KERNEL_DIR}" BUILD=${PVR_BUILD} PVR_BUILD_DIR=${TARGET_PRODUCT} WINDOW_SYSTEM=${PVR_WS}'
> +
> +do_install() {
> +    make -C ${STAGING_KERNEL_DIR} M=${B}/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-img-rogue-umlibs"
> diff --git a/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_24.1.6554834.bb b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_24.1.6554834.bb
> new file mode 100644
> index 00000000..d43d1635
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_24.1.6554834.bb
> @@ -0,0 +1,148 @@
> +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"
> +
> +DEFAULT_PREFERENCE = "-1"
> +
> +inherit bin_package
> +
> +INHIBIT_DEFAULT_DEPS = ""
> +
> +PACKAGE_ARCH = "${MACHINE_ARCH}"
> +COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|am62xx|am62pxx|j722s"
> +
> +PR = "r3"
> +
> +BRANCH = "linuxws/scarthgap/k6.6/${PV}"
> +SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-umlibs.git;protocol=https;branch=${BRANCH}"
> +SRCREV = "e473234158c736248cf71a60080b7faf76fca561"
> +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"
> +TARGET_PRODUCT:am62pxx = "am62p_linux"
> +TARGET_PRODUCT:j722s = "j722s_linux"
> +PVR_BUILD = "release"
> +PVR_WS = "lws-generic"
> +
> +RDEPENDS:${PN} = " \
> +    libdrm \
> +    ti-img-rogue-driver \
> +    ${PN}-firmware \
> +"
> +
> +PACKAGECONFIG ?= " \
> +    ${@bb.utils.contains('DISTRO_FEATURES', 'vulkan wayland', 'vulkan', '', d)} \
> +    ${@bb.utils.filter('DISTRO_FEATURES', 'opengl opencl', d)} \
> +"
> +
> +PACKAGECONFIG[opengl] = ",,,,${GLES_PACKAGES}"
> +PACKAGECONFIG[vulkan] = ",,,,${VULKAN_PACKAGES}"
> +PACKAGECONFIG[opencl] = ",,,,${OPENCL_PACKAGES}"
> +
> +def get_file_list(package_list_var, d):
> +    file_list = []
> +    package_list = d.getVar(package_list_var)
> +    prefix = f"{d.getVar('S')}/"
> +    if package_list:
> +        for package in package_list.split():
> +            package_file_string = d.getVar(f"FILES:{package}")
> +            if package_file_string:
> +                for package_file in package_file_string.split():
> +                    file_list.append(f"{prefix}{package_file}")
> +    return " ".join(file_list)
> +
> +do_install:prepend() {
> +    if ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'false', 'true', d)}; then
> +        for file in ${@get_file_list('GLES_PACKAGES',  d)}; do
> +            rm -rf ${file}
> +        done
> +    fi
> +    if ${@bb.utils.contains('PACKAGECONFIG', 'vulkan', 'false', 'true', d)}; then
> +        for file in ${@get_file_list('VULKAN_PACKAGES', d)}; do
> +            rm -rf ${file}
> +        done
> +    fi
> +    if ${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'false', 'true', d)}; then
> +        for file in ${@get_file_list('OPENCL_PACKAGES', d)}; do
> +            rm -rf ${file}
> +        done
> +    fi
> +    if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; then
> +        if [ -e ${S}/lib/firmware ]; then
> +            mv ${S}/lib/firmware ${S}${nonarch_base_libdir}
> +        fi
> +    fi
> +
> +    # clean up any empty directories
> +    find "${S}" -empty -type d -delete
> +}
> +
> +GLES_PACKAGES = "libgles1-rogue libgles2-rogue libgles3-rogue"
> +VULKAN_PACKAGES = "libvk-rogue"
> +OPENCL_PACKAGES = "libopencl-rogue libopencl-rogue-tools"
> +
> +PACKAGES = " \
> +    ${@bb.utils.contains('PACKAGECONFIG', 'opengl', d.getVar('GLES_PACKAGES'), '', d)} \
> +    ${@bb.utils.contains('PACKAGECONFIG', 'vulkan', d.getVar('VULKAN_PACKAGES'), '', d)} \
> +    ${@bb.utils.contains('PACKAGECONFIG', 'opencl', d.getVar('OPENCL_PACKAGES'), '', d)} \
> +    ${PN}-tools \
> +    ${PN}-firmware \
> +    ${PN} \
> +"
> +
> +# Inject variables so that packages don't get Debian-renamed (which would
> +# remove the -rogue suffix), but don't RPROVIDEs/RCONFLICTs on the generic
> +# libgl name to prevent colliding with swrast libs
> +python __anonymous() {
> +    suffix = ""
> +    if "-native" in d.getVar("PN"):
> +        suffix = "-native"
> +    for p in (("vulkan", "libvk",),
> +              ("gles", "libgles1", "libglesv1-cm1"),
> +              ("gles", "libgles2", "libglesv2-2"),
> +              ("gles", "libgles3",),
> +              ("opencl", "libopencl",)):
> +        mlprefix = d.getVar("MLPREFIX")
> +        fullp = mlprefix + p[1] + "-rogue" + suffix
> +        mlprefix = d.getVar("MLPREFIX")
> +        pkgs = " " + " ".join(mlprefix + x + suffix for x in p[1:])
> +        d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1")
> +        d.setVar("INSANE_SKIP:" + fullp, "dev-so ldflags")
> +        d.appendVar("RRECOMMENDS:" + fullp, " ${MLPREFIX}ti-img-rogue-umlibs" + suffix)
> +}
> +
> +# gles specific shared objects
> +FILES:libgles1-rogue = "${libdir}/libGLESv1*.so*"
> +FILES:libgles2-rogue = "${libdir}/libGLESv2*.so*"
> +RDEPENDS:libgles1-rogue += "mesa-megadriver"
> +RDEPENDS:libgles2-rogue += "mesa-megadriver"
> +
> +# vulkan specific shared objects and configs
> +FILES:libvk-rogue = "${libdir}/libVK_IMG.so* ${datadir}/vulkan"
> +RDEPENDS:libvk-rogue += "vulkan-loader wayland libdrm"
> +
> +# opencl specific shared objects and configs
> +FILES:libopencl-rogue = "${libdir}/libPVROCL.so* ${sysconfdir}/OpenCL"
> +RDEPENDS:libopencl-rogue += "opencl-icd-loader"
> +RRECOMMENDS:libopencl-rogue += "libopencl-rogue-tools"
> +FILES:libopencl-rogue-tools += "${bindir}/ocl*"
> +DEBIAN_NOAUTONAME:libopencl-rogue-tools = "1"
> +
> +# optional tools and tests
> +FILES:${PN}-tools = "${bindir}/"
> +RDEPENDS:${PN}-tools = "python3-core libdrm ${PN}"
> +INSANE_SKIP:${PN}-tools = "ldflags"
> +
> +# required firmware
> +FILES:${PN}-firmware = "${base_libdir}/firmware/*"
> +INSANE_SKIP:${PN}-firmware += "arch"
> +
> +RRECOMMENDS:${PN} += " \
> +    ${PN}-tools \
> +"
> +
> +INSANE_SKIP:${PN} += "already-stripped dev-so ldflags"
> -- 
> 2.44.0
>
Randolph Sapp May 8, 2024, 8:42 p.m. UTC | #2
On Thu May 2, 2024 at 2:45 PM CDT, Denys Dmytriyenko wrote:
> Can you make it a diff please? As shown previously, that helps with review and 
> allows spotting issues much easier.
>
[snip]

Yeah, sorry about the delay on this. Just got back to Dallas. Appending the diff
here if people need it. I can submit a v3 for this if necessary. Just let me
know.

---

From 9666459f524333440c61eeae7c0ad430c58d740e Mon Sep 17 00:00:00 2001
From: Randolph Sapp <rs@ti.com>
Date: Tue, 30 Apr 2024 14:56:57 -0500
Subject: [PATCH] ti-img-rogue-*: add ddk 24.1 recipes for ltsprep

Recipes for DDK 24.1, but lock them behind ltsprep tags because they
require device tree changes that do not work on the current default
kernel for this layer.

Signed-off-by: Randolph Sapp <rs@ti.com>
---
 ...6512818.bb => ti-img-rogue-driver_24.1.6554834.bb} |  4 +++-
 ...6512818.bb => ti-img-rogue-umlibs_24.1.6554834.bb} | 11 +++++++----
 2 files changed, 10 insertions(+), 5 deletions(-)
 copy meta-ti-bsp/recipes-bsp/powervr-drivers/{ti-img-rogue-driver_23.3.6512818.bb => ti-img-rogue-driver_24.1.6554834.bb} (94%)
 copy meta-ti-bsp/recipes-graphics/powervr-umlibs/{ti-img-rogue-umlibs_23.3.6512818.bb => ti-img-rogue-umlibs_24.1.6554834.bb} (94%)

diff --git a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_23.3.6512818.bb b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_24.1.6554834.bb
similarity index 94%
copy from meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_23.3.6512818.bb
copy to meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_24.1.6554834.bb
index 02ec9fe9..a1b76d27 100644
--- a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_23.3.6512818.bb
+++ b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_24.1.6554834.bb
@@ -3,6 +3,8 @@ HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-driver"
 LICENSE = "MIT | GPL-2.0-only"
 LIC_FILES_CHKSUM = "file://README;beginline=14;endline=19;md5=0403c7dea01a2b8232261e805325fac2"
 
+DEFAULT_PREFERENCE = "-1"
+
 inherit module
 
 PROVIDES = "virtual/gpudriver"
@@ -22,7 +24,7 @@ SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-driver.git;protocol=https;
 
 S = "${WORKDIR}/git"
 
-SRCREV = "2f409b4dd2540e896b54bff02219d4fc51129b81"
+SRCREV = "e2dfdfee991dadc18175f27fe9e8676e910a2f8d"
 
 TARGET_PRODUCT:j721e = "j721e_linux"
 TARGET_PRODUCT:j721s2 = "j721s2_linux"
diff --git a/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.3.6512818.bb b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_24.1.6554834.bb
similarity index 94%
copy from meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.3.6512818.bb
copy to meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_24.1.6554834.bb
index a0a9a295..d43d1635 100644
--- a/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.3.6512818.bb
+++ b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_24.1.6554834.bb
@@ -3,6 +3,8 @@ HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-umlibs"
 LICENSE = "TI-TFL"
 LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=7232b98c1c58f99e3baa03de5207e76f"
 
+DEFAULT_PREFERENCE = "-1"
+
 inherit bin_package
 
 INHIBIT_DEFAULT_DEPS = ""
@@ -14,7 +16,7 @@ PR = "r3"
 
 BRANCH = "linuxws/scarthgap/k6.6/${PV}"
 SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-umlibs.git;protocol=https;branch=${BRANCH}"
-SRCREV = "0b9e64254269be2fa95c4f3e1dd925d6e4d58199"
+SRCREV = "e473234158c736248cf71a60080b7faf76fca561"
 S = "${WORKDIR}/git/targetfs/${TARGET_PRODUCT}/${PVR_WS}/${PVR_BUILD}"
 
 TARGET_PRODUCT:j721e = "j721e_linux"
@@ -109,7 +111,7 @@ python __anonymous() {
         mlprefix = d.getVar("MLPREFIX")
         pkgs = " " + " ".join(mlprefix + x + suffix for x in p[1:])
         d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1")
-        d.setVar("INSANE_SKIP:" + fullp, "dev-so")
+        d.setVar("INSANE_SKIP:" + fullp, "dev-so ldflags")
         d.appendVar("RRECOMMENDS:" + fullp, " ${MLPREFIX}ti-img-rogue-umlibs" + suffix)
 }
 
@@ -132,7 +134,8 @@ DEBIAN_NOAUTONAME:libopencl-rogue-tools = "1"
 
 # optional tools and tests
 FILES:${PN}-tools = "${bindir}/"
-RDEPENDS:${PN}-tools = "python3-core ${PN}"
+RDEPENDS:${PN}-tools = "python3-core libdrm ${PN}"
+INSANE_SKIP:${PN}-tools = "ldflags"
 
 # required firmware
 FILES:${PN}-firmware = "${base_libdir}/firmware/*"
@@ -142,4 +145,4 @@ RRECOMMENDS:${PN} += " \
     ${PN}-tools \
 "
 
-INSANE_SKIP:${PN} += "already-stripped dev-so"
+INSANE_SKIP:${PN} += "already-stripped dev-so ldflags"
Ryan Eatmon May 9, 2024, 1:51 p.m. UTC | #3
On 5/8/2024 3:42 PM, Randolph Sapp wrote:
> On Thu May 2, 2024 at 2:45 PM CDT, Denys Dmytriyenko wrote:
>> Can you make it a diff please? As shown previously, that helps with review and
>> allows spotting issues much easier.
>>
> [snip]
> 
> Yeah, sorry about the delay on this. Just got back to Dallas. Appending the diff
> here if people need it. I can submit a v3 for this if necessary. Just let me
> know.

I already accepted the patch, just for the future add the needed flags 
to the git format-patch call to generate what Denys is asking for.


> ---
> 
>  From 9666459f524333440c61eeae7c0ad430c58d740e Mon Sep 17 00:00:00 2001
> From: Randolph Sapp <rs@ti.com>
> Date: Tue, 30 Apr 2024 14:56:57 -0500
> Subject: [PATCH] ti-img-rogue-*: add ddk 24.1 recipes for ltsprep
> 
> Recipes for DDK 24.1, but lock them behind ltsprep tags because they
> require device tree changes that do not work on the current default
> kernel for this layer.
> 
> Signed-off-by: Randolph Sapp <rs@ti.com>
> ---
>   ...6512818.bb => ti-img-rogue-driver_24.1.6554834.bb} |  4 +++-
>   ...6512818.bb => ti-img-rogue-umlibs_24.1.6554834.bb} | 11 +++++++----
>   2 files changed, 10 insertions(+), 5 deletions(-)
>   copy meta-ti-bsp/recipes-bsp/powervr-drivers/{ti-img-rogue-driver_23.3.6512818.bb => ti-img-rogue-driver_24.1.6554834.bb} (94%)
>   copy meta-ti-bsp/recipes-graphics/powervr-umlibs/{ti-img-rogue-umlibs_23.3.6512818.bb => ti-img-rogue-umlibs_24.1.6554834.bb} (94%)
> 
> diff --git a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_23.3.6512818.bb b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_24.1.6554834.bb
> similarity index 94%
> copy from meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_23.3.6512818.bb
> copy to meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_24.1.6554834.bb
> index 02ec9fe9..a1b76d27 100644
> --- a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_23.3.6512818.bb
> +++ b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_24.1.6554834.bb
> @@ -3,6 +3,8 @@ HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-driver"
>   LICENSE = "MIT | GPL-2.0-only"
>   LIC_FILES_CHKSUM = "file://README;beginline=14;endline=19;md5=0403c7dea01a2b8232261e805325fac2"
>   
> +DEFAULT_PREFERENCE = "-1"
> +
>   inherit module
>   
>   PROVIDES = "virtual/gpudriver"
> @@ -22,7 +24,7 @@ SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-driver.git;protocol=https;
>   
>   S = "${WORKDIR}/git"
>   
> -SRCREV = "2f409b4dd2540e896b54bff02219d4fc51129b81"
> +SRCREV = "e2dfdfee991dadc18175f27fe9e8676e910a2f8d"
>   
>   TARGET_PRODUCT:j721e = "j721e_linux"
>   TARGET_PRODUCT:j721s2 = "j721s2_linux"
> diff --git a/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.3.6512818.bb b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_24.1.6554834.bb
> similarity index 94%
> copy from meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.3.6512818.bb
> copy to meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_24.1.6554834.bb
> index a0a9a295..d43d1635 100644
> --- a/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.3.6512818.bb
> +++ b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_24.1.6554834.bb
> @@ -3,6 +3,8 @@ HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-umlibs"
>   LICENSE = "TI-TFL"
>   LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=7232b98c1c58f99e3baa03de5207e76f"
>   
> +DEFAULT_PREFERENCE = "-1"
> +
>   inherit bin_package
>   
>   INHIBIT_DEFAULT_DEPS = ""
> @@ -14,7 +16,7 @@ PR = "r3"
>   
>   BRANCH = "linuxws/scarthgap/k6.6/${PV}"
>   SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-umlibs.git;protocol=https;branch=${BRANCH}"
> -SRCREV = "0b9e64254269be2fa95c4f3e1dd925d6e4d58199"
> +SRCREV = "e473234158c736248cf71a60080b7faf76fca561"
>   S = "${WORKDIR}/git/targetfs/${TARGET_PRODUCT}/${PVR_WS}/${PVR_BUILD}"
>   
>   TARGET_PRODUCT:j721e = "j721e_linux"
> @@ -109,7 +111,7 @@ python __anonymous() {
>           mlprefix = d.getVar("MLPREFIX")
>           pkgs = " " + " ".join(mlprefix + x + suffix for x in p[1:])
>           d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1")
> -        d.setVar("INSANE_SKIP:" + fullp, "dev-so")
> +        d.setVar("INSANE_SKIP:" + fullp, "dev-so ldflags")
>           d.appendVar("RRECOMMENDS:" + fullp, " ${MLPREFIX}ti-img-rogue-umlibs" + suffix)
>   }
>   
> @@ -132,7 +134,8 @@ DEBIAN_NOAUTONAME:libopencl-rogue-tools = "1"
>   
>   # optional tools and tests
>   FILES:${PN}-tools = "${bindir}/"
> -RDEPENDS:${PN}-tools = "python3-core ${PN}"
> +RDEPENDS:${PN}-tools = "python3-core libdrm ${PN}"
> +INSANE_SKIP:${PN}-tools = "ldflags"
>   
>   # required firmware
>   FILES:${PN}-firmware = "${base_libdir}/firmware/*"
> @@ -142,4 +145,4 @@ RRECOMMENDS:${PN} += " \
>       ${PN}-tools \
>   "
>   
> -INSANE_SKIP:${PN} += "already-stripped dev-so"
> +INSANE_SKIP:${PN} += "already-stripped dev-so ldflags"
Denys Dmytriyenko May 9, 2024, 5:12 p.m. UTC | #4
On Thu, May 09, 2024 at 08:51:21AM -0500, Ryan Eatmon wrote:
> 
> 
> On 5/8/2024 3:42 PM, Randolph Sapp wrote:
> >On Thu May 2, 2024 at 2:45 PM CDT, Denys Dmytriyenko wrote:
> >>Can you make it a diff please? As shown previously, that helps with review and
> >>allows spotting issues much easier.
> >>
> >[snip]
> >
> >Yeah, sorry about the delay on this. Just got back to Dallas. Appending the diff
> >here if people need it. I can submit a v3 for this if necessary. Just let me
> >know.
> 
> I already accepted the patch, just for the future add the needed
> flags to the git format-patch call to generate what Denys is asking
> for.

As a maintainer, you should be asking for this to ensure no issues pass 
unnoticed during the review.

Yes, v2 looks good and previously reported issues got resolved, thanks.


> >---
> >
> > From 9666459f524333440c61eeae7c0ad430c58d740e Mon Sep 17 00:00:00 2001
> >From: Randolph Sapp <rs@ti.com>
> >Date: Tue, 30 Apr 2024 14:56:57 -0500
> >Subject: [PATCH] ti-img-rogue-*: add ddk 24.1 recipes for ltsprep
> >
> >Recipes for DDK 24.1, but lock them behind ltsprep tags because they
> >require device tree changes that do not work on the current default
> >kernel for this layer.
> >
> >Signed-off-by: Randolph Sapp <rs@ti.com>
> >---
> >  ...6512818.bb => ti-img-rogue-driver_24.1.6554834.bb} |  4 +++-
> >  ...6512818.bb => ti-img-rogue-umlibs_24.1.6554834.bb} | 11 +++++++----
> >  2 files changed, 10 insertions(+), 5 deletions(-)
> >  copy meta-ti-bsp/recipes-bsp/powervr-drivers/{ti-img-rogue-driver_23.3.6512818.bb => ti-img-rogue-driver_24.1.6554834.bb} (94%)
> >  copy meta-ti-bsp/recipes-graphics/powervr-umlibs/{ti-img-rogue-umlibs_23.3.6512818.bb => ti-img-rogue-umlibs_24.1.6554834.bb} (94%)
> >
> >diff --git a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_23.3.6512818.bb b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_24.1.6554834.bb
> >similarity index 94%
> >copy from meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_23.3.6512818.bb
> >copy to meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_24.1.6554834.bb
> >index 02ec9fe9..a1b76d27 100644
> >--- a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_23.3.6512818.bb
> >+++ b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_24.1.6554834.bb
> >@@ -3,6 +3,8 @@ HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-driver"
> >  LICENSE = "MIT | GPL-2.0-only"
> >  LIC_FILES_CHKSUM = "file://README;beginline=14;endline=19;md5=0403c7dea01a2b8232261e805325fac2"
> >+DEFAULT_PREFERENCE = "-1"
> >+
> >  inherit module
> >  PROVIDES = "virtual/gpudriver"
> >@@ -22,7 +24,7 @@ SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-driver.git;protocol=https;
> >  S = "${WORKDIR}/git"
> >-SRCREV = "2f409b4dd2540e896b54bff02219d4fc51129b81"
> >+SRCREV = "e2dfdfee991dadc18175f27fe9e8676e910a2f8d"
> >  TARGET_PRODUCT:j721e = "j721e_linux"
> >  TARGET_PRODUCT:j721s2 = "j721s2_linux"
> >diff --git a/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.3.6512818.bb b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_24.1.6554834.bb
> >similarity index 94%
> >copy from meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.3.6512818.bb
> >copy to meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_24.1.6554834.bb
> >index a0a9a295..d43d1635 100644
> >--- a/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.3.6512818.bb
> >+++ b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_24.1.6554834.bb
> >@@ -3,6 +3,8 @@ HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-umlibs"
> >  LICENSE = "TI-TFL"
> >  LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=7232b98c1c58f99e3baa03de5207e76f"
> >+DEFAULT_PREFERENCE = "-1"
> >+
> >  inherit bin_package
> >  INHIBIT_DEFAULT_DEPS = ""
> >@@ -14,7 +16,7 @@ PR = "r3"
> >  BRANCH = "linuxws/scarthgap/k6.6/${PV}"
> >  SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-umlibs.git;protocol=https;branch=${BRANCH}"
> >-SRCREV = "0b9e64254269be2fa95c4f3e1dd925d6e4d58199"
> >+SRCREV = "e473234158c736248cf71a60080b7faf76fca561"
> >  S = "${WORKDIR}/git/targetfs/${TARGET_PRODUCT}/${PVR_WS}/${PVR_BUILD}"
> >  TARGET_PRODUCT:j721e = "j721e_linux"
> >@@ -109,7 +111,7 @@ python __anonymous() {
> >          mlprefix = d.getVar("MLPREFIX")
> >          pkgs = " " + " ".join(mlprefix + x + suffix for x in p[1:])
> >          d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1")
> >-        d.setVar("INSANE_SKIP:" + fullp, "dev-so")
> >+        d.setVar("INSANE_SKIP:" + fullp, "dev-so ldflags")
> >          d.appendVar("RRECOMMENDS:" + fullp, " ${MLPREFIX}ti-img-rogue-umlibs" + suffix)
> >  }
> >@@ -132,7 +134,8 @@ DEBIAN_NOAUTONAME:libopencl-rogue-tools = "1"
> >  # optional tools and tests
> >  FILES:${PN}-tools = "${bindir}/"
> >-RDEPENDS:${PN}-tools = "python3-core ${PN}"
> >+RDEPENDS:${PN}-tools = "python3-core libdrm ${PN}"
> >+INSANE_SKIP:${PN}-tools = "ldflags"
> >  # required firmware
> >  FILES:${PN}-firmware = "${base_libdir}/firmware/*"
> >@@ -142,4 +145,4 @@ RRECOMMENDS:${PN} += " \
> >      ${PN}-tools \
> >  "
> >-INSANE_SKIP:${PN} += "already-stripped dev-so"
> >+INSANE_SKIP:${PN} += "already-stripped dev-so ldflags"
diff mbox series

Patch

diff --git a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_24.1.6554834.bb b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_24.1.6554834.bb
new file mode 100644
index 00000000..a1b76d27
--- /dev/null
+++ b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_24.1.6554834.bb
@@ -0,0 +1,44 @@ 
+DESCRIPTION =  "Kernel drivers for the PowerVR Rogue GPU found in the TI SoCs"
+HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-driver"
+LICENSE = "MIT | GPL-2.0-only"
+LIC_FILES_CHKSUM = "file://README;beginline=14;endline=19;md5=0403c7dea01a2b8232261e805325fac2"
+
+DEFAULT_PREFERENCE = "-1"
+
+inherit module
+
+PROVIDES = "virtual/gpudriver"
+
+MACHINE_KERNEL_PR:append = "b"
+PR = "${MACHINE_KERNEL_PR}"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|am62xx|am62pxx|j722s"
+
+DEPENDS = "virtual/kernel"
+
+BRANCH = "linuxws/scarthgap/k6.6/${PV}"
+
+SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-driver.git;protocol=https;branch=${BRANCH}"
+
+S = "${WORKDIR}/git"
+
+SRCREV = "e2dfdfee991dadc18175f27fe9e8676e910a2f8d"
+
+TARGET_PRODUCT:j721e = "j721e_linux"
+TARGET_PRODUCT:j721s2 = "j721s2_linux"
+TARGET_PRODUCT:j784s4 = "j784s4_linux"
+TARGET_PRODUCT:am62xx = "am62_linux"
+TARGET_PRODUCT:am62pxx = "am62p_linux"
+TARGET_PRODUCT:j722s = "j722s_linux"
+PVR_BUILD = "release"
+PVR_WS = "lws-generic"
+
+EXTRA_OEMAKE += 'KERNELDIR="${STAGING_KERNEL_DIR}" BUILD=${PVR_BUILD} PVR_BUILD_DIR=${TARGET_PRODUCT} WINDOW_SYSTEM=${PVR_WS}'
+
+do_install() {
+    make -C ${STAGING_KERNEL_DIR} M=${B}/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-img-rogue-umlibs"
diff --git a/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_24.1.6554834.bb b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_24.1.6554834.bb
new file mode 100644
index 00000000..d43d1635
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_24.1.6554834.bb
@@ -0,0 +1,148 @@ 
+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"
+
+DEFAULT_PREFERENCE = "-1"
+
+inherit bin_package
+
+INHIBIT_DEFAULT_DEPS = ""
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|am62xx|am62pxx|j722s"
+
+PR = "r3"
+
+BRANCH = "linuxws/scarthgap/k6.6/${PV}"
+SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-umlibs.git;protocol=https;branch=${BRANCH}"
+SRCREV = "e473234158c736248cf71a60080b7faf76fca561"
+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"
+TARGET_PRODUCT:am62pxx = "am62p_linux"
+TARGET_PRODUCT:j722s = "j722s_linux"
+PVR_BUILD = "release"
+PVR_WS = "lws-generic"
+
+RDEPENDS:${PN} = " \
+    libdrm \
+    ti-img-rogue-driver \
+    ${PN}-firmware \
+"
+
+PACKAGECONFIG ?= " \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'vulkan wayland', 'vulkan', '', d)} \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'opengl opencl', d)} \
+"
+
+PACKAGECONFIG[opengl] = ",,,,${GLES_PACKAGES}"
+PACKAGECONFIG[vulkan] = ",,,,${VULKAN_PACKAGES}"
+PACKAGECONFIG[opencl] = ",,,,${OPENCL_PACKAGES}"
+
+def get_file_list(package_list_var, d):
+    file_list = []
+    package_list = d.getVar(package_list_var)
+    prefix = f"{d.getVar('S')}/"
+    if package_list:
+        for package in package_list.split():
+            package_file_string = d.getVar(f"FILES:{package}")
+            if package_file_string:
+                for package_file in package_file_string.split():
+                    file_list.append(f"{prefix}{package_file}")
+    return " ".join(file_list)
+
+do_install:prepend() {
+    if ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'false', 'true', d)}; then
+        for file in ${@get_file_list('GLES_PACKAGES',  d)}; do
+            rm -rf ${file}
+        done
+    fi
+    if ${@bb.utils.contains('PACKAGECONFIG', 'vulkan', 'false', 'true', d)}; then
+        for file in ${@get_file_list('VULKAN_PACKAGES', d)}; do
+            rm -rf ${file}
+        done
+    fi
+    if ${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'false', 'true', d)}; then
+        for file in ${@get_file_list('OPENCL_PACKAGES', d)}; do
+            rm -rf ${file}
+        done
+    fi
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; then
+        if [ -e ${S}/lib/firmware ]; then
+            mv ${S}/lib/firmware ${S}${nonarch_base_libdir}
+        fi
+    fi
+
+    # clean up any empty directories
+    find "${S}" -empty -type d -delete
+}
+
+GLES_PACKAGES = "libgles1-rogue libgles2-rogue libgles3-rogue"
+VULKAN_PACKAGES = "libvk-rogue"
+OPENCL_PACKAGES = "libopencl-rogue libopencl-rogue-tools"
+
+PACKAGES = " \
+    ${@bb.utils.contains('PACKAGECONFIG', 'opengl', d.getVar('GLES_PACKAGES'), '', d)} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'vulkan', d.getVar('VULKAN_PACKAGES'), '', d)} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'opencl', d.getVar('OPENCL_PACKAGES'), '', d)} \
+    ${PN}-tools \
+    ${PN}-firmware \
+    ${PN} \
+"
+
+# Inject variables so that packages don't get Debian-renamed (which would
+# remove the -rogue suffix), but don't RPROVIDEs/RCONFLICTs on the generic
+# libgl name to prevent colliding with swrast libs
+python __anonymous() {
+    suffix = ""
+    if "-native" in d.getVar("PN"):
+        suffix = "-native"
+    for p in (("vulkan", "libvk",),
+              ("gles", "libgles1", "libglesv1-cm1"),
+              ("gles", "libgles2", "libglesv2-2"),
+              ("gles", "libgles3",),
+              ("opencl", "libopencl",)):
+        mlprefix = d.getVar("MLPREFIX")
+        fullp = mlprefix + p[1] + "-rogue" + suffix
+        mlprefix = d.getVar("MLPREFIX")
+        pkgs = " " + " ".join(mlprefix + x + suffix for x in p[1:])
+        d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1")
+        d.setVar("INSANE_SKIP:" + fullp, "dev-so ldflags")
+        d.appendVar("RRECOMMENDS:" + fullp, " ${MLPREFIX}ti-img-rogue-umlibs" + suffix)
+}
+
+# gles specific shared objects
+FILES:libgles1-rogue = "${libdir}/libGLESv1*.so*"
+FILES:libgles2-rogue = "${libdir}/libGLESv2*.so*"
+RDEPENDS:libgles1-rogue += "mesa-megadriver"
+RDEPENDS:libgles2-rogue += "mesa-megadriver"
+
+# vulkan specific shared objects and configs
+FILES:libvk-rogue = "${libdir}/libVK_IMG.so* ${datadir}/vulkan"
+RDEPENDS:libvk-rogue += "vulkan-loader wayland libdrm"
+
+# opencl specific shared objects and configs
+FILES:libopencl-rogue = "${libdir}/libPVROCL.so* ${sysconfdir}/OpenCL"
+RDEPENDS:libopencl-rogue += "opencl-icd-loader"
+RRECOMMENDS:libopencl-rogue += "libopencl-rogue-tools"
+FILES:libopencl-rogue-tools += "${bindir}/ocl*"
+DEBIAN_NOAUTONAME:libopencl-rogue-tools = "1"
+
+# optional tools and tests
+FILES:${PN}-tools = "${bindir}/"
+RDEPENDS:${PN}-tools = "python3-core libdrm ${PN}"
+INSANE_SKIP:${PN}-tools = "ldflags"
+
+# required firmware
+FILES:${PN}-firmware = "${base_libdir}/firmware/*"
+INSANE_SKIP:${PN}-firmware += "arch"
+
+RRECOMMENDS:${PN} += " \
+    ${PN}-tools \
+"
+
+INSANE_SKIP:${PN} += "already-stripped dev-so ldflags"