From f77e45d588945d62b4e356d617de9536e6a6ed4d Mon Sep 17 00:00:00 2001 From: Lim Siew Hoon Date: Tue, 7 May 2024 13:13:07 +0800 Subject: intel-media-driver: upgrade 23.4.3 -> 24.1.5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drops list of patches already merged: - 0004-Add-device-ID-for-ARL.patch - 0005-Add-XR24-support-to-DMABuf.patch - 0006-add-INTEL-MEDIA-ALLOC-refineE-to-specify-the-memory-.patch - 0007-Skip-report-keys.patch - 0008-Limit-INTEL-MEDIA-ALLOC-MODE-to-MTL-and-ARL-only.patch - 0009-Skip-cache-bucket-realloc-for-default-mode-0.patch - 0010-Fix-failed-4k-video-wall-test-case-and-color-corrupt.patch - 0011-Disable-422H-format-output.patch - 0012-Decode-Fix-AVC-decode-SFC-4K-hang-issue.patch Backport a patch to fix build errors: | error: comparing the result of pointer addition ‘(avcDirectmodeParams._MHW_VDBOX_AVC_DIRECTMODE_PARAMS::presAvcDmvBuffers + ((((sizetype)n) + 1) * 328))’ and NULL [-Werror=address] | 592 | if (&avcDirectmodeParams.presAvcDmvBuffers[n+1] != nullptr) | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ Signed-off-by: Lim Siew Hoon Signed-off-by: Anuj Mittal --- .../libva/files/0004-Add-device-ID-for-ARL.patch | 45 ---- .../files/0005-Add-XR24-support-to-DMABuf.patch | 34 --- ...EDIA-ALLOC-refineE-to-specify-the-memory-.patch | 214 ----------------- .../libva/files/0007-Skip-report-keys.patch | 78 ------- ...NTEL-MEDIA-ALLOC-MODE-to-MTL-and-ARL-only.patch | 255 --------------------- ...p-cache-bucket-realloc-for-default-mode-0.patch | 33 --- ...4k-video-wall-test-case-and-color-corrupt.patch | 195 ---------------- .../files/0011-Disable-422H-format-output.patch | 33 --- ...2-Decode-Fix-AVC-decode-SFC-4K-hang-issue.patch | 32 --- .../8aa866dc650e6b0e0b7425bafc7b1039232c377a.patch | 154 +++++++++++++ .../libva/intel-media-driver_23.4.3.bb | 61 ----- .../libva/intel-media-driver_24.1.5.bb | 53 +++++ 12 files changed, 207 insertions(+), 980 deletions(-) delete mode 100644 recipes-multimedia/libva/files/0004-Add-device-ID-for-ARL.patch delete mode 100644 recipes-multimedia/libva/files/0005-Add-XR24-support-to-DMABuf.patch delete mode 100644 recipes-multimedia/libva/files/0006-add-INTEL-MEDIA-ALLOC-refineE-to-specify-the-memory-.patch delete mode 100644 recipes-multimedia/libva/files/0007-Skip-report-keys.patch delete mode 100644 recipes-multimedia/libva/files/0008-Limit-INTEL-MEDIA-ALLOC-MODE-to-MTL-and-ARL-only.patch delete mode 100644 recipes-multimedia/libva/files/0009-Skip-cache-bucket-realloc-for-default-mode-0.patch delete mode 100644 recipes-multimedia/libva/files/0010-Fix-failed-4k-video-wall-test-case-and-color-corrupt.patch delete mode 100644 recipes-multimedia/libva/files/0011-Disable-422H-format-output.patch delete mode 100644 recipes-multimedia/libva/files/0012-Decode-Fix-AVC-decode-SFC-4K-hang-issue.patch create mode 100644 recipes-multimedia/libva/files/8aa866dc650e6b0e0b7425bafc7b1039232c377a.patch delete mode 100644 recipes-multimedia/libva/intel-media-driver_23.4.3.bb create mode 100644 recipes-multimedia/libva/intel-media-driver_24.1.5.bb diff --git a/recipes-multimedia/libva/files/0004-Add-device-ID-for-ARL.patch b/recipes-multimedia/libva/files/0004-Add-device-ID-for-ARL.patch deleted file mode 100644 index 59fff127..00000000 --- a/recipes-multimedia/libva/files/0004-Add-device-ID-for-ARL.patch +++ /dev/null @@ -1,45 +0,0 @@ -From bb860c0bfe53060925b1dce50da4e6e94cfc8cae Mon Sep 17 00:00:00 2001 -From: huangli2018 -Date: Wed, 20 Dec 2023 15:47:43 +0800 -Subject: [PATCH 04/13] Add device ID for ARL - -Add device ID for ARL - -Upstream-Status: Backport [https://github.com/intel/media-driver/commit/95cbfce81cafa3c24d9d4601d41a855093bc51fb] -Signed-off-by: Lim Siew Hoon ---- - .../linux/Xe_M_plus/ddi/media_sysinfo_mtl.cpp | 13 +++++++++++-- - 1 file changed, 11 insertions(+), 2 deletions(-) - -diff --git a/media_softlet/linux/Xe_M_plus/ddi/media_sysinfo_mtl.cpp b/media_softlet/linux/Xe_M_plus/ddi/media_sysinfo_mtl.cpp -index 426bd795f..7b73dfaff 100644 ---- a/media_softlet/linux/Xe_M_plus/ddi/media_sysinfo_mtl.cpp -+++ b/media_softlet/linux/Xe_M_plus/ddi/media_sysinfo_mtl.cpp -@@ -1,6 +1,6 @@ - /*===================== begin_copyright_notice ================================== - --Copyright (c) 2022, Intel Corporation -+Copyright (c) 2023, Intel Corporation - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), -@@ -218,4 +218,13 @@ static struct GfxDeviceInfo arlInfo = { - }; - - static bool arlsDevice7d67 = DeviceInfoFactory:: -- RegisterDevice(0x7D67, &arlInfo); -\ No newline at end of file -+ RegisterDevice(0x7D67, &arlInfo); -+ -+static bool arlhDevice7d51 = DeviceInfoFactory:: -+ RegisterDevice(0x7D51, &arlInfo); -+ -+static bool arlhDevice7dd1 = DeviceInfoFactory:: -+ RegisterDevice(0x7DD1, &arlInfo); -+ -+static bool arlhDevice7d41 = DeviceInfoFactory:: -+ RegisterDevice(0x7D41, &arlInfo); -\ No newline at end of file --- -2.40.1 - diff --git a/recipes-multimedia/libva/files/0005-Add-XR24-support-to-DMABuf.patch b/recipes-multimedia/libva/files/0005-Add-XR24-support-to-DMABuf.patch deleted file mode 100644 index a9cd2317..00000000 --- a/recipes-multimedia/libva/files/0005-Add-XR24-support-to-DMABuf.patch +++ /dev/null @@ -1,34 +0,0 @@ -From bbd3af94a6146d702909ff7e25b0c0547ecbb895 Mon Sep 17 00:00:00 2001 -From: jlui -Date: Wed, 15 Nov 2023 10:48:34 +0800 -Subject: [PATCH 05/13] Add XR24 support to DMABuf - -This is to enable XR24/BGRX support for DMABuf - -Signed-off-by: Lui, Jonathan Ming Jun - -Upstream-Status: Backport [https://github.com/intel/media-driver/commit/3910b7029f5416fd0b5972f940c65d0a82c48c7b] - -Signed-off-by: Lim, Siew Hoon ---- - .../vp/ddi/capstable_data_vp_xe_lpm_plus_r0_specific.h | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/media_softlet/linux/xe_lpm_plus_r0/vp/ddi/capstable_data_vp_xe_lpm_plus_r0_specific.h b/media_softlet/linux/xe_lpm_plus_r0/vp/ddi/capstable_data_vp_xe_lpm_plus_r0_specific.h -index fdcca8873..2dcf440a4 100644 ---- a/media_softlet/linux/xe_lpm_plus_r0/vp/ddi/capstable_data_vp_xe_lpm_plus_r0_specific.h -+++ b/media_softlet/linux/xe_lpm_plus_r0/vp/ddi/capstable_data_vp_xe_lpm_plus_r0_specific.h -@@ -55,8 +55,9 @@ static ProfileSurfaceAttribInfo surfaceAttribInfo_VAEntrypointVideoProc_VAProfil - {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC('4', '2', '2', 'V')}}}, - {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC('R', 'G', 'B', 'A')}}}, - {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC('B', 'G', 'R', 'A')}}}, -- {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, { VA_FOURCC('R', 'G', 'B', 'P')}}}, -+ {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC('R', 'G', 'B', 'P')}}}, - {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC('R', 'G', 'B', 'X')}}}, -+ {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC('X', 'R', 'G', 'B')}}}, - {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC('P', '0', '1', '0')}}}, - {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC('R', 'G', '2', '4')}}}, - {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC_ARGB}}}, --- -2.40.1 - diff --git a/recipes-multimedia/libva/files/0006-add-INTEL-MEDIA-ALLOC-refineE-to-specify-the-memory-.patch b/recipes-multimedia/libva/files/0006-add-INTEL-MEDIA-ALLOC-refineE-to-specify-the-memory-.patch deleted file mode 100644 index 5b04201a..00000000 --- a/recipes-multimedia/libva/files/0006-add-INTEL-MEDIA-ALLOC-refineE-to-specify-the-memory-.patch +++ /dev/null @@ -1,214 +0,0 @@ -From 67fb6128adf8fc03d429393e98f0982b42a40e64 Mon Sep 17 00:00:00 2001 -From: Zhang_Xinfeng -Date: Wed, 27 Dec 2023 09:59:29 +0800 -Subject: [PATCH 06/12] add INTEL MEDIA ALLOC refineE to specify the memory - alignment - -this key is used to allocate bigger pages -env variable INTEL_MEDIA_ALLOC_refineE also could be used -and was not enabled by default -mode 0 is default mode -mode 1 is < 64 align to 64 -mode 2 is > 1M && <= 3M align to 1M, >3M align to 2M -mode 3 is mode 1 & mode 2 - -Upstream-Status: Backport [https://github.com/intel/media-driver/commit/765dd939dcc5562d18cca18e5eda505bda952797] -Signed-off-by: Lim, Siew Hoon ---- - .../linux/common/os/i915/mos_bufmgr.c | 75 +++++++++++++++---- - .../common/os/i915_production/mos_bufmgr.c | 1 + - .../common/os/mos_context_specific_next.cpp | 21 +++++- - .../common/os/mos_user_setting_specific.cpp | 7 ++ - 4 files changed, 90 insertions(+), 14 deletions(-) - -diff --git a/media_softlet/linux/common/os/i915/mos_bufmgr.c b/media_softlet/linux/common/os/i915/mos_bufmgr.c -index c0b3ba027..b623d0129 100644 ---- a/media_softlet/linux/common/os/i915/mos_bufmgr.c -+++ b/media_softlet/linux/common/os/i915/mos_bufmgr.c -@@ -138,7 +138,7 @@ struct mos_bufmgr_gem { - int exec_count; - - /** Array of lists of cached gem objects of power-of-two sizes */ -- struct mos_gem_bo_bucket cache_bucket[14 * 4]; -+ struct mos_gem_bo_bucket cache_bucket[64]; - int num_buckets; - time_t time; - -@@ -3852,9 +3852,9 @@ add_bucket(struct mos_bufmgr_gem *bufmgr_gem, int size) - } - - static void --init_cache_buckets(struct mos_bufmgr_gem *bufmgr_gem) -+init_cache_buckets(struct mos_bufmgr_gem *bufmgr_gem, uint8_t alloc_mode) - { -- unsigned long size, cache_max_size = 64 * 1024 * 1024; -+ unsigned long size, cache_max_size = 64 * 1024 * 1024, unit_size; - - /* OK, so power of two buckets was too wasteful of memory. - * Give 3 other sizes between each power of two, to hopefully -@@ -3864,17 +3864,63 @@ init_cache_buckets(struct mos_bufmgr_gem *bufmgr_gem) - * width/height alignment and rounding of sizes to pages will - * get us useful cache hit rates anyway) - */ -- add_bucket(bufmgr_gem, 4096); -- add_bucket(bufmgr_gem, 4096 * 2); -- add_bucket(bufmgr_gem, 4096 * 3); -+ /* alloc_mode 0 is default alloc_mode -+ * alloc_mode 1 rounding up to 64K for all < 1M -+ * alloc_mode 2 rounding up to 2M for size> 1M -+ * alloc_mode 3 rounding up to 2M for size > 1M and 64K for size <= 1M */ -+ if( alloc_mode > 3 ) -+ alloc_mode = 0; -+ -+ if ( 0 == alloc_mode || 2 == alloc_mode) -+ { -+ // < 1M normal alloc_mode -+ add_bucket(bufmgr_gem, 4096); -+ add_bucket(bufmgr_gem, 4096 * 2); -+ add_bucket(bufmgr_gem, 4096 * 3); -+ /* Initialize the linked lists for BO reuse cache. */ -+ for (size = 4 * 4096; size < 1024 * 1024; size *= 2) { -+ add_bucket(bufmgr_gem, size); -+ add_bucket(bufmgr_gem, size + size * 1 / 4); -+ add_bucket(bufmgr_gem, size + size * 2 / 4); -+ add_bucket(bufmgr_gem, size + size * 3 / 4); -+ } - -- /* Initialize the linked lists for BO reuse cache. */ -- for (size = 4 * 4096; size <= cache_max_size; size *= 2) { -- add_bucket(bufmgr_gem, size); -+ add_bucket(bufmgr_gem, 1024 * 1024); -+ } -+ if (1 == alloc_mode || 3 == alloc_mode) -+ { -+ // < 1M 64k alignment -+ unit_size = 64 * 1024; -+ for (size = unit_size; size <= 1024 * 1024; size += unit_size) -+ { -+ add_bucket(bufmgr_gem, size); -+ } -+ } -+ if( 0 == alloc_mode || 1 == alloc_mode) -+ { -+ //> 1M is normal alloc_mode -+ add_bucket(bufmgr_gem, 1280 * 1024); -+ add_bucket(bufmgr_gem, 1536 * 1024); -+ add_bucket(bufmgr_gem, 1792 * 1024); -+ -+ for (size = 2 * 1024 * 1024; size < cache_max_size; size *= 2) { -+ add_bucket(bufmgr_gem, size); -+ add_bucket(bufmgr_gem, size + size * 1 / 4); -+ add_bucket(bufmgr_gem, size + size * 2 / 4); -+ add_bucket(bufmgr_gem, size + size * 3 / 4); -+ } -+ } -+ if( 2 == alloc_mode || 3 == alloc_mode) -+ { -+ //> 1M rolling to 2M -+ unit_size = 2 * 1024 * 1024; -+ add_bucket(bufmgr_gem, unit_size); -+ add_bucket(bufmgr_gem, 3 * 1024 * 1024); - -- add_bucket(bufmgr_gem, size + size * 1 / 4); -- add_bucket(bufmgr_gem, size + size * 2 / 4); -- add_bucket(bufmgr_gem, size + size * 3 / 4); -+ for (size = 4 * 1024 * 1024; size <= cache_max_size; size += unit_size) -+ { -+ add_bucket(bufmgr_gem, size); -+ } - } - } - -@@ -5100,6 +5146,7 @@ mos_bufmgr_gem_init_i915(int fd, int batch_size) - struct drm_i915_gem_get_aperture aperture; - drm_i915_getparam_t gp; - int ret, tmp; -+ uint8_t alloc_mode; - bool exec2 = false; - - pthread_mutex_lock(&bufmgr_list_mutex); -@@ -5352,10 +5399,12 @@ mos_bufmgr_gem_init_i915(int fd, int batch_size) - * - * Every 4 was too few for the blender benchmark. - */ -+ alloc_mode = (uint8_t)(batch_size & 0xff); -+ batch_size &= 0xffffff00; - bufmgr_gem->max_relocs = batch_size / sizeof(uint32_t) / 2 - 2; - - DRMINITLISTHEAD(&bufmgr_gem->named); -- init_cache_buckets(bufmgr_gem); -+ init_cache_buckets(bufmgr_gem,alloc_mode); - - DRMLISTADD(&bufmgr_gem->managers, &bufmgr_list); - -diff --git a/media_softlet/linux/common/os/i915_production/mos_bufmgr.c b/media_softlet/linux/common/os/i915_production/mos_bufmgr.c -index 90b5685b1..b3574f7d3 100644 ---- a/media_softlet/linux/common/os/i915_production/mos_bufmgr.c -+++ b/media_softlet/linux/common/os/i915_production/mos_bufmgr.c -@@ -5403,6 +5403,7 @@ mos_bufmgr_gem_init_i915(int fd, int batch_size) - * - * Every 4 was too few for the blender benchmark. - */ -+ batch_size &= 0xffffff00; - bufmgr_gem->max_relocs = batch_size / sizeof(uint32_t) / 2 - 2; - - DRMINITLISTHEAD(&bufmgr_gem->named); -diff --git a/media_softlet/linux/common/os/mos_context_specific_next.cpp b/media_softlet/linux/common/os/mos_context_specific_next.cpp -index 9e9e3ff7e..543e262d1 100644 ---- a/media_softlet/linux/common/os/mos_context_specific_next.cpp -+++ b/media_softlet/linux/common/os/mos_context_specific_next.cpp -@@ -64,6 +64,7 @@ MOS_STATUS OsContextSpecificNext::Init(DDI_DEVICE_CONTEXT ddiDriverContext) - uint32_t iDeviceId = 0; - MOS_STATUS eStatus = MOS_STATUS_SUCCESS; - uint32_t value = 0; -+ uint32_t mode = 0; - MediaUserSettingSharedPtr userSettingPtr = nullptr; - - MOS_OS_FUNCTION_ENTER; -@@ -89,7 +90,25 @@ MOS_STATUS OsContextSpecificNext::Init(DDI_DEVICE_CONTEXT ddiDriverContext) - - userSettingPtr = MosInterface::MosGetUserSettingInstance(osDriverContext); - -- m_bufmgr = mos_bufmgr_gem_init(m_fd, BATCH_BUFFER_SIZE, &m_deviceType); -+ mode = BATCH_BUFFER_SIZE; -+ ReadUserSetting( -+ userSettingPtr, -+ value, -+ "INTEL MEDIA ALLOC MODE", -+ MediaUserSetting::Group::Device); -+ -+ if (value) -+ { -+ mode |= (value & 0x000000ff); -+ } -+ value = 0; -+ /* no need to set batch buffer size after switch to softpin -+ * keep it, just for test during relocation to softpin transition -+ * now , it could be a debug method , but is actually useless -+ * so it is safe to reuse the lowest 8bit to convey addtional information -+ * more suitable solution is deleting it , or add additional parameter*/ -+ -+ m_bufmgr = mos_bufmgr_gem_init(m_fd, (int)mode, &m_deviceType); - if (nullptr == m_bufmgr) - { - MOS_OS_ASSERTMESSAGE("Not able to allocate buffer manager, fd=0x%d", m_fd); -diff --git a/media_softlet/linux/common/os/mos_user_setting_specific.cpp b/media_softlet/linux/common/os/mos_user_setting_specific.cpp -index 6be8b4298..caed584f4 100644 ---- a/media_softlet/linux/common/os/mos_user_setting_specific.cpp -+++ b/media_softlet/linux/common/os/mos_user_setting_specific.cpp -@@ -52,5 +52,12 @@ MOS_STATUS MosUserSetting::InitMosUserSettingSpecific(MediaUserSettingSharedPtr - 0, - true); //"Enable VM Bind." - -+ DeclareUserSettingKey( -+ userSettingPtr, -+ "INTEL MEDIA ALLOC MODE", -+ MediaUserSetting::Group::Device, -+ 0, -+ false); // -+ - return MOS_STATUS_SUCCESS; - } --- -2.40.1 - diff --git a/recipes-multimedia/libva/files/0007-Skip-report-keys.patch b/recipes-multimedia/libva/files/0007-Skip-report-keys.patch deleted file mode 100644 index 459ff490..00000000 --- a/recipes-multimedia/libva/files/0007-Skip-report-keys.patch +++ /dev/null @@ -1,78 +0,0 @@ -From b1aebef4d342c77fc2b9c5efbf20aeb2aa9d634e Mon Sep 17 00:00:00 2001 -From: Wang_Pingli -Date: Thu, 28 Dec 2023 16:44:40 +0800 -Subject: [PATCH 07/12] Skip report keys - -Skip to report keys - -Upstream-Status: Backport [https://github.com/intel/media-driver/commit/68ce25b0a6fa90614eb4734c8680aa4e149e8323] -Signed-off-by: Lim, Siew Hoon ---- - .../os/osservice/mos_utilities_specific.cpp | 30 +++++++++++++++++-- - 1 file changed, 28 insertions(+), 2 deletions(-) - -diff --git a/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp b/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp -index b5df29f06..96785e21e 100644 ---- a/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp -+++ b/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp -@@ -67,6 +67,8 @@ int32_t g_mosMemoryFailSimulateAllocCounter = 0; - int32_t *MosUtilities::m_mosAllocMemoryFailSimulateAllocCounter = &g_mosMemoryFailSimulateAllocCounter; - #endif - -+static bool s_skipToReportReg = false; -+ - double MosUtilities::MosGetTime() - { - struct timespec ts = {}; -@@ -1551,6 +1553,10 @@ MOS_STATUS MosUtilities::MosInitializeReg(RegBufferMap ®BufferMap) - { - std::string id = ""; - -+ static const char *disableReportRegKeyList[] = { -+ "INTEL MEDIA ALLOC MODE" -+ }; -+ static const uint32_t disableReportRegKeyListCount = sizeof(disableReportRegKeyList) / sizeof(disableReportRegKeyList[0]); - while(!regStream.eof()) - { - std::string line = ""; -@@ -1585,8 +1591,22 @@ MOS_STATUS MosUtilities::MosInitializeReg(RegBufferMap ®BufferMap) - { - std::string name = line.substr(0,pos); - std::string value = line.substr(pos+1); -- auto &keys = regBufferMap[id]; -- keys[name] = value; -+ if (name.size() > 0 && value.size() > 0) -+ { -+ auto &keys = regBufferMap[id]; -+ keys[name] = value; -+ if (s_skipToReportReg == false && id == USER_SETTING_CONFIG_PATH) -+ { -+ for (uint32_t i = 0; i < disableReportRegKeyListCount; i++) -+ { -+ if (strcmp(name.c_str(), disableReportRegKeyList[i]) == 0) -+ { -+ s_skipToReportReg = true; -+ break; -+ } -+ } -+ } -+ } - } - } - } -@@ -1606,6 +1626,12 @@ MOS_STATUS MosUtilities::MosInitializeReg(RegBufferMap ®BufferMap) - MOS_STATUS MosUtilities::MosUninitializeReg(RegBufferMap ®BufferMap) - { - MOS_STATUS status = MOS_STATUS_SUCCESS; -+ -+ if (s_skipToReportReg) -+ { -+ return MOS_STATUS_SUCCESS; -+ } -+ - if (regBufferMap.size() == 0) - { - return MOS_STATUS_SUCCESS; --- -2.40.1 - diff --git a/recipes-multimedia/libva/files/0008-Limit-INTEL-MEDIA-ALLOC-MODE-to-MTL-and-ARL-only.patch b/recipes-multimedia/libva/files/0008-Limit-INTEL-MEDIA-ALLOC-MODE-to-MTL-and-ARL-only.patch deleted file mode 100644 index ece5e00b..00000000 --- a/recipes-multimedia/libva/files/0008-Limit-INTEL-MEDIA-ALLOC-MODE-to-MTL-and-ARL-only.patch +++ /dev/null @@ -1,255 +0,0 @@ -From ac2ffac8d4aade216cc361c6c7120c13a8780719 Mon Sep 17 00:00:00 2001 -From: "Soon, Thean Siew" -Date: Thu, 28 Dec 2023 18:42:59 +0000 -Subject: [PATCH 08/12] Limit INTEL MEDIA ALLOC MODE to MTL and ARL only - -Upstream-Status: Submitted [https://github.com/intel/media-driver/pull/1754] - -Signed-off-by: Soon, Thean Siew ---- - .../common/os/i915/include/mos_bufmgr_api.h | 1 + - .../common/os/i915/include/mos_bufmgr_priv.h | 2 +- - .../linux/common/os/i915/mos_bufmgr.c | 69 +++++++++++++++---- - .../linux/common/os/i915/mos_bufmgr_api.c | 19 +++++ - .../os/i915_production/mos_bufmgr_priv.h | 1 + - .../common/os/mos_context_specific_next.cpp | 36 +++++----- - 6 files changed, 94 insertions(+), 34 deletions(-) - -diff --git a/media_softlet/linux/common/os/i915/include/mos_bufmgr_api.h b/media_softlet/linux/common/os/i915/include/mos_bufmgr_api.h -index 71cc01099..ab4f1ba89 100644 ---- a/media_softlet/linux/common/os/i915/include/mos_bufmgr_api.h -+++ b/media_softlet/linux/common/os/i915/include/mos_bufmgr_api.h -@@ -299,6 +299,7 @@ void mos_bufmgr_enable_vmbind(struct mos_bufmgr *bufmgr); - void mos_bufmgr_disable_object_capture(struct mos_bufmgr *bufmgr); - int mos_bufmgr_get_memory_info(struct mos_bufmgr *bufmgr, char *info, uint32_t length); - int mos_bufmgr_get_devid(struct mos_bufmgr *bufmgr); -+void mos_bufmgr_realloc_cache(struct mos_bufmgr *bufmgr, uint8_t alloc_mode); - - int mos_bo_map_unsynchronized(struct mos_linux_bo *bo); - int mos_bo_map_gtt(struct mos_linux_bo *bo); -diff --git a/media_softlet/linux/common/os/i915/include/mos_bufmgr_priv.h b/media_softlet/linux/common/os/i915/include/mos_bufmgr_priv.h -index 63f69f985..6fd58f827 100644 ---- a/media_softlet/linux/common/os/i915/include/mos_bufmgr_priv.h -+++ b/media_softlet/linux/common/os/i915/include/mos_bufmgr_priv.h -@@ -358,9 +358,9 @@ struct mos_bufmgr { - void (*disable_object_capture)(struct mos_bufmgr *bufmgr) = nullptr; - int (*get_memory_info)(struct mos_bufmgr *bufmgr, char *info, uint32_t length) = nullptr; - int (*get_devid)(struct mos_bufmgr *bufmgr) = nullptr; -+ void (*realloc_cache)(struct mos_bufmgr *bufmgr, uint8_t alloc_mode) = nullptr; - int (*query_engines_count)(struct mos_bufmgr *bufmgr, - unsigned int *nengine) = nullptr; -- - int (*query_engines)(struct mos_bufmgr *bufmgr, - __u16 engine_class, - __u64 caps, -diff --git a/media_softlet/linux/common/os/i915/mos_bufmgr.c b/media_softlet/linux/common/os/i915/mos_bufmgr.c -index b623d0129..2814ddbb7 100644 ---- a/media_softlet/linux/common/os/i915/mos_bufmgr.c -+++ b/media_softlet/linux/common/os/i915/mos_bufmgr.c -@@ -2426,19 +2426,9 @@ mos_gem_bo_start_gtt_access(struct mos_linux_bo *bo, int write_enable) - } - - static void --mos_bufmgr_gem_destroy(struct mos_bufmgr *bufmgr) -+mos_bufmgr_cleanup_cache(struct mos_bufmgr_gem *bufmgr_gem) - { -- struct mos_bufmgr_gem *bufmgr_gem = (struct mos_bufmgr_gem *) bufmgr; -- struct drm_gem_close close_bo; -- int i, ret; -- -- free(bufmgr_gem->exec2_objects); -- free(bufmgr_gem->exec_objects); -- free(bufmgr_gem->exec_bos); -- pthread_mutex_destroy(&bufmgr_gem->lock); -- -- /* Free any cached buffer objects we were going to reuse */ -- for (i = 0; i < bufmgr_gem->num_buckets; i++) { -+ for (int i = 0; i < bufmgr_gem->num_buckets; i++) { - struct mos_gem_bo_bucket *bucket = - &bufmgr_gem->cache_bucket[i]; - struct mos_bo_gem *bo_gem; -@@ -2450,7 +2440,25 @@ mos_bufmgr_gem_destroy(struct mos_bufmgr *bufmgr) - - mos_gem_bo_free(&bo_gem->bo); - } -+ bufmgr_gem->cache_bucket[i].size = 0; - } -+ bufmgr_gem->num_buckets = 0; -+} -+ -+static void -+mos_bufmgr_gem_destroy(struct mos_bufmgr *bufmgr) -+{ -+ struct mos_bufmgr_gem *bufmgr_gem = (struct mos_bufmgr_gem *)bufmgr; -+ struct drm_gem_close close_bo; -+ int ret; -+ -+ free(bufmgr_gem->exec2_objects); -+ free(bufmgr_gem->exec_objects); -+ free(bufmgr_gem->exec_bos); -+ pthread_mutex_destroy(&bufmgr_gem->lock); -+ -+ /* Free any cached buffer objects we were going to reuse */ -+ mos_bufmgr_cleanup_cache(bufmgr_gem); - - /* Release userptr bo kept hanging around for optimisation. */ - if (bufmgr_gem->userptr_active.ptr) { -@@ -3852,9 +3860,41 @@ add_bucket(struct mos_bufmgr_gem *bufmgr_gem, int size) - } - - static void --init_cache_buckets(struct mos_bufmgr_gem *bufmgr_gem, uint8_t alloc_mode) -+init_cache_buckets(struct mos_bufmgr_gem *bufmgr_gem) -+{ -+ unsigned long size, cache_max_size = 64 * 1024 * 1024; -+ -+ /* OK, so power of two buckets was too wasteful of memory. -+ * Give 3 other sizes between each power of two, to hopefully -+ * cover things accurately enough. (The alternative is -+ * probably to just go for exact matching of sizes, and assume -+ * that for things like composited window resize the tiled -+ * width/height alignment and rounding of sizes to pages will -+ * get us useful cache hit rates anyway) -+ */ -+ add_bucket(bufmgr_gem, 4096); -+ add_bucket(bufmgr_gem, 4096 * 2); -+ add_bucket(bufmgr_gem, 4096 * 3); -+ -+ /* Initialize the linked lists for BO reuse cache. */ -+ for (size = 4 * 4096; size <= cache_max_size; size *= 2) { -+ add_bucket(bufmgr_gem, size); -+ -+ add_bucket(bufmgr_gem, size + size * 1 / 4); -+ add_bucket(bufmgr_gem, size + size * 2 / 4); -+ add_bucket(bufmgr_gem, size + size * 3 / 4); -+ } -+} -+ -+static void -+mos_gem_realloc_cache(struct mos_bufmgr *bufmgr, uint8_t alloc_mode) - { - unsigned long size, cache_max_size = 64 * 1024 * 1024, unit_size; -+ struct mos_bufmgr_gem *bufmgr_gem = (struct mos_bufmgr_gem *)bufmgr; -+ -+ // Clean up the pre-allocated cache before re-allocating according -+ // to alloc_mode -+ mos_bufmgr_cleanup_cache(bufmgr_gem); - - /* OK, so power of two buckets was too wasteful of memory. - * Give 3 other sizes between each power of two, to hopefully -@@ -5218,6 +5258,7 @@ mos_bufmgr_gem_init_i915(int fd, int batch_size) - bufmgr_gem->bufmgr.disable_object_capture = mos_gem_disable_object_capture; - bufmgr_gem->bufmgr.get_memory_info = mos_gem_get_memory_info; - bufmgr_gem->bufmgr.get_devid = mos_gem_get_devid; -+ bufmgr_gem->bufmgr.realloc_cache = mos_gem_realloc_cache; - bufmgr_gem->bufmgr.set_context_param = mos_gem_set_context_param; - bufmgr_gem->bufmgr.set_context_param_parallel = mos_gem_set_context_param_parallel; - bufmgr_gem->bufmgr.set_context_param_load_balance = mos_gem_set_context_param_load_balance; -@@ -5404,7 +5445,7 @@ mos_bufmgr_gem_init_i915(int fd, int batch_size) - bufmgr_gem->max_relocs = batch_size / sizeof(uint32_t) / 2 - 2; - - DRMINITLISTHEAD(&bufmgr_gem->named); -- init_cache_buckets(bufmgr_gem,alloc_mode); -+ init_cache_buckets(bufmgr_gem); - - DRMLISTADD(&bufmgr_gem->managers, &bufmgr_list); - -diff --git a/media_softlet/linux/common/os/i915/mos_bufmgr_api.c b/media_softlet/linux/common/os/i915/mos_bufmgr_api.c -index abe8ef96a..d0e02c267 100644 ---- a/media_softlet/linux/common/os/i915/mos_bufmgr_api.c -+++ b/media_softlet/linux/common/os/i915/mos_bufmgr_api.c -@@ -1204,6 +1204,25 @@ mos_bufmgr_get_devid(struct mos_bufmgr *bufmgr) - } - } - -+void -+mos_bufmgr_realloc_cache(struct mos_bufmgr *bufmgr, uint8_t alloc_mode) -+{ -+ if(!bufmgr) -+ { -+ MOS_OS_CRITICALMESSAGE("Input null ptr\n"); -+ return; -+ } -+ -+ if (bufmgr->realloc_cache) -+ { -+ return bufmgr->realloc_cache(bufmgr, alloc_mode); -+ } -+ else -+ { -+ MOS_OS_CRITICALMESSAGE("Unsupported\n"); -+ } -+} -+ - int - mos_query_engines_count(struct mos_bufmgr *bufmgr, - unsigned int *nengine) -diff --git a/media_softlet/linux/common/os/i915_production/mos_bufmgr_priv.h b/media_softlet/linux/common/os/i915_production/mos_bufmgr_priv.h -index c3b765a4c..1d7f7edb0 100644 ---- a/media_softlet/linux/common/os/i915_production/mos_bufmgr_priv.h -+++ b/media_softlet/linux/common/os/i915_production/mos_bufmgr_priv.h -@@ -358,6 +358,7 @@ struct mos_bufmgr { - void (*disable_object_capture)(struct mos_bufmgr *bufmgr) = nullptr; - int (*get_memory_info)(struct mos_bufmgr *bufmgr, char *info, uint32_t length) = nullptr; - int (*get_devid)(struct mos_bufmgr *bufmgr) = nullptr; -+ void (*realloc_cache)(struct mos_bufmgr *bufmgr, uint8_t alloc_mode) = nullptr; - int (*query_engines_count)(struct mos_bufmgr *bufmgr, - unsigned int *nengine) = nullptr; - -diff --git a/media_softlet/linux/common/os/mos_context_specific_next.cpp b/media_softlet/linux/common/os/mos_context_specific_next.cpp -index 543e262d1..87059f538 100644 ---- a/media_softlet/linux/common/os/mos_context_specific_next.cpp -+++ b/media_softlet/linux/common/os/mos_context_specific_next.cpp -@@ -90,25 +90,7 @@ MOS_STATUS OsContextSpecificNext::Init(DDI_DEVICE_CONTEXT ddiDriverContext) - - userSettingPtr = MosInterface::MosGetUserSettingInstance(osDriverContext); - -- mode = BATCH_BUFFER_SIZE; -- ReadUserSetting( -- userSettingPtr, -- value, -- "INTEL MEDIA ALLOC MODE", -- MediaUserSetting::Group::Device); -- -- if (value) -- { -- mode |= (value & 0x000000ff); -- } -- value = 0; -- /* no need to set batch buffer size after switch to softpin -- * keep it, just for test during relocation to softpin transition -- * now , it could be a debug method , but is actually useless -- * so it is safe to reuse the lowest 8bit to convey addtional information -- * more suitable solution is deleting it , or add additional parameter*/ -- -- m_bufmgr = mos_bufmgr_gem_init(m_fd, (int)mode, &m_deviceType); -+ m_bufmgr = mos_bufmgr_gem_init(m_fd, BATCH_BUFFER_SIZE, &m_deviceType); - if (nullptr == m_bufmgr) - { - MOS_OS_ASSERTMESSAGE("Not able to allocate buffer manager, fd=0x%d", m_fd); -@@ -151,6 +133,22 @@ MOS_STATUS OsContextSpecificNext::Init(DDI_DEVICE_CONTEXT ddiDriverContext) - return eStatus; - } - -+ if (m_platformInfo.eProductFamily == IGFX_METEORLAKE || -+ m_platformInfo.eProductFamily == IGFX_ARROWLAKE) -+ { -+ ReadUserSetting( -+ userSettingPtr, -+ value, -+ "INTEL MEDIA ALLOC MODE", -+ MediaUserSetting::Group::Device); -+ -+ if (value) -+ { -+ mode = (value & 0x000000ff); -+ } -+ mos_bufmgr_realloc_cache(m_bufmgr, mode); -+ } -+ - ReadUserSetting( - userSettingPtr, - value, --- -2.40.1 - diff --git a/recipes-multimedia/libva/files/0009-Skip-cache-bucket-realloc-for-default-mode-0.patch b/recipes-multimedia/libva/files/0009-Skip-cache-bucket-realloc-for-default-mode-0.patch deleted file mode 100644 index 8ee7ef14..00000000 --- a/recipes-multimedia/libva/files/0009-Skip-cache-bucket-realloc-for-default-mode-0.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 18c32247cbc0e9fabff7a847add099496af9e53f Mon Sep 17 00:00:00 2001 -From: "Soon, Thean Siew" -Date: Mon, 8 Jan 2024 18:12:30 +0000 -Subject: [PATCH 09/12] Skip cache bucket realloc for default mode 0 - -Upstream-Status: Submitted [https://github.com/intel/media-driver/pull/1754] - -Signed-off-by: Soon, Thean Siew ---- - .../linux/common/os/mos_context_specific_next.cpp | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/media_softlet/linux/common/os/mos_context_specific_next.cpp b/media_softlet/linux/common/os/mos_context_specific_next.cpp -index 87059f538..9dbd5da79 100644 ---- a/media_softlet/linux/common/os/mos_context_specific_next.cpp -+++ b/media_softlet/linux/common/os/mos_context_specific_next.cpp -@@ -146,7 +146,12 @@ MOS_STATUS OsContextSpecificNext::Init(DDI_DEVICE_CONTEXT ddiDriverContext) - { - mode = (value & 0x000000ff); - } -- mos_bufmgr_realloc_cache(m_bufmgr, mode); -+ -+ // Realloc cache only if it's not mode 0 -+ if (mode) -+ { -+ mos_bufmgr_realloc_cache(m_bufmgr, mode); -+ } - } - - ReadUserSetting( --- -2.40.1 - diff --git a/recipes-multimedia/libva/files/0010-Fix-failed-4k-video-wall-test-case-and-color-corrupt.patch b/recipes-multimedia/libva/files/0010-Fix-failed-4k-video-wall-test-case-and-color-corrupt.patch deleted file mode 100644 index 0100df77..00000000 --- a/recipes-multimedia/libva/files/0010-Fix-failed-4k-video-wall-test-case-and-color-corrupt.patch +++ /dev/null @@ -1,195 +0,0 @@ -From 7291ab5206c5e172c6c94dcfbe4f1bc258f3b7a5 Mon Sep 17 00:00:00 2001 -From: WenshengZhang -Date: Wed, 10 Jan 2024 14:08:37 +0800 -Subject: [PATCH 10/12] Fix failed 4k video wall test case and color corruption - of video composition - -Fix failed 4k video wall test case from 16CH video only show 1CH output and -corruption observed on certain number of video composition when doing -sample_multi_transcode. - -Upstream-Status: Backport [https://github.com/intel/media-driver/commit/38e14b1b97170b51586d00d1fa607e496b0c5825] -Signed-off-by: Lim, Siew Hoon ---- - .../common/vp/kdll/hal_kerneldll_next.h | 1 + - .../vp/hal/packet/vp_render_fc_kernel.cpp | 7 ++ - .../common/vp/kdll/hal_kerneldll_next.c | 70 +++++++++++-------- - .../linux/common/vp/ddi/ddi_vp_functions.cpp | 20 ++---- - 4 files changed, 55 insertions(+), 43 deletions(-) - -diff --git a/media_common/agnostic/common/vp/kdll/hal_kerneldll_next.h b/media_common/agnostic/common/vp/kdll/hal_kerneldll_next.h -index 6447999b7..8e2ab371e 100644 ---- a/media_common/agnostic/common/vp/kdll/hal_kerneldll_next.h -+++ b/media_common/agnostic/common/vp/kdll/hal_kerneldll_next.h -@@ -588,6 +588,7 @@ typedef struct tagKdll_FilterEntry - Kdll_Scalingratio ScalingRatio; - Kdll_RenderMethod RenderMethod; - Kdll_SetCSCCoeffMethod SetCSCCoeffMode; -+ bool forceToTargetColorSpace; - } Kdll_FilterEntry, *PKdll_FilterEntry; - - // Structure that defines a compositing filter -diff --git a/media_softlet/agnostic/common/vp/hal/packet/vp_render_fc_kernel.cpp b/media_softlet/agnostic/common/vp/hal/packet/vp_render_fc_kernel.cpp -index 8e982f67e..f8308fed1 100644 ---- a/media_softlet/agnostic/common/vp/hal/packet/vp_render_fc_kernel.cpp -+++ b/media_softlet/agnostic/common/vp/hal/packet/vp_render_fc_kernel.cpp -@@ -775,6 +775,13 @@ MOS_STATUS VpRenderFcKernel::BuildFilter( - - for (i = 0; (i < (int)compParams->sourceCount) && (iMaxFilterSize > 0); i++) - { -+ if (i > 0) -+ { -+ if (!RECT1_CONTAINS_RECT2(compParams->source[0].surf->rcDst, compParams->source[i].surf->rcDst)) -+ { -+ pFilter->forceToTargetColorSpace = true; -+ } -+ } - src = &compParams->source[i]; - - //-------------------------------- -diff --git a/media_softlet/agnostic/common/vp/kdll/hal_kerneldll_next.c b/media_softlet/agnostic/common/vp/kdll/hal_kerneldll_next.c -index d8f7d429a..151f3b039 100644 ---- a/media_softlet/agnostic/common/vp/kdll/hal_kerneldll_next.c -+++ b/media_softlet/agnostic/common/vp/kdll/hal_kerneldll_next.c -@@ -2378,6 +2378,7 @@ bool KernelDll_SetupCSC( - Kdll_CSC_Matrix curr_matrix; - Kdll_CSC_Matrix *matrix = pCSC->Matrix; // Color Space conversion matrix - uint8_t * matrixID = pCSC->MatrixID; // CSC coefficient allocation table -+ bool forceToTargetColorSpace = false; - - // Clear all CSC matrices - MOS_ZeroMemory(matrix, sizeof(pCSC->Matrix)); -@@ -2395,6 +2396,10 @@ bool KernelDll_SetupCSC( - //---------------------------------------------------------------// - for (i = iFilterSize, pFilter = pSearchState->Filter; i > 0; i--, pFilter++) - { -+ if (pFilter->forceToTargetColorSpace) -+ { -+ forceToTargetColorSpace = true; -+ } - // Disable Procamp for all layers except Main Video - // Disable Procamp if source is RGB - if (pFilter->layer != Layer_MainVideo || -@@ -2456,44 +2461,51 @@ bool KernelDll_SetupCSC( - //---------------------------------------------------------------// - if (sel_cspace == CSpace_Any) - { -- int cs; -- for (cs = (CSpace_Any + 1); cs < CSpace_Count; cs++) -+ if (forceToTargetColorSpace) - { -- // Skip color spaces not in use -- cspace = (VPHAL_CSPACE)cs; -- if (!cspace_in_use[cspace]) -- { -- continue; -- } -- -- // xvYCC and BT are treated as same for CSC considerations (BT.x to xvYCC.x matrix is I) -- cspace = KernelDll_TranslateCspace(cspace); -- -- // Count # of CS conversions and matrices -- csc_count = 0; -- for (i = iFilterSize, pFilter = pSearchState->Filter; i > 0; i--, pFilter++) -+ sel_cspace = out_cspace; -+ } -+ else -+ { -+ int cs; -+ for (cs = (CSpace_Any + 1); cs < CSpace_Count; cs++) - { -- // Ignore layers where the Color Space may be set in software (colorfill, palletized) -- if (pFilter->cspace == CSpace_Any) -+ // Skip color spaces not in use -+ cspace = (VPHAL_CSPACE)cs; -+ if (!cspace_in_use[cspace]) - { - continue; - } - -- // Check if CSC/PA is required -- if (KernelDll_TranslateCspace(pFilter->cspace) != cspace || -- pFilter->procamp != DL_PROCAMP_DISABLED) -+ // xvYCC and BT are treated as same for CSC considerations (BT.x to xvYCC.x matrix is I) -+ cspace = KernelDll_TranslateCspace(cspace); -+ -+ // Count # of CS conversions and matrices -+ csc_count = 0; -+ for (i = iFilterSize, pFilter = pSearchState->Filter; i > 0; i--, pFilter++) - { -- csc_count++; -+ // Ignore layers where the Color Space may be set in software (colorfill, palletized) -+ if (pFilter->cspace == CSpace_Any) -+ { -+ continue; -+ } -+ -+ // Check if CSC/PA is required -+ if (KernelDll_TranslateCspace(pFilter->cspace) != cspace || -+ pFilter->procamp != DL_PROCAMP_DISABLED) -+ { -+ csc_count++; -+ } - } -- } - -- // Save best choice as requiring minimum number of CSC operations -- if ((sel_csc_count < 0) || // Initial value -- (csc_count < sel_csc_count) || // Minimum number of CSC operations -- (csc_count == sel_csc_count && cs == main_cspace)) // Use main cspace as default if same CSC count -- { -- sel_cspace = cspace; -- sel_csc_count = csc_count; -+ // Save best choice as requiring minimum number of CSC operations -+ if ((sel_csc_count < 0) || // Initial value -+ (csc_count < sel_csc_count) || // Minimum number of CSC operations -+ (csc_count == sel_csc_count && cs == main_cspace)) // Use main cspace as default if same CSC count -+ { -+ sel_cspace = cspace; -+ sel_csc_count = csc_count; -+ } - } - } - } -diff --git a/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp b/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp -index 40d0b3fad..e60a6c69c 100644 ---- a/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp -+++ b/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp -@@ -2115,9 +2115,8 @@ VAStatus DdiVpFunctions::SetBackgroundColorfill( - { - DDI_VP_FUNC_ENTER; - DDI_VP_CHK_NULL(vpHalRenderParams, "nullptr vpHalRenderParams.", VA_STATUS_ERROR_INVALID_PARAMETER); -- DDI_VP_CHK_NULL(vpHalRenderParams->pTarget[0],"nullptr pTarget[0].", VA_STATUS_ERROR_INVALID_PARAMETER); - -- if ((outBackGroundcolor >> 24) != 0 || vpHalRenderParams->pTarget[0]->ColorSpace == CSpace_sRGB) -+ if ((outBackGroundcolor >> 24) != 0) - { - if (vpHalRenderParams->pColorFillParams == nullptr) - { -@@ -2126,18 +2125,11 @@ VAStatus DdiVpFunctions::SetBackgroundColorfill( - - DDI_VP_CHK_NULL(vpHalRenderParams->pColorFillParams, "nullptr pColorFillParams.", VA_STATUS_ERROR_UNKNOWN); - -- if (vpHalRenderParams->pTarget[0]->ColorSpace == CSpace_sRGB && (outBackGroundcolor >> 24) == 0) -- { -- // set color space for sRGB output -- vpHalRenderParams->pColorFillParams->CSpace = CSpace_sRGB; -- } -- else -- { -- // set background colorfill option -- vpHalRenderParams->pColorFillParams->Color = outBackGroundcolor; -- vpHalRenderParams->pColorFillParams->bYCbCr = false; -- vpHalRenderParams->pColorFillParams->CSpace = CSpace_sRGB; -- } -+ // set background colorfill option -+ vpHalRenderParams->pColorFillParams->Color = outBackGroundcolor; -+ vpHalRenderParams->pColorFillParams->bYCbCr = false; -+ vpHalRenderParams->pColorFillParams->CSpace = CSpace_sRGB; -+ - } - else - { --- -2.40.1 - diff --git a/recipes-multimedia/libva/files/0011-Disable-422H-format-output.patch b/recipes-multimedia/libva/files/0011-Disable-422H-format-output.patch deleted file mode 100644 index 2f4aec1e..00000000 --- a/recipes-multimedia/libva/files/0011-Disable-422H-format-output.patch +++ /dev/null @@ -1,33 +0,0 @@ -From f8b4d982232d4c1330e1e5f5dcd7cd8ca94decba Mon Sep 17 00:00:00 2001 -From: WenshengZhang -Date: Thu, 25 Jan 2024 16:35:10 +0800 -Subject: [PATCH 11/12] Disable 422H format output - -Disable 422H format output. - -Upstream-Status: Backport [https://github.com/intel/media-driver/commit/eab411768e61a46e096793291f5f992eecf76cd8] -Signed-off-by: Lim, Siew Hoon ---- - .../agnostic/common/vp/hal/feature_manager/policy.cpp | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/media_softlet/agnostic/common/vp/hal/feature_manager/policy.cpp b/media_softlet/agnostic/common/vp/hal/feature_manager/policy.cpp -index 317cec25a..12f1124fa 100644 ---- a/media_softlet/agnostic/common/vp/hal/feature_manager/policy.cpp -+++ b/media_softlet/agnostic/common/vp/hal/feature_manager/policy.cpp -@@ -1140,6 +1140,12 @@ MOS_STATUS Policy::GetScalingExecutionCaps(SwFilter *feature, bool isHdrEnabled) - bool isAlphaSettingSupportedByVebox = - IsAlphaSettingSupportedByVebox(scalingParams->formatInput, scalingParams->formatOutput, scalingParams->pCompAlpha); - -+ if (scalingParams->formatOutput == Format_422H) -+ { -+ VP_PUBLIC_ASSERTMESSAGE("Scaling not support 422H format output."); -+ return MOS_STATUS_UNIMPLEMENTED; -+ } -+ - // Clean usedForNextPass flag. - if (scalingEngine->usedForNextPass) - { --- -2.40.1 - diff --git a/recipes-multimedia/libva/files/0012-Decode-Fix-AVC-decode-SFC-4K-hang-issue.patch b/recipes-multimedia/libva/files/0012-Decode-Fix-AVC-decode-SFC-4K-hang-issue.patch deleted file mode 100644 index 1be9139d..00000000 --- a/recipes-multimedia/libva/files/0012-Decode-Fix-AVC-decode-SFC-4K-hang-issue.patch +++ /dev/null @@ -1,32 +0,0 @@ -From b93904533d3ee66c7919fa8e23d26b852a37a917 Mon Sep 17 00:00:00 2001 -From: Lim Siew Hoon -Date: Tue, 30 Jan 2024 13:27:52 +0800 -Subject: [PATCH 12/12] [Decode] Fix AVC decode SFC 4K hang issue - -Updated VDSFC input width and height for AVC decode - -Upstream-Status: Submitted [https://github.com/intel-innersource/drivers.gpu.unified/pull/151401] - -Signed-off-by: Lim Siew Hoon ---- - .../hal/dec/avc/packet/decode_avc_downsampling_packet.cpp | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/media_softlet/agnostic/common/codec/hal/dec/avc/packet/decode_avc_downsampling_packet.cpp b/media_softlet/agnostic/common/codec/hal/dec/avc/packet/decode_avc_downsampling_packet.cpp -index e75fd8137..9cc236bd7 100644 ---- a/media_softlet/agnostic/common/codec/hal/dec/avc/packet/decode_avc_downsampling_packet.cpp -+++ b/media_softlet/agnostic/common/codec/hal/dec/avc/packet/decode_avc_downsampling_packet.cpp -@@ -59,6 +59,10 @@ MOS_STATUS AvcDownSamplingPkt::InitSfcParams(VDBOX_SFC_PARAMS &sfcParams) - - AvcBasicFeature *avcBasicFeature = dynamic_cast(m_basicFeature); - DECODE_CHK_NULL(avcBasicFeature); -+ -+ sfcParams.input.width = avcBasicFeature->m_width; -+ sfcParams.input.height = avcBasicFeature->m_height; -+ - CODEC_PICTURE curPic = avcBasicFeature->m_avcPicParams->CurrPic; - - if (avcBasicFeature->m_avcPicParams->seq_fields.mb_adaptive_frame_field_flag == true) --- -2.40.1 - diff --git a/recipes-multimedia/libva/files/8aa866dc650e6b0e0b7425bafc7b1039232c377a.patch b/recipes-multimedia/libva/files/8aa866dc650e6b0e0b7425bafc7b1039232c377a.patch new file mode 100644 index 00000000..17b2d635 --- /dev/null +++ b/recipes-multimedia/libva/files/8aa866dc650e6b0e0b7425bafc7b1039232c377a.patch @@ -0,0 +1,154 @@ +From 8aa866dc650e6b0e0b7425bafc7b1039232c377a Mon Sep 17 00:00:00 2001 +From: "Xu, Zhengguo" +Date: Tue, 16 Apr 2024 09:53:41 +0800 +Subject: [PATCH] [Decode] Correct condition check when dump avc mv buffer + +Fixes: #1791 +Signed-off-by: Xu, Zhengguo + +Upstream-Status: Backport [https://github.com/intel/media-driver/commit/8aa866dc650e6b0e0b7425bafc7b1039232c377a] +Signed-off-by: Anuj Mittal +--- + .../common/codec/hal/codechal_decode_avc.cpp | 33 ++++++++----------- + .../decode_avc_picture_xe_m_base_packet.cpp | 28 +++++++--------- + .../avc/packet/decode_avc_picture_packet.cpp | 30 +++++++---------- + 3 files changed, 37 insertions(+), 54 deletions(-) + +diff --git a/media_driver/agnostic/common/codec/hal/codechal_decode_avc.cpp b/media_driver/agnostic/common/codec/hal/codechal_decode_avc.cpp +index 3adf6994ce..4bac426802 100644 +--- a/media_driver/agnostic/common/codec/hal/codechal_decode_avc.cpp ++++ b/media_driver/agnostic/common/codec/hal/codechal_decode_avc.cpp +@@ -1619,28 +1619,23 @@ MOS_STATUS CodechalDecodeAvc::InitPicMhwParams( + uint8_t picID = picMhwParams->AvcDirectmodeParams.bPicIdRemappingInUse ? i : refList[idx]->ucFrameId; + uint8_t mvIdx = refList[idx]->ucDMVIdx[0]; + +- if (&picMhwParams->AvcDirectmodeParams.presAvcDmvBuffers[i] != nullptr) +- { +- // dump Reference mvdata +- std::string mvBufDumpName = "_DEC_Ref_MV_" + std::to_string(i); +- CODECHAL_DECODE_CHK_STATUS_RETURN(m_debugInterface->DumpBuffer( +- &picMhwParams->AvcDirectmodeParams.presAvcDmvBuffers[mvIdx], +- CodechalDbgAttr::attrMvData, +- mvBufDumpName.c_str(), +- m_avcDmvBufferSize)); +- } ++ // dump Reference mvdata ++ std::string mvBufDumpName = "_DEC_Ref_MV_" + std::to_string(i); ++ CODECHAL_DECODE_CHK_STATUS_RETURN(m_debugInterface->DumpBuffer( ++ &picMhwParams->AvcDirectmodeParams.presAvcDmvBuffers[mvIdx], ++ CodechalDbgAttr::attrMvData, ++ mvBufDumpName.c_str(), ++ m_avcDmvBufferSize)); + } + } + +- if (&picMhwParams->AvcDirectmodeParams.presAvcDmvBuffers[picMhwParams->AvcDirectmodeParams.ucAvcDmvIdx]) +- { +- // dump Current mvdata +- CODECHAL_DECODE_CHK_STATUS_RETURN(m_debugInterface->DumpBuffer( +- &picMhwParams->AvcDirectmodeParams.presAvcDmvBuffers[picMhwParams->AvcDirectmodeParams.ucAvcDmvIdx], +- CodechalDbgAttr::attrMvData, +- "DEC_Cur_MV_", +- m_avcDmvBufferSize)); +- }); ++ // dump Current mvdata ++ CODECHAL_DECODE_CHK_STATUS_RETURN(m_debugInterface->DumpBuffer( ++ &picMhwParams->AvcDirectmodeParams.presAvcDmvBuffers[picMhwParams->AvcDirectmodeParams.ucAvcDmvIdx], ++ CodechalDbgAttr::attrMvData, ++ "DEC_Cur_MV_", ++ m_avcDmvBufferSize)); ++ ); + + return eStatus; + } +diff --git a/media_driver/media_softlet/agnostic/Xe_M/Xe_M_base/codec/hal/dec/avc/packet/decode_avc_picture_xe_m_base_packet.cpp b/media_driver/media_softlet/agnostic/Xe_M/Xe_M_base/codec/hal/dec/avc/packet/decode_avc_picture_xe_m_base_packet.cpp +index bd0611f6fa..035a7e6149 100644 +--- a/media_driver/media_softlet/agnostic/Xe_M/Xe_M_base/codec/hal/dec/avc/packet/decode_avc_picture_xe_m_base_packet.cpp ++++ b/media_driver/media_softlet/agnostic/Xe_M/Xe_M_base/codec/hal/dec/avc/packet/decode_avc_picture_xe_m_base_packet.cpp +@@ -589,26 +589,20 @@ namespace decode{ + { + if (m_avcBasicFeature->m_refFrames.m_avcPicIdx[n].bValid) + { +- if (&avcDirectmodeParams.presAvcDmvBuffers[n+1] != nullptr) +- { +- std::string mvBufDumpName = "_DEC_Ref_MV_" + std::to_string(n); +- DECODE_CHK_STATUS(debugInterface->DumpBuffer( +- &avcDirectmodeParams.presAvcDmvBuffers[n+1], +- CodechalDbgAttr::attrMvData, +- mvBufDumpName.c_str(), +- mvBufferSize)); +- } ++ std::string mvBufDumpName = "_DEC_Ref_MV_" + std::to_string(n); ++ DECODE_CHK_STATUS(debugInterface->DumpBuffer( ++ &avcDirectmodeParams.presAvcDmvBuffers[n+1], ++ CodechalDbgAttr::attrMvData, ++ mvBufDumpName.c_str(), ++ mvBufferSize)); + } + } + +- if (&avcDirectmodeParams.presAvcDmvBuffers[0] != nullptr) +- { +- DECODE_CHK_STATUS(debugInterface->DumpBuffer( +- &avcDirectmodeParams.presAvcDmvBuffers[0], +- CodechalDbgAttr::attrMvData, +- "DEC_Cur_MV_", +- mvBufferSize)); +- } ++ DECODE_CHK_STATUS(debugInterface->DumpBuffer( ++ &avcDirectmodeParams.presAvcDmvBuffers[0], ++ CodechalDbgAttr::attrMvData, ++ "DEC_Cur_MV_", ++ mvBufferSize)); + return MOS_STATUS_SUCCESS; + } + +diff --git a/media_softlet/agnostic/common/codec/hal/dec/avc/packet/decode_avc_picture_packet.cpp b/media_softlet/agnostic/common/codec/hal/dec/avc/packet/decode_avc_picture_packet.cpp +index 88ed0bb832..8cdc05e585 100644 +--- a/media_softlet/agnostic/common/codec/hal/dec/avc/packet/decode_avc_picture_packet.cpp ++++ b/media_softlet/agnostic/common/codec/hal/dec/avc/packet/decode_avc_picture_packet.cpp +@@ -646,26 +646,20 @@ MOS_STATUS AvcDecodePicPkt::DumpResources(uint32_t mvBufferSize) const + CodechalDbgAttr::attrDecodeReferenceSurfaces, + refSurfName.c_str())); + +- if (&mvParam.presAvcDmvBuffers[n+1] != nullptr) +- { +- std::string mvBufDumpName = "_DEC_Ref_MV_" + std::to_string(n); +- DECODE_CHK_STATUS(debugInterface->DumpBuffer( +- &mvParam.presAvcDmvBuffers[n+1], +- CodechalDbgAttr::attrMvData, +- mvBufDumpName.c_str(), +- mvBufferSize)); +- } ++ std::string mvBufDumpName = "_DEC_Ref_MV_" + std::to_string(n); ++ DECODE_CHK_STATUS(debugInterface->DumpBuffer( ++ &mvParam.presAvcDmvBuffers[n+1], ++ CodechalDbgAttr::attrMvData, ++ mvBufDumpName.c_str(), ++ mvBufferSize)); + } + } + +- if (&mvParam.presAvcDmvBuffers[0] != nullptr) +- { +- DECODE_CHK_STATUS(debugInterface->DumpBuffer( +- &mvParam.presAvcDmvBuffers[0], +- CodechalDbgAttr::attrMvData, +- "DEC_Cur_MV_", +- mvBufferSize)); +- } ++ DECODE_CHK_STATUS(debugInterface->DumpBuffer( ++ &mvParam.presAvcDmvBuffers[0], ++ CodechalDbgAttr::attrMvData, ++ "DEC_Cur_MV_", ++ mvBufferSize)); + + return MOS_STATUS_SUCCESS; + } +@@ -699,4 +693,4 @@ MOS_STATUS AvcDecodePicPkt::SetSurfaceMmcState() const + return MOS_STATUS_SUCCESS; + } + +-} // namespace decode +\ No newline at end of file ++} // namespace decode diff --git a/recipes-multimedia/libva/intel-media-driver_23.4.3.bb b/recipes-multimedia/libva/intel-media-driver_23.4.3.bb deleted file mode 100644 index 6513d574..00000000 --- a/recipes-multimedia/libva/intel-media-driver_23.4.3.bb +++ /dev/null @@ -1,61 +0,0 @@ -SUMMARY = "VA driver for Intel Gen based graphics hardware" -DESCRIPTION = "Intel Media Driver for VAAPI is a new VA-API (Video Acceleration API) \ -user mode driver supporting hardware accelerated decoding, encoding, \ -and video post processing for GEN based graphics hardware." - -HOMEPAGE = "https://github.com/intel/media-driver" -BUGTRACKER = "https://github.com/intel/media-driver/issues" - -LICENSE = "MIT & BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE.md;md5=6aab5363823095ce682b155fef0231f0 \ - file://media_driver/media_libvpx.LICENSE;md5=d5b04755015be901744a78cc30d390d4 \ - " - -COMPATIBLE_HOST = '(i.86|x86_64).*-linux' - -inherit features_check -REQUIRED_DISTRO_FEATURES = "opengl" - -DEPENDS += "libva gmmlib" - -SRC_URI = "git://github.com/intel/media-driver.git;protocol=https;nobranch=1 \ - file://0001-Disable-vp9-padding-on-mtl.patch \ - file://0002-Force-ARGB-surface-to-tile4-for-ACM.patch \ - file://0004-Add-device-ID-for-ARL.patch \ - file://0005-Add-XR24-support-to-DMABuf.patch \ - file://0006-add-INTEL-MEDIA-ALLOC-refineE-to-specify-the-memory-.patch \ - file://0007-Skip-report-keys.patch \ - file://0008-Limit-INTEL-MEDIA-ALLOC-MODE-to-MTL-and-ARL-only.patch \ - file://0009-Skip-cache-bucket-realloc-for-default-mode-0.patch \ - file://0010-Fix-failed-4k-video-wall-test-case-and-color-corrupt.patch \ - file://0011-Disable-422H-format-output.patch \ - file://0012-Decode-Fix-AVC-decode-SFC-4K-hang-issue.patch \ - " - -SRCREV = "a9f272496fc0f3e823cc4a814666ea27b443d902" -S = "${WORKDIR}/git" - -COMPATIBLE_HOST:x86-x32 = "null" - -UPSTREAM_CHECK_GITTAGREGEX = "^intel-media-(?P(?!600\..*)\d+(\.\d+)+)$" - -inherit cmake pkgconfig - -MEDIA_DRIVER_ARCH:x86 = "32" -MEDIA_DRIVER_ARCH:x86-64 = "64" - -EXTRA_OECMAKE += " \ - -DMEDIA_RUN_TEST_SUITE=OFF \ - -DARCH=${MEDIA_DRIVER_ARCH} \ - -DMEDIA_BUILD_FATAL_WARNINGS=OFF \ - " - -CXXFLAGS:append:x86 = " -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" - -do_configure:prepend:toolchain-clang() { - sed -i -e '/-fno-tree-pre/d' ${S}/media_driver/cmake/linux/media_compile_flags_linux.cmake -} - -FILES:${PN} += " \ - ${libdir}/dri/ \ - " diff --git a/recipes-multimedia/libva/intel-media-driver_24.1.5.bb b/recipes-multimedia/libva/intel-media-driver_24.1.5.bb new file mode 100644 index 00000000..79f9887d --- /dev/null +++ b/recipes-multimedia/libva/intel-media-driver_24.1.5.bb @@ -0,0 +1,53 @@ +SUMMARY = "VA driver for Intel Gen based graphics hardware" +DESCRIPTION = "Intel Media Driver for VAAPI is a new VA-API (Video Acceleration API) \ +user mode driver supporting hardware accelerated decoding, encoding, \ +and video post processing for GEN based graphics hardware." + +HOMEPAGE = "https://github.com/intel/media-driver" +BUGTRACKER = "https://github.com/intel/media-driver/issues" + +LICENSE = "MIT & BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=6aab5363823095ce682b155fef0231f0 \ + file://media_driver/media_libvpx.LICENSE;md5=d5b04755015be901744a78cc30d390d4 \ + " + +COMPATIBLE_HOST = '(i.86|x86_64).*-linux' + +inherit features_check +REQUIRED_DISTRO_FEATURES = "opengl" + +DEPENDS += "libva gmmlib" + +SRC_URI = "git://github.com/intel/media-driver.git;protocol=https;nobranch=1 \ + file://0001-Disable-vp9-padding-on-mtl.patch \ + file://0002-Force-ARGB-surface-to-tile4-for-ACM.patch \ + file://8aa866dc650e6b0e0b7425bafc7b1039232c377a.patch \ + " + +SRCREV = "8068c2e119ba16c017e5a5f443fac5a55edbee65" +S = "${WORKDIR}/git" + +COMPATIBLE_HOST:x86-x32 = "null" + +UPSTREAM_CHECK_GITTAGREGEX = "^intel-media-(?P(?!600\..*)\d+(\.\d+)+)$" + +inherit cmake pkgconfig + +MEDIA_DRIVER_ARCH:x86 = "32" +MEDIA_DRIVER_ARCH:x86-64 = "64" + +EXTRA_OECMAKE += " \ + -DMEDIA_RUN_TEST_SUITE=OFF \ + -DARCH=${MEDIA_DRIVER_ARCH} \ + -DMEDIA_BUILD_FATAL_WARNINGS=OFF \ + " + +CXXFLAGS:append:x86 = " -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" + +do_configure:prepend:toolchain-clang() { + sed -i -e '/-fno-tree-pre/d' ${S}/media_driver/cmake/linux/media_compile_flags_linux.cmake +} + +FILES:${PN} += " \ + ${libdir}/dri/ \ + " -- cgit v1.2.3-54-g00ecf