Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport scarthgap] Upgrade NXP Graphics BSP to LF6.6.36_2.1.0 #2004

Merged
merged 4 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions conf/machine/include/imx-base.inc
Original file line number Diff line number Diff line change
Expand Up @@ -597,12 +597,12 @@ PREFERRED_VERSION_xwayland:imx-nxp-bsp ??= "23.1.1.imx"
# Use i.MX libdrm Version
PREFERRED_VERSION_libdrm:imx-nxp-bsp ??= "2.4.116.imx"

PREFERRED_VERSION_spirv-headers:imxvulkan ??= "1.3.261.1.imx"
PREFERRED_VERSION_spirv-tools:imxvulkan ??= "1.3.261.1.imx"
PREFERRED_VERSION_vulkan-headers:imxvulkan ??= "1.3.261.1.imx"
PREFERRED_VERSION_vulkan-loader:imxvulkan ??= "1.3.261.1.imx"
PREFERRED_VERSION_vulkan-tools:imxvulkan ??= "1.3.261.1.imx"
PREFERRED_VERSION_vulkan-validation-layers:imxvulkan ??= "1.3.261.1.imx"
PREFERRED_VERSION_spirv-headers:imxvulkan ??= "1.3.275.0.imx"
PREFERRED_VERSION_spirv-tools:imxvulkan ??= "1.3.275.0.imx"
PREFERRED_VERSION_vulkan-headers:imxvulkan ??= "1.3.275.0.imx"
PREFERRED_VERSION_vulkan-loader:imxvulkan ??= "1.3.275.0.imx"
PREFERRED_VERSION_vulkan-tools:imxvulkan ??= "1.3.275.0.imx"
PREFERRED_VERSION_vulkan-validation-layers:imxvulkan ??= "1.3.275.0.imx"

# Use i.MX optee Version
PREFERRED_VERSION_optee-os:mx8-nxp-bsp ??= "4.2.0.imx"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ HOMEPAGE = "https://www.khronos.org/registry/spir-v"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=c938b85bceb8fb26c1a807f28a52ae2d"

SRCREV = "124a9665e464ef98b8b718d572d5f329311061eb"
SRCREV = "1c6bb2743599e6eb6f37b2969acc0aef812e32e3"
SRC_URI = "git://github.com/KhronosGroup/SPIRV-Headers;protocol=https;branch=main"
PE = "1"
# These recipes need to be updated in lockstep with each other:
# glslang, vulkan-headers, vulkan-loader, vulkan-tools, spirv-headers, spirv-tools
# vulkan-validation-layers, vulkan-utility-libraries.
# The tags versions should always be sdk-x.y.z, as this is what
# upstream considers a release.
UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ SECTION = "graphics"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"

SRCREV = "e553b884c7c9febaa4e52334f683641fb5f196a0"
SRCREV = "f0cc85efdbbe3a46eae90e0f915dc1509836d0fc"
SRC_URI = "git://github.com/KhronosGroup/SPIRV-Tools.git;branch=main;protocol=https"
PE = "1"
# These recipes need to be updated in lockstep with each other:
# glslang, vulkan-headers, vulkan-loader, vulkan-tools, spirv-headers, spirv-tools
# vulkan-validation-layers, vulkan-utility-libraries.
# The tags versions should always be sdk-x.y.z, as this is what
# upstream considers a release.
UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ LICENSE = "Apache-2.0 & MIT"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=1bc355d8c4196f774c8b87ed1a8dd625"
SRC_URI = "git://github.com/KhronosGroup/Vulkan-Headers.git;branch=main;protocol=https"

SRCREV = "85c2334e92e215cce34e8e0ed8b2dce4700f4a50"
SRCREV = "217e93c664ec6704ec2d8c36fa116c1a4a1e2d40"

S = "${WORKDIR}/git"

Expand All @@ -21,7 +21,8 @@ FILES:${PN} += "${datadir}/vulkan"
RDEPENDS:${PN} += "python3-core"

