vulkan-loader: Update i.MX 9 to latest Vulkan

Vivante is limited to older Vulkan, but Mali is not. Adapt the bbappend
so i.MX 9 can use the latest Vulkan while i.MX 8 continues to be
limited to 1.3.275.0.imx.

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
This commit is contained in:
Tom Hochstein 2025-08-20 08:58:06 -05:00
parent a3c087a3cb
commit 43b21c7e87
3 changed files with 63 additions and 12 deletions

View File

@ -1,4 +1,4 @@
From 3448c245b15928aa5a5a3695d9271fb201eb2e3b Mon Sep 17 00:00:00 2001
From 91aff12a127428ff558d57d93b91b0b909321c35 Mon Sep 17 00:00:00 2001
From: Yuan Tian <yuan.tian@nxp.com>
Date: Sat, 27 Apr 2024 06:06:54 +0800
Subject: [PATCH] LF-11869 change mali wsi layer activating order
@ -11,18 +11,18 @@ Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
1 file changed, 12 insertions(+)
diff --git a/loader/loader.c b/loader/loader.c
index e646b28b4..55912c178 100644
index 9064cd633..5b00870a4 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
@@ -3034,6 +3034,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
char *next_file = search_path;
@@ -3100,6 +3101,10 @@ VkResult add_data_files(const struct loader_instance *inst, char *search_path, s
name = full_path;
VkResult local_res;
@ -33,7 +33,7 @@ index e646b28b4..55912c178 100644
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
@@ -3110,6 +3115,13 @@ VkResult add_data_files(const struct loader_instance *inst, char *search_path, s
break;
}
}
@ -47,6 +47,3 @@ index e646b28b4..55912c178 100644
loader_closedir(inst, dir_stream);
if (vk_result != VK_SUCCESS) {
goto out;
--
2.34.1

View File

@ -0,0 +1,52 @@
From 3448c245b15928aa5a5a3695d9271fb201eb2e3b Mon Sep 17 00:00:00 2001
From: Yuan Tian <yuan.tian@nxp.com>
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 <yuan.tian@nxp.com>
---
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

View File

@ -4,10 +4,12 @@ SRC_URI:append:imx-nxp-bsp = " \
file://0001-LF-11869-change-mali-wsi-layer-activating-order.patch \
"
PACKAGE_ARCH:imx-nxp-bsp = "${MACHINE_SOCARCH}"
# libvulkan.so is loaded dynamically, so put it in the main package
SOLIBS = ".so*"
FILES_SOLIBSDEV = ""
INSANE_SKIP:${PN} += "dev-so"
SOLIBS:imx-nxp-bsp = ".so*"
FILES_SOLIBSDEV:imx-nxp-bsp = ""
INSANE_SKIP:${PN}:imx-nxp-bsp += "dev-so"
# Override default mesa drivers with i.MX GPU drivers
RRECOMMENDS:${PN}:imxviv = "libvulkan-imx"