From patchwork Thu May 2 19:18:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randolph Sapp X-Patchwork-Id: 43182 X-Patchwork-Delegate: reatmon@ti.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B14D1C41513 for ; Thu, 2 May 2024 19:19:00 +0000 (UTC) Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by mx.groups.io with SMTP id smtpd.web10.3516.1714677535962211443 for ; Thu, 02 May 2024 12:18:56 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=aa5D72go; spf=pass (domain: ti.com, ip: 198.47.23.249, mailfrom: rs@ti.com) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 442JIpRq047565; Thu, 2 May 2024 14:18:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1714677531; bh=m+eUgTJnEKsLoT1uutTONp6gzRz+0WcXv5LG2uYxfcE=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=aa5D72godmomlZQMHgxvb4ESIwY5jvSGBvYn8iSRk+veEMzdnJZ6audIBoI7Nfpdc 1d7fdVAPUTmIqM/3YxNQVAlds7ykdntcqHNSH0GKC9J/IcQw+BeQv6Y49Y5BKlIMRi IGwsbfkhDtLItEBlZ9mmcsX3splUe2vX2Id9a3d4= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 442JIpFG004673 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 2 May 2024 14:18:51 -0500 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 2 May 2024 14:18:51 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 2 May 2024 14:18:51 -0500 Received: from rs-desk.dhcp.ti.com (rs-desk.dhcp.ti.com [128.247.81.144]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 442JIpgT120631; Thu, 2 May 2024 14:18:51 -0500 From: To: , CC: , Subject: [meta-ti][master/scarthgap][PATCHv2 1/3] ti-img-rogue-*: add ddk 24.1 recipes for ltsprep Date: Thu, 2 May 2024 14:18:41 -0500 Message-ID: <20240502191843.2380555-2-rs@ti.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240502191843.2380555-1-rs@ti.com> References: <20240502191843.2380555-1-rs@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 02 May 2024 19:19:00 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-ti/message/17637 From: Randolph Sapp 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 Signed-off-by: Randolph Sapp --- .../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" From patchwork Thu May 2 19:18:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randolph Sapp X-Patchwork-Id: 43183 X-Patchwork-Delegate: reatmon@ti.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD732C04FFE for ; Thu, 2 May 2024 19:19:00 +0000 (UTC) Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by mx.groups.io with SMTP id smtpd.web10.3520.1714677536816158465 for ; Thu, 02 May 2024 12:18:56 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ZOm7Pswv; spf=pass (domain: ti.com, ip: 198.47.23.248, mailfrom: rs@ti.com) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 442JIpEx116829; Thu, 2 May 2024 14:18:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1714677531; bh=RQ5SFGc88zaYyWAErWdKUE1wS6OKEMtOionuYcRn6ZI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ZOm7Pswv26B2h48MV/AzKrsbcIUBkbAFKv3GikxrXwMZ0KQ/N89DrI1o6Ye4LPdfr Ucm9WAD+/C/1SDsx4j0Cdr11yaQVfnhSpLeuq9Qem1OEt0fCEAmHtsXL+0jByCNff3 OqnAMVNbgO9PhRgU0LAzLfkE04iR2yT+aednSPbA= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 442JIpnh065920 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 2 May 2024 14:18:51 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 2 May 2024 14:18:51 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 2 May 2024 14:18:51 -0500 Received: from rs-desk.dhcp.ti.com (rs-desk.dhcp.ti.com [128.247.81.144]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 442JIpgU120631; Thu, 2 May 2024 14:18:51 -0500 From: To: , CC: , Subject: [meta-ti][master/scarthgap][PATCHv2 2/3] mesa-pvr_23.2.1: import mesa patches from oe-core/master Date: Thu, 2 May 2024 14:18:42 -0500 Message-ID: <20240502191843.2380555-3-rs@ti.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240502191843.2380555-1-rs@ti.com> References: <20240502191843.2380555-1-rs@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 02 May 2024 19:19:00 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-ti/message/17639 From: Randolph Sapp Locally overlay verbatim copies of mesa 22.3.5 patches from oe-core/master, so we get whatever QoL patches from core relevant to the current release. Signed-off-by: Randolph Sapp --- .../0001-gallium-Fix-build-with-llvm-17.patch | 41 ++++++++++++++++++ ...e-cmake-dependency-detector-for-llvm.patch | 42 ++++++++++++++++++ ...sdetects-64bit-atomics-on-mips-clang.patch | 25 +++++++++++ ...k-for-all-linux-host_os-combinations.patch | 43 +++++++++++++++++++ 4 files changed, 151 insertions(+) create mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-gallium-Fix-build-with-llvm-17.patch create mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson-Disable-cmake-dependency-detector-for-llvm.patch create mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch create mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson.build-check-for-all-linux-host_os-combinations.patch diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-gallium-Fix-build-with-llvm-17.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-gallium-Fix-build-with-llvm-17.patch new file mode 100644 index 00000000..237f940f --- /dev/null +++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-gallium-Fix-build-with-llvm-17.patch @@ -0,0 +1,41 @@ +From 6d07f6aa7f92f40d78a2db645f16f0f3e7d3c2e8 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 23 Jun 2023 01:20:38 -0700 +Subject: [PATCH] gallium: Fix build with llvm 17 + +These headers are not available for C files in llvm 17+ +and they seem to be not needed to compile after all with llvm 17 +so add conditions to exclude them for llvm >= 17 + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23827] +Signed-off-by: Khem Raj + +--- + src/gallium/auxiliary/gallivm/lp_bld_init.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c +index cd2108f..b1a4d03 100644 +--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c ++++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c +@@ -46,15 +46,19 @@ + #if GALLIVM_USE_NEW_PASS == 1 + #include + #elif GALLIVM_HAVE_CORO == 1 ++#if LLVM_VERSION_MAJOR < 17 + #include +-#if LLVM_VERSION_MAJOR >= 7 ++#endif ++#if LLVM_VERSION_MAJOR >= 7 && LLVM_VERSION_MAJOR < 17 + #include + #endif + #if LLVM_VERSION_MAJOR <= 8 && (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM || DETECT_ARCH_S390 || DETECT_ARCH_MIPS64) + #include + #endif ++#if LLVM_VERSION_MAJOR < 17 + #include + #endif ++#endif + + unsigned gallivm_perf = 0; + diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson-Disable-cmake-dependency-detector-for-llvm.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson-Disable-cmake-dependency-detector-for-llvm.patch new file mode 100644 index 00000000..4cded054 --- /dev/null +++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson-Disable-cmake-dependency-detector-for-llvm.patch @@ -0,0 +1,42 @@ +From 00d41cd5aa3f4b494dc276c9b4ccdc096310c91f Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 28 Sep 2023 15:34:22 -0700 +Subject: [PATCH] meson: use llvm-config instead of cmake to fix linking errors with meson 1.2.1 + +meson dependency auto dependency detection uses cmake and then +config-tool to process dependencies, in mesa the logic to detect llvm is +using auto detection which means if it finds cmake then it will try to +use cmake method. Cmake method works ok except a case when llvm-dev +package is installed on the build host then it generates its own +native.meson file and ignores OE supplied meson.native file which has +correct llvm-config tool specified which is pointing to llvm-config from +native sysroot. The generated meson.native file points to one found in +/usr/bin and there onwards detector finds native install of llvm and +configures that into building native mesa package. + +Since cmake detector does not always work, disable it by default and use +config-tool which works in all cases. This is suggested in below issues +too + +A similar issue is open in meson upstream [1] and mesa [2] + +[1] https://github.com/mesonbuild/meson/issues/10483 +[2] https://gitlab.freedesktop.org/mesa/mesa/-/issues/6738 + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25438] + +Signed-off-by: Khem Raj +--- + meson.build | 1 + + 1 file changed, 1 insertion(+) + +--- a/meson.build ++++ b/meson.build +@@ -1659,6 +1659,7 @@ with_llvm = false + if _llvm.allowed() + dep_llvm = dependency( + 'llvm', ++ method : host_machine.system() == 'windows' ? 'auto' : 'config-tool', + version : _llvm_version, + modules : llvm_modules, + optional_modules : llvm_optional_modules, diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch new file mode 100644 index 00000000..9cd9bee2 --- /dev/null +++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch @@ -0,0 +1,25 @@ +From 3ef37c63f03ad6f2af407de350486fdd25e9132a Mon Sep 17 00:00:00 2001 +From: Khem Raj +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 + +--- + 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 + #include diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson.build-check-for-all-linux-host_os-combinations.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson.build-check-for-all-linux-host_os-combinations.patch new file mode 100644 index 00000000..a555c5f8 --- /dev/null +++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson.build-check-for-all-linux-host_os-combinations.patch @@ -0,0 +1,43 @@ +From b251af67df5a6840d2e9cc06edae2c387f8778f1 Mon Sep 17 00:00:00 2001 +From: Alistair Francis +Date: Thu, 14 Nov 2019 13:04:49 -0800 +Subject: [PATCH] meson.build: check for all linux host_os combinations + +Make sure that we are also looking for our host_os combinations like +linux-musl etc. when assuming support for DRM/KMS. + +Also delete a duplicate line. + +Upstream-Status: Pending + +Signed-off-by: Anuj Mittal +Signed-off-by: Fabio Berton +Signed-off-by: Otavio Salvador +Signed-off-by: Alistair Francis + +--- + meson.build | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/meson.build b/meson.build +index 22385d8..15f48a6 100644 +--- a/meson.build ++++ b/meson.build +@@ -121,7 +121,7 @@ with_any_opengl = with_opengl or with_gles1 or with_gles2 + # Only build shared_glapi if at least one OpenGL API is enabled + with_shared_glapi = with_shared_glapi and with_any_opengl + +-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos', 'android'].contains(host_machine.system()) ++system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos', 'android'].contains(host_machine.system()) or host_machine.system().startswith('linux') + + gallium_drivers = get_option('gallium-drivers') + if gallium_drivers.contains('auto') +@@ -909,7 +909,7 @@ if cc.has_function('fmemopen') + endif + + # TODO: this is very incomplete +-if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku', 'android'].contains(host_machine.system()) ++if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku'].contains(host_machine.system()) or host_machine.system().startswith('linux') + pre_args += '-D_GNU_SOURCE' + elif host_machine.system() == 'sunos' + pre_args += '-D__EXTENSIONS__' From patchwork Thu May 2 19:18:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randolph Sapp X-Patchwork-Id: 43184 X-Patchwork-Delegate: reatmon@ti.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B08A5C25B10 for ; Thu, 2 May 2024 19:19:00 +0000 (UTC) Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by mx.groups.io with SMTP id smtpd.web10.3519.1714677536648300698 for ; Thu, 02 May 2024 12:18:56 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=F7PZO7aR; spf=pass (domain: ti.com, ip: 198.47.23.249, mailfrom: rs@ti.com) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 442JIptp047573; Thu, 2 May 2024 14:18:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1714677531; bh=+cXRuzFk2wSA95pVplmbYGgHTEqd0ZlPnP6uAVOf5fw=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=F7PZO7aRCtFn9dgAVjCgNAi8gpOV3wga3w2dne0NbA39aZcgZWT97otSTk1lOHGRY 0kDIldRzw+GVvhGHVmXEUUCOWwLWxhXOOj3ZM8EoolGB+Uc2s0Ed58OJHNd7VSfDTK oUNV/OSEkx98SPlBXEQ9n7+UkNAeRWnK+iQmpIE0= Received: from DLEE102.ent.ti.com (dlee102.ent.ti.com [157.170.170.32]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 442JIp30003641 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 2 May 2024 14:18:51 -0500 Received: from DLEE100.ent.ti.com (157.170.170.30) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 2 May 2024 14:18:51 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 2 May 2024 14:18:51 -0500 Received: from rs-desk.dhcp.ti.com (rs-desk.dhcp.ti.com [128.247.81.144]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 442JIpgV120631; Thu, 2 May 2024 14:18:51 -0500 From: To: , CC: , Subject: [meta-ti][master/scarthgap][PATCHv2 3/3] mesa-pvr_23.2.1: add recipe for 23.2.1 Date: Thu, 2 May 2024 14:18:43 -0500 Message-ID: <20240502191843.2380555-4-rs@ti.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240502191843.2380555-1-rs@ti.com> References: <20240502191843.2380555-1-rs@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 02 May 2024 19:19:00 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-ti/message/17638 From: Randolph Sapp Add a recipe for mesa-pvr to use a newer branch based on mesa 23.2.1. This branch does not currently contain SGX patches so it is also being masked by the ltsprep branding to prevent regressing those devices currently. Please note that may run into sstate errors when switching to or away from the ltsprep tag. Please issue a clean to mesa and ti-img-rogue-umlibs if you get warnings from either package's do_create_runtime_spdx step. Signed-off-by: Randolph Sapp --- .../recipes-graphics/mesa/mesa-pvr_23.2.1.bb | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_23.2.1.bb diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_23.2.1.bb b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_23.2.1.bb new file mode 100644 index 00000000..1e66acd2 --- /dev/null +++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_23.2.1.bb @@ -0,0 +1,58 @@ +# PowerVR Graphics require several patches that have not made their way +# upstream yet. This allows us to build the shims we need without completely +# clobbering mesa. + +DEFAULT_PREFERENCE = "-1" + +require recipes-graphics/mesa/mesa.inc + +SUMMARY += " (with PowerVR support for TI platforms)" + +LIC_FILES_CHKSUM = "file://docs/license.rst;md5=63779ec98d78d823a9dc533a0735ef10" + +BRANCH = "powervr/${PV}" + +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://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \ + file://0001-gallium-Fix-build-with-llvm-17.patch \ + file://0001-meson-Disable-cmake-dependency-detector-for-llvm.patch \ +" + +S = "${WORKDIR}/git" + +PACKAGECONFIG:append = " \ + ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-img-rogue-driver', 'pvr', '', d)} \ + ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-sgx-ddk-km', 'sgx', '', d)} \ +" + +SRCREV = "b12290126ba6a154f0e8b0a8c8b2b0d64f98e427" + +PVR_DISPLAY_CONTROLLER_ALIAS ??= "tidss" +PACKAGECONFIG[pvr] = "-Dgallium-pvr-alias=${PVR_DISPLAY_CONTROLLER_ALIAS}," +PACKAGECONFIG[sgx] = "-Dgallium-sgx-alias=${PVR_DISPLAY_CONTROLLER_ALIAS}," + +PACKAGECONFIG:remove = "video-codecs" +PACKAGECONFIG[video-codecs] = "" +PACKAGECONFIG:remove = "elf-tls" +PACKAGECONFIG[elf-tls] = "" +PACKAGECONFIG:remove = "xvmc" +PACKAGECONFIG[xvmc] = "" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pvr', ',pvr', '', d)}" +GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'sgx', ',sgx', '', d)}" + +VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pvr', ',pvr', '', d)}" + +do_install:append () { + # remove pvr custom pkgconfig + rm -rf ${D}${datadir}/pkgconfig +} + +FILES:${PN}-dev += "${datadir}/mesa/wayland-drm.xml" +FILES:mesa-vulkan-drivers += "${libdir}/libpvr_mesa_wsi.so" + +RRECOMMENDS:mesa-megadriver:append:class-target = " ${@d.getVar('PREFERRED_PROVIDER_virtual/gpudriver')}"