-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tracked-On: OAM-108705 Change-Id: I0b8075e44a9d6c04fd01a46473d6248ee7561de8 Signed-off-by: Huang Rui <[email protected]>
- Loading branch information
1 parent
4704390
commit 7e14f26
Showing
24 changed files
with
221 additions
and
9,491 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From 15ead9a3d32bf45c1eb26338313734ab47cfac23 Mon Sep 17 00:00:00 2001 | ||
From 96b84715da9846ea8e983b7f554757e7b5daf830 Mon Sep 17 00:00:00 2001 | ||
From: "Chen, Yu" <[email protected]> | ||
Date: Tue, 8 Feb 2022 20:03:42 +0800 | ||
Subject: [ENABLE] change to right libdrm PATH | ||
|
@@ -11,7 +11,7 @@ Change-Id: I5edeaa2520715df34e0c714b2487161e65579ce8 | |
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/android/Android.mk b/android/Android.mk | ||
index 430b01a26b6..c9e90fdc6ae 100644 | ||
index 7f1f679391c..14246ef244b 100644 | ||
--- a/android/Android.mk | ||
+++ b/android/Android.mk | ||
@@ -26,7 +26,7 @@ ifneq ($(filter true, $(BOARD_MESA3D_USES_MESON_BUILD)),) | ||
|
@@ -24,5 +24,5 @@ index 430b01a26b6..c9e90fdc6ae 100644 | |
MESA_VK_LIB_SUFFIX_amd := radeon | ||
MESA_VK_LIB_SUFFIX_intel := intel | ||
-- | ||
2.33.1 | ||
2.25.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,23 @@ | ||
From 69c86e428fa1a1bc3aedd9a385a6127122b84157 Mon Sep 17 00:00:00 2001 | ||
From: "Mao, Marc" <[email protected]> | ||
Date: Wed, 1 Sep 2021 17:09:58 +0800 | ||
From 07e331c80937dbb7745243567fa5e9b5603feea5 Mon Sep 17 00:00:00 2001 | ||
From: Marc Mao <[email protected]> | ||
Date: Wed, 29 Mar 2023 10:30:59 +0800 | ||
Subject: [ENABLE] Add gralloc1 support | ||
|
||
It depends on an extended gralloc1 function pfnGetBufferInfo to retrieve | ||
buffer meta information from gralloc. | ||
|
||
Signed-off-by: Mao, Marc <[email protected]> | ||
Change-Id: Ia38e9a8e32f27537be73f01c17a368a095c444e6 | ||
Change-Id: I8dcde3265349a1373a46719f3c7ec6fec931668b | ||
Signed-off-by: Marc Mao <[email protected]> | ||
--- | ||
src/egl/drivers/dri2/egl_dri2.h | 9 +++ | ||
src/egl/drivers/dri2/platform_android.c | 77 +++++++++++++++++++++++-- | ||
2 files changed, 82 insertions(+), 4 deletions(-) | ||
|
||
diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h | ||
index 2e283cba0e7..045fb1e58c2 100644 | ||
index a803a0f229d..1c25875e244 100644 | ||
--- a/src/egl/drivers/dri2/egl_dri2.h | ||
+++ b/src/egl/drivers/dri2/egl_dri2.h | ||
@@ -76,6 +76,11 @@ struct zwp_linux_dmabuf_feedback_v1; | ||
@@ -77,6 +77,11 @@ struct zwp_linux_dmabuf_feedback_v1; | ||
#include <system/window.h> | ||
#endif | ||
|
||
|
@@ -30,7 +29,7 @@ index 2e283cba0e7..045fb1e58c2 100644 | |
#endif /* HAVE_ANDROID_PLATFORM */ | ||
|
||
#include "eglconfig.h" | ||
@@ -297,6 +302,10 @@ struct dri2_egl_display | ||
@@ -311,6 +316,10 @@ struct dri2_egl_display | ||
|
||
#ifdef HAVE_ANDROID_PLATFORM | ||
const gralloc_module_t *gralloc; | ||
|
@@ -42,7 +41,7 @@ index 2e283cba0e7..045fb1e58c2 100644 | |
uint32_t front_rendering_usage; | ||
#endif | ||
diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c | ||
index af7b3291f8b..831b65b62d0 100644 | ||
index f5e34ee3824..64ade294689 100644 | ||
--- a/src/egl/drivers/dri2/platform_android.c | ||
+++ b/src/egl/drivers/dri2/platform_android.c | ||
@@ -204,7 +204,7 @@ get_yuv_buffer_info(struct dri2_egl_display *dri2_dpy, | ||
|
@@ -129,10 +128,10 @@ index af7b3291f8b..831b65b62d0 100644 | |
if (dri2_dpy->gralloc->perform) | ||
err = dri2_dpy->gralloc->perform(dri2_dpy->gralloc, | ||
GRALLOC_MODULE_PERFORM_GET_DRM_FD, | ||
@@ -1676,13 +1723,34 @@ dri2_initialize_android(_EGLDisplay *disp) | ||
return _eglError(EGL_BAD_ALLOC, "eglInitialize"); | ||
@@ -1677,13 +1724,34 @@ dri2_initialize_android(_EGLDisplay *disp) | ||
|
||
dri2_dpy->fd = -1; | ||
dri2_dpy->fd_render_gpu = -1; | ||
dri2_dpy->fd_display_gpu = -1; | ||
- ret = hw_get_module(GRALLOC_HARDWARE_MODULE_ID, | ||
- (const hw_module_t **)&dri2_dpy->gralloc); | ||
+ const hw_module_t *gralloc_module; | ||
|
@@ -166,7 +165,7 @@ index af7b3291f8b..831b65b62d0 100644 | |
disp->DriverData = (void *) dri2_dpy; | ||
device_opened = droid_open_device(disp, disp->Options.ForceSoftware); | ||
|
||
@@ -1762,7 +1830,8 @@ dri2_initialize_android(_EGLDisplay *disp) | ||
@@ -1765,7 +1833,8 @@ dri2_initialize_android(_EGLDisplay *disp) | ||
* So at least we can force BO_USE_LINEAR as the fallback. | ||
*/ | ||
uint32_t front_rendering_usage = 0; | ||
|
@@ -177,5 +176,5 @@ index af7b3291f8b..831b65b62d0 100644 | |
dri2_dpy->gralloc->perform( | ||
dri2_dpy->gralloc, CROS_GRALLOC_DRM_GET_USAGE, | ||
-- | ||
2.33.1 | ||
2.25.1 | ||
|
32 changes: 14 additions & 18 deletions
32
...iff/cic_cloud/vendor/intel/external/intel-gpu/mesa/0003-ENABLE-Fix-32bit-mmap-issue.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,32 @@ | ||
From 6a15a4d3a6b58789a5efb1fa1c3c3765ab2238e1 Mon Sep 17 00:00:00 2001 | ||
From: Marc Mao <xmao4@intel.com> | ||
Date: Sun, 28 Mar 2021 21:27:31 +0800 | ||
From 9da36c2662c2703dbd23d364b6e2e8947e01acda Mon Sep 17 00:00:00 2001 | ||
From: Huang Rui <rui1.huang@intel.com> | ||
Date: Mon, 3 Apr 2023 22:04:36 +0800 | ||
Subject: [ENABLE] Fix 32bit mmap issue | ||
|
||
Signed-off-by: Marc Mao <[email protected]> | ||
Change-Id: I4e6b30472430a30b73dd008b7eae39368eb9e52d | ||
Signed-off-by: Marc Mao <[email protected]> | ||
--- | ||
src/gallium/drivers/iris/iris_bufmgr.c | 5 +++++ | ||
1 file changed, 5 insertions(+) | ||
mode change 100644 => 100755 src/gallium/drivers/iris/iris_bufmgr.c | ||
src/gallium/drivers/iris/i915/iris_kmd_backend.c | 6 ++++++ | ||
1 file changed, 6 insertions(+) | ||
|
||
diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c | ||
old mode 100644 | ||
new mode 100755 | ||
index 219a8c2ea4c..28593b3bfec | ||
--- a/src/gallium/drivers/iris/iris_bufmgr.c | ||
+++ b/src/gallium/drivers/iris/iris_bufmgr.c | ||
@@ -1695,8 +1695,13 @@ iris_bo_gem_mmap_offset(struct util_debug_callback *dbg, struct iris_bo *bo) | ||
diff --git a/src/gallium/drivers/iris/i915/iris_kmd_backend.c b/src/gallium/drivers/iris/i915/iris_kmd_backend.c | ||
index 2d71611322f..bd6b0c83cdb 100644 | ||
--- a/src/gallium/drivers/iris/i915/iris_kmd_backend.c | ||
+++ b/src/gallium/drivers/iris/i915/iris_kmd_backend.c | ||
@@ -204,8 +204,14 @@ i915_gem_mmap_offset(struct iris_bufmgr *bufmgr, struct iris_bo *bo) | ||
} | ||
|
||
/* And map it */ | ||
+#ifdef __x86_64__ | ||
void *map = mmap(0, bo->size, PROT_READ | PROT_WRITE, MAP_SHARED, | ||
bufmgr->fd, mmap_arg.offset); | ||
iris_bufmgr_get_fd(bufmgr), mmap_arg.offset); | ||
+#else | ||
+ void *map = mmap64(0, bo->size, PROT_READ | PROT_WRITE, MAP_SHARED, | ||
+ bufmgr->fd, mmap_arg.offset); | ||
+ iris_bufmgr_get_fd(bufmgr), mmap_arg.offset); | ||
+#endif | ||
+ | ||
if (map == MAP_FAILED) { | ||
DBG("%s:%d: Error mapping buffer %d (%s): %s .\n", | ||
__FILE__, __LINE__, bo->gem_handle, bo->name, strerror(errno)); | ||
-- | ||
2.33.1 | ||
2.25.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,22 @@ | ||
From 84ae112561446581ef889a20fa96eacfb51eda28 Mon Sep 17 00:00:00 2001 | ||
From: yuchen5 <yu.y.chen@intel.com> | ||
Date: Fri, 19 Aug 2022 14:34:18 +0800 | ||
Subject: [ENABLE] Subject: [PATCH] Fix vulkan loading issue in R | ||
From 13ee11011726d72a2577af7329c2377b495a477a Mon Sep 17 00:00:00 2001 | ||
From: Huang Rui <rui1.huang@intel.com> | ||
Date: Mon, 3 Apr 2023 22:20:45 +0800 | ||
Subject: [ENABLE] Fix vulkan loading issue in R | ||
|
||
Framework will not load vulkan from /vendor/lib[64]/hw, so move it to | ||
/vendor/lib[64]. Also vulkan.intel.so expects sha1 build-id, but meson | ||
system fallback it md5. So just force the build-id to sha1. | ||
|
||
Signed-off-by: Marc Mao <[email protected]> | ||
Change-Id: I04075b13361ae8bdf99491aedfdfdf44a7b41865 | ||
Signed-off-by: Marc Mao <[email protected]>- | ||
--- | ||
android/Android.mk | 2 +- | ||
src/intel/vulkan/meson.build | 2 +- | ||
2 files changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/android/Android.mk b/android/Android.mk | ||
index 5df42631195..e01a70bc4cf 100644 | ||
index 14246ef244b..1d7ad0bf131 100644 | ||
--- a/android/Android.mk | ||
+++ b/android/Android.mk | ||
@@ -172,7 +172,7 @@ $(eval $(call mesa3d-lib,libGLESv2_mesa,.so.2,egl,MESA3D_LIBGLESV2_BIN)) | ||
@@ -173,7 +173,7 @@ $(eval $(call mesa3d-lib,libGLESv2_mesa,.so.2,egl,MESA3D_LIBGLESV2_BIN)) | ||
|
||
# Modules 'vulkan.{driver_name}', produces '/vendor/lib{64}/hw/vulkan.{driver_name}.so' HAL | ||
$(foreach driver,$(BOARD_MESA3D_VULKAN_DRIVERS), \ | ||
|
@@ -28,18 +26,18 @@ index 5df42631195..e01a70bc4cf 100644 | |
ifneq ($(filter true, $(BOARD_MESA3D_BUILD_LIBGBM)),) | ||
# Modules 'libgbm', produces '/vendor/lib{64}/libgbm.so' | ||
diff --git a/src/intel/vulkan/meson.build b/src/intel/vulkan/meson.build | ||
index 95993eedc1b..c61ebc971f1 100644 | ||
index e1339797b2e..a8741ada2b1 100644 | ||
--- a/src/intel/vulkan/meson.build | ||
+++ b/src/intel/vulkan/meson.build | ||
@@ -239,7 +239,7 @@ libvulkan_intel = shared_library( | ||
@@ -242,7 +242,7 @@ libvulkan_intel = shared_library( | ||
], | ||
c_args : anv_flags, | ||
gnu_symbol_visibility : 'hidden', | ||
- link_args : [ld_args_build_id, ld_args_bsymbolic, ld_args_gc_sections], | ||
+ link_args : ['-Wl,--build-id=sha1', ld_args_bsymbolic, ld_args_gc_sections], | ||
- link_args : [vulkan_icd_link_args, ld_args_build_id, ld_args_bsymbolic, ld_args_gc_sections], | ||
+ link_args : [vulkan_icd_link_args, '-Wl,--build-id=sha1', ld_args_bsymbolic, ld_args_gc_sections], | ||
link_depends : vulkan_icd_link_depends, | ||
install : true, | ||
) | ||
|
||
-- | ||
2.33.1 | ||
2.25.1 | ||
|
65 changes: 33 additions & 32 deletions
65
.../intel/external/intel-gpu/mesa/0005-ENABLE-vulkan-fix-buf-map-failure-in-32bits-app.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,51 @@ | ||
From 00d55cfb28f51f052c364e9da8e2f3eb5162b207 Mon Sep 17 00:00:00 2001 | ||
From: "Chen, Yu" <yu.y.chen@intel.com> | ||
Date: Sat, 22 Oct 2022 21:11:35 +0800 | ||
From b5e0c6dd29091ad1a263d2faa5bd7d1ef5ffb7c7 Mon Sep 17 00:00:00 2001 | ||
From: Huang Rui <rui1.huang@intel.com> | ||
Date: Mon, 3 Apr 2023 22:49:39 +0800 | ||
Subject: [ENABLE] vulkan:fix buf map failure in 32bits app | ||
|
||
and when has_tiling_uapi is false | ||
1) NPG: return I915_TILING_NONE which means ISL_TILING_LINEAR | ||
2) On dg2-20221012, it returns -1, will cause vulkan app always crash | ||
3) has_tiling_uapi is always false, because DRM_IOCTL_I915_GEM_SET_TILING | ||
is not supported in has_get_tiling() function | ||
|
||
commit 1de5d2ac010502913777086849e4b4dabbf89d57 | ||
Signed-off-by: Chen, Yu <[email protected]> | ||
Change-Id: I94fe62080909841aff2ec2d57f942453989e11e1 | ||
Signed-off-by: Marc Mao <[email protected]> | ||
--- | ||
src/intel/vulkan/anv_gem.c | 10 +++++++--- | ||
1 file changed, 7 insertions(+), 3 deletions(-) | ||
src/intel/vulkan/anv_gem.c | 2 +- | ||
src/intel/vulkan/i915/anv_kmd_backend.c | 6 +++++- | ||
2 files changed, 6 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/src/intel/vulkan/anv_gem.c b/src/intel/vulkan/anv_gem.c | ||
index 2ae04f5f96f..5fe9c2c14b4 100644 | ||
index 970c9e5dbcb..998343e96df 100644 | ||
--- a/src/intel/vulkan/anv_gem.c | ||
+++ b/src/intel/vulkan/anv_gem.c | ||
@@ -160,8 +160,12 @@ anv_gem_mmap_offset(struct anv_device *device, uint32_t gem_handle, | ||
return MAP_FAILED; | ||
|
||
/* And map it */ | ||
- void *map = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, | ||
- device->fd, gem_mmap.offset); | ||
+ #ifdef __x86_64__ | ||
+ void *map = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, device->fd, gem_mmap.offset); | ||
+ #else | ||
+ void *map = mmap64(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, device->fd, gem_mmap.offset); | ||
+ #endif | ||
+ | ||
return map; | ||
} | ||
|
||
@@ -278,7 +282,7 @@ int | ||
anv_gem_get_tiling(struct anv_device *device, uint32_t gem_handle) | ||
{ | ||
if (!device->info->has_tiling_uapi) | ||
@@ -142,7 +142,7 @@ anv_gem_get_tiling(struct anv_device *device, uint32_t gem_handle) | ||
*/ | ||
if (intel_ioctl(device->fd, DRM_IOCTL_I915_GEM_GET_TILING, &get_tiling)) { | ||
assert(!"Failed to get BO tiling"); | ||
- return -1; | ||
+ return I915_TILING_NONE; | ||
} | ||
|
||
return get_tiling.tiling_mode; | ||
diff --git a/src/intel/vulkan/i915/anv_kmd_backend.c b/src/intel/vulkan/i915/anv_kmd_backend.c | ||
index fa7749e7a4e..d6694c9db28 100644 | ||
--- a/src/intel/vulkan/i915/anv_kmd_backend.c | ||
+++ b/src/intel/vulkan/i915/anv_kmd_backend.c | ||
@@ -141,9 +141,13 @@ i915_gem_mmap_offset(struct anv_device *device, struct anv_bo *bo, | ||
}; | ||
if (intel_ioctl(device->fd, DRM_IOCTL_I915_GEM_MMAP_OFFSET, &gem_mmap)) | ||
return MAP_FAILED; | ||
- | ||
+#ifdef __x86_64__ | ||
return mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, | ||
device->fd, gem_mmap.offset); | ||
+#else | ||
+ return mmap64(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, | ||
+ device->fd, gem_mmap.offset); | ||
+#endif | ||
} | ||
|
||
struct drm_i915_gem_get_tiling get_tiling = { | ||
.handle = gem_handle, | ||
static void * | ||
-- | ||
2.33.1 | ||
2.25.1 | ||
|
97 changes: 0 additions & 97 deletions
97
...dor/intel/external/intel-gpu/mesa/0006-ENABLE-Fix-Android-Swapchain-alignment-issue.patch
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.