# These recipes need to be updated in lockstep with each other:
# glslang, vulkan-headers, vulkan-loader, vulkan-tools, spirv-headers, spirv-tools
# glslang, vulkan-headers, vulkan-loader, vulkan-tools, spirv-headers, spirv-tools,
# vulkan-validation-layers, vulkan-utility-libraries.
# The tags versions should always be sdk-x.y.z, as this is what
# upstream considers a release.
UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ SECTION = "libs"

LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7dbefed23242760aa3475ee42801c5ac"
SRC_URI = "git://github.com/KhronosGroup/Vulkan-Loader.git;branch=main;protocol=https"
SRCREV = "afdd025ead2b63b2c73d900ab128a2d3b512cdf0"
SRC_URI = "git://github.com/KhronosGroup/Vulkan-Loader.git;branch=vulkan-sdk-1.3.275;protocol=https"
SRCREV = "00893b9a03e526aec2c5bf487521d16dfa435229"

S = "${WORKDIR}/git"

Expand All @@ -36,7 +36,8 @@ PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SU
RRECOMMENDS:${PN} = "mesa-vulkan-drivers"

# These recipes need to be updated in lockstep with each other:
# glslang, vulkan-headers, vulkan-loader, vulkan-tools, spirv-headers, spirv-tools
# glslang, vulkan-headers, vulkan-loader, vulkan-tools, spirv-headers, spirv-tools,
# vulkan-validation-layers, vulkan-utility-libraries.
# The tags versions should always be sdk-x.y.z, as this is what
# upstream considers a release.
UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ SECTION = "libs"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"
SRC_URI = "git://github.com/KhronosGroup/Vulkan-Tools.git;branch=main;protocol=https"
SRCREV = "a7da7027ca9fd0901639f02619c226da9c6036f1"
SRCREV = "c86d42cf9eb620eeac377e3bff46ae342c5cd664"

S = "${WORKDIR}/git"

inherit cmake features_check pkgconfig
ANY_OF_DISTRO_FEATURES = "x11 wayland"
REQUIRED_DISTRO_FEATURES = "vulkan"

DEPENDS += "vulkan-headers vulkan-loader"
DEPENDS += "vulkan-headers vulkan-loader vulkan-volk"

EXTRA_OECMAKE = "\
-DBUILD_TESTS=OFF \
Expand All @@ -31,6 +31,7 @@ PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SU

# These recipes need to be updated in lockstep with each other:
# glslang, vulkan-headers, vulkan-loader, vulkan-tools, spirv-headers, spirv-tools
# vulkan-validation-layers, vulkan-utility-libraries.
# The tags versions should always be sdk-x.y.z, as this is what
# upstream considers a release.
UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ SECTION = "libs"
LICENSE = "Apache-2.0 & MIT"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=cd3c0bc366cd9b6a906e22f0bcb5910f"

SRC_URI = "git://git@github.com/KhronosGroup/Vulkan-ValidationLayers.git;branch=sdk-1.3.261;protocol=https"
SRCREV = "628cd310bef6d54b4e6b25b5ac2ed013473409d6"
SRC_URI = "git://github.com/KhronosGroup/Vulkan-ValidationLayers.git;branch=vulkan-sdk-1.3.275;protocol=https"
SRCREV = "780c65337e111c7385109c7b720d757a778e4fe2"

S = "${WORKDIR}/git"

REQUIRED_DISTRO_FEATURES = "vulkan"

DEPENDS = "vulkan-headers vulkan-loader spirv-headers spirv-tools glslang"
DEPENDS = "vulkan-headers vulkan-loader spirv-headers spirv-tools glslang vulkan-utility-libraries"

# BUILD_TESTS - Not required for OE builds
# USE_ROBIN_HOOD_HASHING - Provides substantial performance improvements on all platforms.
Expand All @@ -42,7 +42,8 @@ FILES_SOLIBSDEV = ""

