From 723644dd33926924763f1c800d42effd34b81316 Mon Sep 17 00:00:00 2001 From: Lim Siew Hoon Date: Mon, 26 Feb 2024 10:27:31 +0800 Subject: intel-media-driver: upgrade 23.3.5 -> 23.4.3 Drop patches already merged: * 0002-Add-VASurfaceAttribMemoryType-for-ACM.patch * 0004-Set-sRGB-color-space-for-non-video-wall-and-no-backg.patch * 0005-XRGB-force-to-do-swizzle-for-AVC-HEVC.patch * 0006-Add-DG2-DIDs.patch Rebased patchess: * 0001-Disable-vp9-padding-on-mtl.patch * 0002-Force-ARGB-surface-to-tile4-for-ACM.patch Added new bug fixed: * 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 Release notes: https://github.com/intel/media-driver/releases/tag/intel-media-23.4.3 Signed-off-by: Lim Siew Hoon Signed-off-by: Anuj Mittal --- .../files/0001-Disable-VP9-padding-on-MTL.patch | 29 --- .../files/0001-Disable-vp9-padding-on-mtl.patch | 35 +++ ...002-Add-VASurfaceAttribMemoryType-for-ACM.patch | 33 --- .../0002-Force-ARGB-surface-to-tile4-for-ACM.patch | 44 ++++ .../0003-Force-ARGB-surface-to-tile4-for-ACM.patch | 44 ---- .../libva/files/0004-Add-device-ID-for-ARL.patch | 45 ++++ ...lor-space-for-non-video-wall-and-no-backg.patch | 96 -------- .../files/0005-Add-XR24-support-to-DMABuf.patch | 34 +++ ...005-XRGB-force-to-do-swizzle-for-AVC-HEVC.patch | 53 ----- .../libva/files/0006-Add-DG2-DIDs.patch | 39 ---- ...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 +++ .../libva/intel-media-driver_23.3.5.bb | 56 ----- .../libva/intel-media-driver_23.4.3.bb | 61 +++++ 19 files changed, 1059 insertions(+), 350 deletions(-) delete mode 100644 recipes-multimedia/libva/files/0001-Disable-VP9-padding-on-MTL.patch create mode 100644 recipes-multimedia/libva/files/0001-Disable-vp9-padding-on-mtl.patch delete mode 100644 recipes-multimedia/libva/files/0002-Add-VASurfaceAttribMemoryType-for-ACM.patch create mode 100644 recipes-multimedia/libva/files/0002-Force-ARGB-surface-to-tile4-for-ACM.patch delete mode 100644 recipes-multimedia/libva/files/0003-Force-ARGB-surface-to-tile4-for-ACM.patch create mode 100644 recipes-multimedia/libva/files/0004-Add-device-ID-for-ARL.patch delete mode 100644 recipes-multimedia/libva/files/0004-Set-sRGB-color-space-for-non-video-wall-and-no-backg.patch create mode 100644 recipes-multimedia/libva/files/0005-Add-XR24-support-to-DMABuf.patch delete mode 100644 recipes-multimedia/libva/files/0005-XRGB-force-to-do-swizzle-for-AVC-HEVC.patch delete mode 100644 recipes-multimedia/libva/files/0006-Add-DG2-DIDs.patch create mode 100644 recipes-multimedia/libva/files/0006-add-INTEL-MEDIA-ALLOC-refineE-to-specify-the-memory-.patch create mode 100644 recipes-multimedia/libva/files/0007-Skip-report-keys.patch create mode 100644 recipes-multimedia/libva/files/0008-Limit-INTEL-MEDIA-ALLOC-MODE-to-MTL-and-ARL-only.patch create mode 100644 recipes-multimedia/libva/files/0009-Skip-cache-bucket-realloc-for-default-mode-0.patch create mode 100644 recipes-multimedia/libva/files/0010-Fix-failed-4k-video-wall-test-case-and-color-corrupt.patch create mode 100644 recipes-multimedia/libva/files/0011-Disable-422H-format-output.patch create mode 100644 recipes-multimedia/libva/files/0012-Decode-Fix-AVC-decode-SFC-4K-hang-issue.patch delete mode 100644 recipes-multimedia/libva/intel-media-driver_23.3.5.bb create mode 100644 recipes-multimedia/libva/intel-media-driver_23.4.3.bb (limited to 'recipes-multimedia') diff --git a/recipes-multimedia/libva/files/0001-Disable-VP9-padding-on-MTL.patch b/recipes-multimedia/libva/files/0001-Disable-VP9-padding-on-MTL.patch deleted file mode 100644 index 2f1602d2..00000000 --- a/recipes-multimedia/libva/files/0001-Disable-VP9-padding-on-MTL.patch +++ /dev/null @@ -1,29 +0,0 @@ -From d9ea15202df23be0ead2157392ca347c42d28ce0 Mon Sep 17 00:00:00 2001 -From: LeyuYao -Date: Thu, 7 Sep 2023 16:50:46 +0800 -Subject: [PATCH 1/7] Disable VP9 padding on MTL - -This is impact performance on large solution with not 8-aligned height - -Upstream-Status: Backport [https://github.com/intel/media-driver/commit/f34b7d0cd] -Signed-off-by: Lim Siew Hoon ---- - media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp b/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp -index 91b2ed5ed..0f4d47931 100644 ---- a/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp -+++ b/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp -@@ -284,7 +284,7 @@ static bool InitMtlMediaWaExt(struct GfxDeviceInfo *devInfo, - - MEDIA_WR_WA(waTable, WaDisableSetObjectCapture, 1); - -- MEDIA_WR_WA(waTable, Wa_Vp9UnalignedHeight, 1); -+ MEDIA_WR_WA(waTable, Wa_Vp9UnalignedHeight, 0); - - MEDIA_WR_WA(waTable, Wa_15013355402, 1); - --- -2.40.1 - diff --git a/recipes-multimedia/libva/files/0001-Disable-vp9-padding-on-mtl.patch b/recipes-multimedia/libva/files/0001-Disable-vp9-padding-on-mtl.patch new file mode 100644 index 00000000..90dff8d1 --- /dev/null +++ b/recipes-multimedia/libva/files/0001-Disable-vp9-padding-on-mtl.patch @@ -0,0 +1,35 @@ +From 1b303f417113ad1aa6b63fc024fbe4aa0c943f57 Mon Sep 17 00:00:00 2001 +From: Lim Siew Hoon +Date: Tue, 5 Sep 2023 16:13:42 +0800 +Subject: [PATCH 01/12] Disable vp9 padding on mtl. + +Upstream-Status: Submitted [https://github.com/intel/media-driver/pull/1720] + +Signed-off-by: Lim Siew Hoon +--- + media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp b/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp +index 844545a87..72265289c 100644 +--- a/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp ++++ b/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp +@@ -284,7 +284,7 @@ static bool InitMtlMediaWaExt(struct GfxDeviceInfo *devInfo, + + MEDIA_WR_WA(waTable, WaDisableSetObjectCapture, 1); + +- MEDIA_WR_WA(waTable, Wa_Vp9UnalignedHeight, 1); ++ MEDIA_WR_WA(waTable, Wa_Vp9UnalignedHeight, 0); + + MEDIA_WR_WA(waTable, Wa_15013355402, 1); + +@@ -337,4 +337,4 @@ static struct LinuxDeviceInit arlDeviceInit = + }; + + static bool arlDeviceRegister = DeviceInfoFactory:: +- RegisterDevice((uint32_t)IGFX_ARROWLAKE, &arlDeviceInit); +\ No newline at end of file ++ RegisterDevice((uint32_t)IGFX_ARROWLAKE, &arlDeviceInit); +-- +2.40.1 + diff --git a/recipes-multimedia/libva/files/0002-Add-VASurfaceAttribMemoryType-for-ACM.patch b/recipes-multimedia/libva/files/0002-Add-VASurfaceAttribMemoryType-for-ACM.patch deleted file mode 100644 index fecb82ca..00000000 --- a/recipes-multimedia/libva/files/0002-Add-VASurfaceAttribMemoryType-for-ACM.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 3f3b888445b7288aee231c906b655230301b6434 Mon Sep 17 00:00:00 2001 -From: "Soon, Thean Siew" -Date: Tue, 10 Oct 2023 12:55:37 +0000 -Subject: [PATCH 2/7] Add VASurfaceAttribMemoryType for ACM - -Upstream-Status: Backport [https://github.com/intel/media-driver/commit/15e137e706] - -Signed-off-by: Soon, Thean Siew ---- - media_driver/linux/Xe_M/ddi/media_libva_caps_dg2.cpp | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/media_driver/linux/Xe_M/ddi/media_libva_caps_dg2.cpp b/media_driver/linux/Xe_M/ddi/media_libva_caps_dg2.cpp -index d70523962..496068178 100644 ---- a/media_driver/linux/Xe_M/ddi/media_libva_caps_dg2.cpp -+++ b/media_driver/linux/Xe_M/ddi/media_libva_caps_dg2.cpp -@@ -1045,6 +1045,13 @@ VAStatus MediaLibvaCapsDG2::AddEncSurfaceAttributes( - attribList[numAttribs].flags = VA_SURFACE_ATTRIB_GETTABLE; - attribList[numAttribs].value.value.i = m_encMinHeight; - numAttribs++; -+ -+ attribList[numAttribs].type = VASurfaceAttribMemoryType; -+ attribList[numAttribs].value.type = VAGenericValueTypeInteger; -+ attribList[numAttribs].flags = VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE; -+ attribList[numAttribs].value.value.i = VA_SURFACE_ATTRIB_MEM_TYPE_VA | -+ VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2; -+ numAttribs++; - } - else - { --- -2.40.1 - diff --git a/recipes-multimedia/libva/files/0002-Force-ARGB-surface-to-tile4-for-ACM.patch b/recipes-multimedia/libva/files/0002-Force-ARGB-surface-to-tile4-for-ACM.patch new file mode 100644 index 00000000..df3d9805 --- /dev/null +++ b/recipes-multimedia/libva/files/0002-Force-ARGB-surface-to-tile4-for-ACM.patch @@ -0,0 +1,44 @@ +From 1580f01ec5ad5afdad58c39dded999494275be10 Mon Sep 17 00:00:00 2001 +From: Lim Siew Hoon +Date: Wed, 11 Oct 2023 15:36:21 +0800 +Subject: [PATCH 02/12] Force ARGB surface to tile4 for ACM + +Upstream-Status: Submitted [https://github.com/intel/media-driver/pull/1728] + +Signed-off-by: Soon, Thean Siew +Signed-off-by: Lim Siew Hoon +--- + media_driver/linux/common/ddi/media_libva_util.cpp | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/media_driver/linux/common/ddi/media_libva_util.cpp b/media_driver/linux/common/ddi/media_libva_util.cpp +index 63c173419..73be76366 100755 +--- a/media_driver/linux/common/ddi/media_libva_util.cpp ++++ b/media_driver/linux/common/ddi/media_libva_util.cpp +@@ -504,6 +504,7 @@ VAStatus DdiMediaUtil_AllocateSurface( + gmmCustomParams.Flags.Gpu.UnifiedAuxSurface = 0; + } + } ++ + break; + case TILING_X: + gmmCustomParams.Flags.Info.TiledX = true; +@@ -685,6 +686,15 @@ VAStatus DdiMediaUtil_AllocateSurface( + } + } + } ++ // There's no VAAPI interface for modifier query yet. As a workaround, always allocate ++ // RGB surface as tile4. ++ if ((format == Media_Format_A8R8G8B8 || ++ format == Media_Format_B10G10R10A2 | ++ format == Media_Format_A8B8G8R8 || ++ format == Media_Format_X8R8G8B8) && !MEDIA_IS_SKU(&mediaDrvCtx->SkuTable, FtrTileY)) ++ { ++ gmmParams.Flags.Info.Tile4 = true; ++ } + break; + case TILING_X: + gmmParams.Flags.Info.TiledX = true; +-- +2.40.1 + diff --git a/recipes-multimedia/libva/files/0003-Force-ARGB-surface-to-tile4-for-ACM.patch b/recipes-multimedia/libva/files/0003-Force-ARGB-surface-to-tile4-for-ACM.patch deleted file mode 100644 index 31a7be9c..00000000 --- a/recipes-multimedia/libva/files/0003-Force-ARGB-surface-to-tile4-for-ACM.patch +++ /dev/null @@ -1,44 +0,0 @@ -From a0149ae2dc69143406843302eb7e9e5338c54475 Mon Sep 17 00:00:00 2001 -From: Lim Siew Hoon -Date: Wed, 11 Oct 2023 15:36:21 +0800 -Subject: [PATCH 3/7] Force ARGB surface to tile4 for ACM - -Upstream-Status: Submitted [https://github.com/intel/media-driver/pull/1728] - -Signed-off-by: Soon, Thean Siew -Signed-off-by: Lim Siew Hoon ---- - media_driver/linux/common/ddi/media_libva_util.cpp | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/media_driver/linux/common/ddi/media_libva_util.cpp b/media_driver/linux/common/ddi/media_libva_util.cpp -index 59c02f145..f91f974cc 100755 ---- a/media_driver/linux/common/ddi/media_libva_util.cpp -+++ b/media_driver/linux/common/ddi/media_libva_util.cpp -@@ -504,6 +504,7 @@ VAStatus DdiMediaUtil_AllocateSurface( - gmmCustomParams.Flags.Gpu.UnifiedAuxSurface = 0; - } - } -+ - break; - case TILING_X: - gmmCustomParams.Flags.Info.TiledX = true; -@@ -685,6 +686,15 @@ VAStatus DdiMediaUtil_AllocateSurface( - } - } - } -+ // There's no VAAPI interface for modifier query yet. As a workaround, always allocate -+ // RGB surface as tile4. -+ if ((format == Media_Format_A8R8G8B8 || -+ format == Media_Format_B10G10R10A2 | -+ format == Media_Format_A8B8G8R8 || -+ format == Media_Format_X8R8G8B8) && !MEDIA_IS_SKU(&mediaDrvCtx->SkuTable, FtrTileY)) -+ { -+ gmmParams.Flags.Info.Tile4 = true; -+ } - break; - case TILING_X: - gmmParams.Flags.Info.TiledX = true; --- -2.40.1 - 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 new file mode 100644 index 00000000..59fff127 --- /dev/null +++ b/recipes-multimedia/libva/files/0004-Add-device-ID-for-ARL.patch @@ -0,0 +1,45 @@ +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/0004-Set-sRGB-color-space-for-non-video-wall-and-no-backg.patch b/recipes-multimedia/libva/files/0004-Set-sRGB-color-space-for-non-video-wall-and-no-backg.patch deleted file mode 100644 index 501bde3c..00000000 --- a/recipes-multimedia/libva/files/0004-Set-sRGB-color-space-for-non-video-wall-and-no-backg.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 9b74d435324cc61e1d63709e13e1ad755fa4ce63 Mon Sep 17 00:00:00 2001 -From: Lu-Anxiao -Date: Mon, 9 Oct 2023 20:47:44 +0800 -Subject: [PATCH 4/7] Set sRGB color space for non-video wall and no background - colorfill cases. - -* [VP] Set sRGB color space for non-video wall and no background colorfill cases. - -This solves the regression caused by -https://github.com/intel/media-driver/commit/a9c2df7b01c2f33775c676f5490ea274410e9db2. - -Upstream-Status: Backport [https://github.com/intel/media-driver/commit/509ab5f6c6d447575c61e32d323aa4e7aa212fbd] - -Signed-off-by: Lim Siew Hoon ---- - .../linux/common/vp/ddi/media_libva_vp.c | 18 +++++++++++++----- - .../linux/common/vp/ddi/ddi_vp_functions.cpp | 19 ++++++++++++++----- - 2 files changed, 27 insertions(+), 10 deletions(-) - -diff --git a/media_driver/linux/common/vp/ddi/media_libva_vp.c b/media_driver/linux/common/vp/ddi/media_libva_vp.c -index 3c7407249..dcff2555a 100644 ---- a/media_driver/linux/common/vp/ddi/media_libva_vp.c -+++ b/media_driver/linux/common/vp/ddi/media_libva_vp.c -@@ -1148,7 +1148,7 @@ DdiVp_SetProcPipelineParams( - - // Background Colorfill - // According to libva definition, if alpha in output background color is zero, then colorfill is not needed -- if ((pPipelineParam->output_background_color >> 24) != 0) -+ if ((pPipelineParam->output_background_color >> 24) != 0 || pVpHalTgtSurf->ColorSpace == CSpace_sRGB) - { - if (pVpHalRenderParams->pColorFillParams == nullptr) - { -@@ -1157,10 +1157,18 @@ DdiVp_SetProcPipelineParams( - - DDI_CHK_NULL(pVpHalRenderParams->pColorFillParams, "Null pColorFillParams.", VA_STATUS_ERROR_UNKNOWN); - -- // set background colorfill option -- pVpHalRenderParams->pColorFillParams->Color = pPipelineParam->output_background_color; -- pVpHalRenderParams->pColorFillParams->bYCbCr = false; -- pVpHalRenderParams->pColorFillParams->CSpace = CSpace_sRGB; -+ if (pVpHalTgtSurf->ColorSpace == CSpace_sRGB && (pPipelineParam->output_background_color >> 24) == 0) -+ { -+ // set color space for sRGB output -+ pVpHalRenderParams->pColorFillParams->CSpace = CSpace_sRGB; -+ } -+ else -+ { -+ // set background colorfill option -+ pVpHalRenderParams->pColorFillParams->Color = pPipelineParam->output_background_color; -+ pVpHalRenderParams->pColorFillParams->bYCbCr = false; -+ pVpHalRenderParams->pColorFillParams->CSpace = CSpace_sRGB; -+ } - }else - { - MOS_FreeMemAndSetNull(pVpHalRenderParams->pColorFillParams); -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 7ebad0b59..7c2e4a0e5 100644 ---- a/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp -+++ b/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp -@@ -2111,8 +2111,9 @@ 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) -+ if ((outBackGroundcolor >> 24) != 0 || vpHalRenderParams->pTarget[0]->ColorSpace == CSpace_sRGB) - { - if (vpHalRenderParams->pColorFillParams == nullptr) - { -@@ -2121,10 +2122,18 @@ VAStatus DdiVpFunctions::SetBackgroundColorfill( - - DDI_VP_CHK_NULL(vpHalRenderParams->pColorFillParams, "nullptr pColorFillParams.", VA_STATUS_ERROR_UNKNOWN); - -- // set background colorfill option -- vpHalRenderParams->pColorFillParams->Color = outBackGroundcolor; -- vpHalRenderParams->pColorFillParams->bYCbCr = false; -- vpHalRenderParams->pColorFillParams->CSpace = CSpace_sRGB; -+ 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; -+ } - } - else - { --- -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 new file mode 100644 index 00000000..a9cd2317 --- /dev/null +++ b/recipes-multimedia/libva/files/0005-Add-XR24-support-to-DMABuf.patch @@ -0,0 +1,34 @@ +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/0005-XRGB-force-to-do-swizzle-for-AVC-HEVC.patch b/recipes-multimedia/libva/files/0005-XRGB-force-to-do-swizzle-for-AVC-HEVC.patch deleted file mode 100644 index 3d02fef3..00000000 --- a/recipes-multimedia/libva/files/0005-XRGB-force-to-do-swizzle-for-AVC-HEVC.patch +++ /dev/null @@ -1,53 +0,0 @@ -From c2a7a53a71b252593fb31cba24cddf7a5f466ba1 Mon Sep 17 00:00:00 2001 -From: Vincent Cheah Beng Keat -Date: Wed, 18 Oct 2023 10:49:13 +0800 -Subject: [PATCH 5/7] XRGB force to do swizzle for AVC/HEVC - -This is to fix msdkh264enc/msdkh265enc incorrect encoded output when having BGRx input. - -Upstream-Status: Backport [https://github.com/intel/media-driver/commit/433068b0db298f9592880f25601449366b4aa8d3] - -Signed-off-by: Cheah, Vincent Beng Keat ---- - .../linux/common/codec/ddi/enc/ddi_encode_avc_specific.h | 1 + - .../linux/common/codec/ddi/enc/ddi_encode_hevc_specific.h | 6 ++++-- - 2 files changed, 5 insertions(+), 2 deletions(-) - -diff --git a/media_softlet/linux/common/codec/ddi/enc/ddi_encode_avc_specific.h b/media_softlet/linux/common/codec/ddi/enc/ddi_encode_avc_specific.h -index 057af4420..e4a1cbe58 100644 ---- a/media_softlet/linux/common/codec/ddi/enc/ddi_encode_avc_specific.h -+++ b/media_softlet/linux/common/codec/ddi/enc/ddi_encode_avc_specific.h -@@ -557,6 +557,7 @@ private: - inline bool NeedDisplayFormatSwizzle(DDI_MEDIA_SURFACE *rawSurface) - { - if (Media_Format_A8R8G8B8 == rawSurface->format || -+ Media_Format_X8R8G8B8 == rawSurface->format || - Media_Format_B10G10R10A2 == rawSurface->format) - { - return true; -diff --git a/media_softlet/linux/common/codec/ddi/enc/ddi_encode_hevc_specific.h b/media_softlet/linux/common/codec/ddi/enc/ddi_encode_hevc_specific.h -index 65483b43d..56e688e4a 100644 ---- a/media_softlet/linux/common/codec/ddi/enc/ddi_encode_hevc_specific.h -+++ b/media_softlet/linux/common/codec/ddi/enc/ddi_encode_hevc_specific.h -@@ -293,14 +293,16 @@ private: - bool ret = false; - - if (Media_Format_A8R8G8B8 == rawSurface->format || -- Media_Format_B10G10R10A2 == rawSurface->format) -+ Media_Format_X8R8G8B8 == rawSurface->format || -+ Media_Format_B10G10R10A2 == rawSurface->format) - { - ret = true; - } - - if (ret && - (Media_Format_A8R8G8B8 == reconSurface->format || -- Media_Format_B10G10R10A2 == reconSurface->format)) -+ Media_Format_X8R8G8B8 == reconSurface->format || -+ Media_Format_B10G10R10A2 == reconSurface->format)) - { - ret = false; - } --- -2.40.1 - diff --git a/recipes-multimedia/libva/files/0006-Add-DG2-DIDs.patch b/recipes-multimedia/libva/files/0006-Add-DG2-DIDs.patch deleted file mode 100644 index 2e3a91fe..00000000 --- a/recipes-multimedia/libva/files/0006-Add-DG2-DIDs.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 741d8692cee1a73a45a6cd819a52ed9716012d20 Mon Sep 17 00:00:00 2001 -From: JayYang -Date: Mon, 30 Oct 2023 13:37:49 +0800 -Subject: [PATCH 6/7] Add DG2 DIDs - -Add some device IDs for DG2. - -Upstream-Status: Backport [https://github.com/intel/media-driver/commit/e7ba5c82f59764ac6700f6ebeb0e6f459d85e27c] -Signed-off-by: Lim Siew Hoon ---- - media_driver/linux/Xe_M/ddi/media_sysinfo_xe.cpp | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/media_driver/linux/Xe_M/ddi/media_sysinfo_xe.cpp b/media_driver/linux/Xe_M/ddi/media_sysinfo_xe.cpp -index fe15b419c..7ff3527f7 100644 ---- a/media_driver/linux/Xe_M/ddi/media_sysinfo_xe.cpp -+++ b/media_driver/linux/Xe_M/ddi/media_sysinfo_xe.cpp -@@ -459,6 +459,18 @@ static bool dg2Gt4Device56B0 = DeviceInfoFactory:: - static bool dg2Gt4Device56B1 = DeviceInfoFactory:: - RegisterDevice(0x56B1, &dg2Gt4Info); - -+static bool dg2Gt4Device56BA = DeviceInfoFactory:: -+ RegisterDevice(0x56BA, &dg2Gt4Info); -+ -+static bool dg2Gt4Device56BB = DeviceInfoFactory:: -+ RegisterDevice(0x56BB, &dg2Gt4Info); -+ -+static bool dg2Gt4Device56BC = DeviceInfoFactory:: -+ RegisterDevice(0x56BC, &dg2Gt4Info); -+ -+static bool dg2Gt4Device56BD = DeviceInfoFactory:: -+ RegisterDevice(0x56BD, &dg2Gt4Info); -+ - static bool dg2Gt4Device56B2 = DeviceInfoFactory:: - RegisterDevice(0x56B2, &dg2Gt4Info); - --- -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 new file mode 100644 index 00000000..5b04201a --- /dev/null +++ b/recipes-multimedia/libva/files/0006-add-INTEL-MEDIA-ALLOC-refineE-to-specify-the-memory-.patch @@ -0,0 +1,214 @@ +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 new file mode 100644 index 00000000..459ff490 --- /dev/null +++ b/recipes-multimedia/libva/files/0007-Skip-report-keys.patch @@ -0,0 +1,78 @@ +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 new file mode 100644 index 00000000..ece5e00b --- /dev/null +++ b/recipes-multimedia/libva/files/0008-Limit-INTEL-MEDIA-ALLOC-MODE-to-MTL-and-ARL-only.patch @@ -0,0 +1,255 @@ +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 new file mode 100644 index 00000000..8ee7ef14 --- /dev/null +++ b/recipes-multimedia/libva/files/0009-Skip-cache-bucket-realloc-for-default-mode-0.patch @@ -0,0 +1,33 @@ +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 new file mode 100644 index 00000000..0100df77 --- /dev/null +++ b/recipes-multimedia/libva/files/0010-Fix-failed-4k-video-wall-test-case-and-color-corrupt.patch @@ -0,0 +1,195 @@ +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 new file mode 100644 index 00000000..2f4aec1e --- /dev/null +++ b/recipes-multimedia/libva/files/0011-Disable-422H-format-output.patch @@ -0,0 +1,33 @@ +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 new file mode 100644 index 00000000..1be9139d --- /dev/null +++ b/recipes-multimedia/libva/files/0012-Decode-Fix-AVC-decode-SFC-4K-hang-issue.patch @@ -0,0 +1,32 @@ +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/intel-media-driver_23.3.5.bb b/recipes-multimedia/libva/intel-media-driver_23.3.5.bb deleted file mode 100644 index c91c7417..00000000 --- a/recipes-multimedia/libva/intel-media-driver_23.3.5.bb +++ /dev/null @@ -1,56 +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-Add-VASurfaceAttribMemoryType-for-ACM.patch \ - file://0003-Force-ARGB-surface-to-tile4-for-ACM.patch \ - file://0004-Set-sRGB-color-space-for-non-video-wall-and-no-backg.patch \ - file://0005-XRGB-force-to-do-swizzle-for-AVC-HEVC.patch \ - file://0006-Add-DG2-DIDs.patch \ - " - -SRCREV = "0f36979420a33bf12d17fa939af8d16b36ef8fcd" -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_23.4.3.bb b/recipes-multimedia/libva/intel-media-driver_23.4.3.bb new file mode 100644 index 00000000..6513d574 --- /dev/null +++ b/recipes-multimedia/libva/intel-media-driver_23.4.3.bb @@ -0,0 +1,61 @@ +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/ \ + " -- cgit v1.2.3-54-g00ecf