# These recipes need to be updated in lockstep with each other:
# glslang, vulkan-headers, vulkan-loader, vulkan-tools,
# vulkan-validation-layers, spirv-headers, spirv-tools
# vulkan-validation-layers, spirv-headers, spirv-tools,
# vulkan-utility-libraries.
# The tags versions should always be sdk-x.y.z, as this is what
# upstream considers a release.
UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

DESCRIPTION = "G2D library using i.MX DPU"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://COPYING;md5=10c0fda810c63b052409b15a5445671a"
LIC_FILES_CHKSUM = "file://COPYING;md5=ca53281cc0caa7e320d4945a896fb837"

DEPENDS = "libdrm ${LIBGAL_IMX}"
LIBGAL_IMX = "libgal-imx"
Expand All @@ -15,15 +15,13 @@ PROVIDES += "virtual/libg2d"
SRC_URI = "${FSL_MIRROR}/${IMX_BIN_NAME}.bin;fsl-eula=true;name=${IMX_SRC_URI_NAME}"
IMX_BIN_NAME = "${BPN}-${IMX_SRC_URI_NAME}-${PV}-${IMX_SRCREV_ABBREV}"

IMX_SRCREV_ABBREV = "6a00326"
IMX_SRCREV_ABBREV = "7943590"
IMX_SRC_URI_NAME = "v1"
SRC_URI[v1.md5sum] = "470ad0bdef7dec171395991d47b39e2c"
SRC_URI[v1.sha256sum] = "4d8e4b536bd24eedfbce375a06c19ab74603291b8b5a5be36b03fbf6e016e940"
SRC_URI[v1.sha256sum] = "bf347f53e8f390a0554c0db76707819bb50cf4aaa564a9c86821ae9add26e113"

IMX_SRCREV_ABBREV:mx95-nxp-bsp = "6a00326"
IMX_SRCREV_ABBREV:mx95-nxp-bsp = "7943590"
IMX_SRC_URI_NAME:mx95-nxp-bsp = "v2"
SRC_URI[v2.md5sum] = "cf807c38a110763c19a12d6d595b4b09"
SRC_URI[v2.sha256sum] = "1b86d4fecd5026e871da0de8ed6382c962460468d8151ae2f95b72d00bca17ee"
SRC_URI[v2.sha256sum] = "c0a87908cd04c208659423746a57eaee6a30b4d680ec871f3495ad4a2acb5076"

S = "${WORKDIR}/${IMX_BIN_NAME}"

Expand Down
4 changes: 2 additions & 2 deletions recipes-graphics/imx-g2d/imx-g2d-samples_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=0858ec9c7a80c4a2cf16e4f825a2cc91"

DEPENDS = "cairo"

PV = "2.1+git${SRCPV}"
PV = "2.2+git${SRCPV}"

SRC_URI = "${GPU_G2D_SAMPLES_SRC};branch=${SRCBRANCH}"
GPU_G2D_SAMPLES_SRC ?= "git://github.com/nxp-imx/g2d-samples.git;protocol=https"
SRCBRANCH = "imx_2.1"
SRCBRANCH = "imx_2.2"
SRCREV = "431f311a41ca052902ea0d6445e74defe0a4df2d"

S = "${WORKDIR}/git"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@

DESCRIPTION = "G2D library using i.MX GPU"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://COPYING;md5=10c0fda810c63b052409b15a5445671a"
LIC_FILES_CHKSUM = "file://COPYING;md5=ca53281cc0caa7e320d4945a896fb837"
DEPENDS = "libgal-imx"
PROVIDES = "virtual/libg2d"

SRC_URI = "${FSL_MIRROR}/${IMX_BIN_NAME}.bin;name=${TARGET_ARCH};fsl-eula=true"
IMX_BIN_NAME = "${BP}-${TARGET_ARCH}-${IMX_SRCREV_ABBREV}"
IMX_SRCREV_ABBREV = "bc7b6a2"
SRC_URI[aarch64.md5sum] = "4b12d0434d612b57ff4d7df690c3154f"
SRC_URI[aarch64.sha256sum] = "b2e4c580bf887042f479fde7c8b07c6215794d8123263d10ff0c167af7ba5918"
SRC_URI[arm.md5sum] = "4bead15838f47793f59cb374c10c2dd2"
SRC_URI[arm.sha256sum] = "413610ce4730eb9adbde30c8ad4a72df3edd69d84e1154a0c29efa7f33a30663"
IMX_SRCREV_ABBREV = "95408a4"
SRC_URI[aarch64.sha256sum] = "48327fe6315aa739d5665004289412ff2e3a4e0084d1664f837276f09d35b032"
SRC_URI[arm.sha256sum] = "f28b2cd7b29302cd654fc845a0695d6fe935e383b56556e36933488dfa014830"

S = "${WORKDIR}/${IMX_BIN_NAME}"

Expand Down
10 changes: 5 additions & 5 deletions recipes-graphics/imx-g2d/imx-pxp-g2d_git.bb
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Copyright (C) 2016 Freescale Semiconductor
# Copyright 2017-2023 NXP
# Copyright 2017-2024 NXP
# Released under the MIT license (see COPYING.MIT for the terms)

DESCRIPTION = "G2D library using i.MX PXP"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=10c0fda810c63b052409b15a5445671a"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=ca53281cc0caa7e320d4945a896fb837"

PROVIDES += "virtual/libg2d"

PV = "2.1.0+git${SRCPV}"
PV = "2.2+git${SRCPV}"

SRC_URI = "${IMX_PXP_G2D_SRC};branch=${SRCBRANCH}"
IMX_PXP_G2D_SRC ?= "git://github.com/nxp-imx/imx-g2d-pxp.git;protocol=https"
SRCBRANCH = "imx_2.1"
SRCREV = "edd234c4e1c58cd2453963d19155d4d5d3800d07"
SRCBRANCH = "imx_2.2"
SRCREV = "5e633f895a84cec809ca98d77c879af3591b3b20"

S = "${WORKDIR}/git"

Expand Down
10 changes: 10 additions & 0 deletions recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ DEPENDS:append:mx8-nxp-bsp = " patchelf-native"

DEPENDS:append:libc-musl = " gcompat"

DEPENDS:remove:imx-nxp-bsp = "mesa"
PACKAGES:remove:imx-nxp-bsp = "libgl-imx libgl-imx-dev"
PROVIDES:remove:imx-nxp-bsp = "virtual/libgl"

PROVIDES += " \
imx-gpu-viv \
libgal-imx \
Expand Down Expand Up @@ -63,6 +67,12 @@ PROVIDES_OPENVX:mx8mm-nxp-bsp = ""

RPROVIDES:${PN}:imxgpu3d += "imx-gpu-viv"

RPROVIDES_OPENCL = "opencl-icd-loader-dev"
RPROVIDES_OPENCL:mx7-nxp-bsp = ""
RPROVIDES_OPENCL:mx8mm-nxp-bsp = ""

RPROVIDES:${PN}:append:imx-nxp-bsp = " ${RPROVIDES_OPENCL}"

PE = "1"

inherit fsl-eula-unpack
Expand Down
10 changes: 0 additions & 10 deletions recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.11.p2.6-aarch32.bb

This file was deleted.

10 changes: 0 additions & 10 deletions recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.11.p2.6-aarch64.bb

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require imx-gpu-viv-6.inc

LIC_FILES_CHKSUM = "file://COPYING;md5=ca53281cc0caa7e320d4945a896fb837"

IMX_SRCREV_ABBREV = "95408a4"

SRC_URI[sha256sum] = "c479c98e83866a7e95e5a6ae29b21ae41f9599326298d9a1debf009cac6e9406"

COMPATIBLE_MACHINE = "(mx6q-nxp-bsp|mx6dl-nxp-bsp|mx6sx-nxp-bsp|mx6sl-nxp-bsp|mx7ulp-nxp-bsp)"
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require imx-gpu-viv-6.inc

LIC_FILES_CHKSUM = "file://COPYING;md5=ca53281cc0caa7e320d4945a896fb837"

IMX_SRCREV_ABBREV = "95408a4"

SRC_URI[sha256sum] = "aadfcf558d07da253a57acfd5aa4ca41d4c8195f04324d0c2f6746f6f18c5a46"

COMPATIBLE_MACHINE = "(mx8-nxp-bsp)"
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
From 3448c245b15928aa5a5a3695d9271fb201eb2e3b Mon Sep 17 00:00:00 2001
From: Yuan Tian <[email protected]>
Date: Sat, 27 Apr 2024 06:06:54 +0800
Subject: [PATCH] LF-11869 change mali wsi layer activating order

Upstream-Status: Inappropriate [i.MX specific]

Signed-off-by: Yuan Tian <[email protected]>
---
loader/loader.c | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/loader/loader.c b/loader/loader.c
index e646b28b4..55912c178 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -2906,6 +2906,7 @@ VkResult add_data_files(const struct loader_instance *inst, char *search_path, s
#if !defined(_WIN32)
char temp_path[2048];
#endif
+ bool has_wsi_layer = false;

// Now, parse the paths
next_file = search_path;
@@ -2965,6 +2966,10 @@ VkResult add_data_files(const struct loader_instance *inst, char *search_path, s
name = full_path;

VkResult local_res;
+ if(!strcmp(name,"/etc/vulkan/implicit_layer.d/VkLayer_window_system_integration.json")) {
+ has_wsi_layer = true;
+ continue;
+ }
local_res = add_if_manifest_file(inst, name, out_files);

// Incomplete means this was not a valid data file.
@@ -2975,6 +2980,13 @@ VkResult add_data_files(const struct loader_instance *inst, char *search_path, s
break;
}
}
+
+ if(has_wsi_layer) {
+ name = "/etc/vulkan/implicit_layer.d/VkLayer_window_system_integration.json";
+ vk_result = add_if_manifest_file(inst, name, out_files);
+ has_wsi_layer = false;
+ }
+
loader_closedir(inst, dir_stream);
if (vk_result != VK_SUCCESS) {
goto out;
--
2.34.1

Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
FILESEXTRAPATHS:prepend:imx-nxp-bsp := "${THISDIR}/${PN}:"

SRC_URI:append:imx-nxp-bsp = " \
file://0001-LF-11869-change-mali-wsi-layer-activating-order.patch \
"

# libvulkan.so is loaded dynamically, so put it in the main package
SOLIBS = ".so*"
FILES_SOLIBSDEV = ""
Expand Down
5 changes: 4 additions & 1 deletion recipes-graphics/wayland/weston_12.0.4.imx.bb
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ SRC_URI:prepend = "${WESTON_SRC};branch=${SRCBRANCH} "
WESTON_SRC ?= "git://github.com/nxp-imx/weston-imx.git;protocol=https"
SRC_URI += "file://0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch"
SRCBRANCH = "weston-imx-12.0.4"
SRCREV = "461c49d20677cfd36d01a95dafbd9eedf2a4b09c"
SRCREV = "c3c1f9ff7824123dd4808ace3c9476345cb84177"
S = "${WORKDIR}/git"

PACKAGECONFIG_IMX_REMOVALS ?= "wayland x11"
Expand All @@ -186,6 +186,9 @@ PACKAGECONFIG_G2D:mx93-nxp-bsp ??= "imxg2d"
# Weston with i.MX G2D renderer
PACKAGECONFIG[imxg2d] = "-Drenderer-g2d=true,-Drenderer-g2d=false,virtual/libg2d"

# Weston on RDP, fix for base recipe
PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp,freerdp"

# links with imx-gpu libs which are pre-built for glibc
# gcompat will address it during runtime
LDFLAGS:append:imxgpu:libc-musl = " -Wl,--allow-shlib-undefined"
Expand Down
Loading