Removed patches already merged:
 - 0001-ARGB-force-to-tile4.patch
 - 0001-Fix-FC-Corruption-When-Blending-without-Colorfill-in.patch
 - 0001-Fix-FC-Corruption-When-Blending-without-Colorfill.patch
 - 0001-Force-to-render-path-according-to-app-setting.patch
 - 0002-Add-DRM-format-mappings-for-JPEG-decoder-output.patch

Rebased patches:
 - 0001-Disable-VP9-padding-on-MTL.patch
 - 0004-Set-sRGB-color-space-for-non-video-wall-and-no-backg.patch

Added code fixed and new DG2 device id support:
 - 0002-Add-VASurfaceAttribMemoryType-for-ACM.patch
 - 0003-Force-ARGB-surface-to-tile4-for-ACM.patch
 - 0005-XRGB-force-to-do-swizzle-for-AVC-HEVC.patch
 - 0006-Add-DG2-DIDs.patch

Release notes:
https://github.com/intel/media-driver/releases/tag/intel-media-23.3.5

Signed-off-by: Lim Siew Hoon <[email protected]>
---
 .../files/0001-ARGB-force-to-tile4.patch      |  35 ------
 ... => 0001-Disable-VP9-padding-on-MTL.patch} |  20 ++--
 ...n-When-Blending-without-Colorfill-in.patch |  96 -----------------
 ...tion-When-Blending-without-Colorfill.patch |  79 --------------
 ...render-path-according-to-app-setting.patch |  54 ----------
 ...mat-mappings-for-JPEG-decoder-output.patch | 102 ------------------
 ...dd-VASurfaceAttribMemoryType-for-ACM.patch |  34 ++++++
 .../0002-Add-mocs-index-in-patch-list.patch   |  31 ------
 ...-mappings-for-JPEG-output-to-softlet.patch |  81 --------------
 ...-Force-ARGB-surface-to-tile4-for-ACM.patch |  45 ++++++++
 .../files/0003-fix-vdsfc-csc-issue.patch      |  88 ---------------
 ...ace-for-non-video-wall-and-no-backg.patch} |  17 ++-
 .../files/0004-XRGB-force-to-tile4.patch      |  35 ------
 ...RGB-force-to-do-swizzle-for-AVC-HEVC.patch |  54 ++++++++++
 .../libva/files/0006-Add-DG2-DIDs.patch       |  39 +++++++
 ...23.2.4.bb => intel-media-driver_23.3.5.bb} |  19 ++--
 16 files changed, 197 insertions(+), 632 deletions(-)
 delete mode 100644 
recipes-multimedia/libva/files/0001-ARGB-force-to-tile4.patch
 rename recipes-multimedia/libva/files/{0004-Disable-vp9-padding-on-mtl.patch 
=> 0001-Disable-VP9-padding-on-MTL.patch} (60%)
 delete mode 100644 
recipes-multimedia/libva/files/0001-Fix-FC-Corruption-When-Blending-without-Colorfill-in.patch
 delete mode 100644 
recipes-multimedia/libva/files/0001-Fix-FC-Corruption-When-Blending-without-Colorfill.patch
 delete mode 100644 
recipes-multimedia/libva/files/0001-Force-to-render-path-according-to-app-setting.patch
 delete mode 100644 
recipes-multimedia/libva/files/0002-Add-DRM-format-mappings-for-JPEG-decoder-output.patch
 create mode 100644 
recipes-multimedia/libva/files/0002-Add-VASurfaceAttribMemoryType-for-ACM.patch
 delete mode 100644 
recipes-multimedia/libva/files/0002-Add-mocs-index-in-patch-list.patch
 delete mode 100644 
recipes-multimedia/libva/files/0003-Add-DRM-format-mappings-for-JPEG-output-to-softlet.patch
 create mode 100644 
recipes-multimedia/libva/files/0003-Force-ARGB-surface-to-tile4-for-ACM.patch
 delete mode 100644 
recipes-multimedia/libva/files/0003-fix-vdsfc-csc-issue.patch
 rename 
recipes-multimedia/libva/files/{0001-Set-sRGB-color-space-for-non-video-wall-and-no-backg.patch
 => 0004-Set-sRGB-color-space-for-non-video-wall-and-no-backg.patch} (88%)
 delete mode 100644 
recipes-multimedia/libva/files/0004-XRGB-force-to-tile4.patch
 create mode 100644 
recipes-multimedia/libva/files/0005-XRGB-force-to-do-swizzle-for-AVC-HEVC.patch
 create mode 100644 recipes-multimedia/libva/files/0006-Add-DG2-DIDs.patch
 rename recipes-multimedia/libva/{intel-media-driver_23.2.4.bb => 
intel-media-driver_23.3.5.bb} (66%)

diff --git a/recipes-multimedia/libva/files/0001-ARGB-force-to-tile4.patch 
b/recipes-multimedia/libva/files/0001-ARGB-force-to-tile4.patch
deleted file mode 100644
index 3ac0685d..00000000
--- a/recipes-multimedia/libva/files/0001-ARGB-force-to-tile4.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From f172dc91c054bb6377b733db12d9210e5f73e7b2 Mon Sep 17 00:00:00 2001
-From: JayYang <[email protected]>
-Date: Fri, 7 Jul 2023 13:40:14 +0800
-Subject: [PATCH 1/5] ARGB force to tile4
-
-Gmm may create tile64 ARGB surfaces, whereas no tile64 modifier is defined to 
export such surfaces.
-Force ARGB, ABGR, A2RGB10 surfaces to tile4 as WA.
-
-upstream-status: backport
-Backport from upstream intel-media-driver:
-https://github.com/intel/media-driver/commit/bd5bde0d8a0c0a6672c3586ee6727eff3ca9bc21
----
- media_softlet/linux/common/ddi/media_libva_util_next.cpp | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/media_softlet/linux/common/ddi/media_libva_util_next.cpp 
b/media_softlet/linux/common/ddi/media_libva_util_next.cpp
-index e3c49eef8..1852e59d2 100644
---- a/media_softlet/linux/common/ddi/media_libva_util_next.cpp
-+++ b/media_softlet/linux/common/ddi/media_libva_util_next.cpp
-@@ -647,6 +647,12 @@ VAStatus 
MediaLibvaUtilNext::GenerateGmmParamsForInternalSurface(
-                     }
-                 }
-             }
-+            // For ARGB surface, always allocate it as tile4.
-+            // This is a WA for ExportSurfaceHandle because modifer for 
tile64 isn't defined.
-+            if ((params.format == Media_Format_A8R8G8B8 || params.format == 
Media_Format_B10G10R10A2 || params.format == Media_Format_A8B8G8R8) && 
!MEDIA_IS_SKU(&mediaDrvCtx->SkuTable, FtrTileY))
-+            {
-+                gmmParams.Flags.Info.Tile4 = true;
-+            }
-             break;
-         case I915_TILING_X:
-             gmmParams.Flags.Info.TiledX    = true;
--- 
-2.40.1
-
diff --git 
a/recipes-multimedia/libva/files/0004-Disable-vp9-padding-on-mtl.patch 
b/recipes-multimedia/libva/files/0001-Disable-VP9-padding-on-MTL.patch
similarity index 60%
rename from recipes-multimedia/libva/files/0004-Disable-vp9-padding-on-mtl.patch
rename to recipes-multimedia/libva/files/0001-Disable-VP9-padding-on-MTL.patch
index 075f2350..b3740f8a 100644
--- a/recipes-multimedia/libva/files/0004-Disable-vp9-padding-on-mtl.patch
+++ b/recipes-multimedia/libva/files/0001-Disable-VP9-padding-on-MTL.patch
@@ -1,16 +1,18 @@
-From ea2ae0cd656a17eee9897aa1bf4e61b0d05ec347 Mon Sep 17 00:00:00 2001
-From: Lim Siew Hoon <[email protected]>
-Date: Tue, 5 Sep 2023 16:13:42 +0800
-Subject: [PATCH 4/4] Disable vp9 padding on mtl.
+From d9ea15202df23be0ead2157392ca347c42d28ce0 Mon Sep 17 00:00:00 2001
+From: LeyuYao <[email protected]>
+Date: Thu, 7 Sep 2023 16:50:46 +0800
+Subject: [PATCH 1/7] Disable VP9 padding on MTL
 
-Upstream-Status: Submitted [https://github.com/intel/media-driver/pull/1720]
-Signed-off-by: Lim Siew Hoon <[email protected]>
+This is impact performance on large solution with not 8-aligned height
+
+upstream-status: backport
+https://github.com/intel/media-driver/commit/f34b7d0cd
 ---
  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 679ca45f6..0e6837034 100644
+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,
@@ -20,8 +22,8 @@ index 679ca45f6..0e6837034 100644
 -    MEDIA_WR_WA(waTable, Wa_Vp9UnalignedHeight, 1);
 +    MEDIA_WR_WA(waTable, Wa_Vp9UnalignedHeight, 0);
  
-     return true;
- }
+     MEDIA_WR_WA(waTable, Wa_15013355402, 1);
+ 
 -- 
 2.40.1
 
diff --git 
a/recipes-multimedia/libva/files/0001-Fix-FC-Corruption-When-Blending-without-Colorfill-in.patch
 
b/recipes-multimedia/libva/files/0001-Fix-FC-Corruption-When-Blending-without-Colorfill-in.patch
deleted file mode 100644
index 0b72cc03..00000000
--- 
a/recipes-multimedia/libva/files/0001-Fix-FC-Corruption-When-Blending-without-Colorfill-in.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From ae912b6550af4808436fabc7cae3278a20a955b6 Mon Sep 17 00:00:00 2001
-From: Gu_Peiyi <[email protected]>
-Date: Tue, 12 Sep 2023 15:06:17 +0800
-Subject: [PATCH] Fix FC Corruption When Blending without Colorfill in Legacy
- Path
-
-Fix fc will show corruption when alignedRect is bigger than 
DestYBottomRightLayer0/DestXBottomRightLayer0 and not set color fill
-
-Upstream-Status: Backport 
[https://github.com/intel/media-driver/commit/197841a545b1eaf7f202e2d057a5a6395be46061]
-Signed-off-by: Lim Siew Hoon <[email protected]>
----
- .../common/vp/hal/vphal_render_composite.cpp  | 40 +++++++++++++++++++
- .../common/vp/hal/vphal_render_composite.h    |  9 +++++
- 2 files changed, 49 insertions(+)
-
-diff --git a/media_driver/agnostic/common/vp/hal/vphal_render_composite.cpp 
b/media_driver/agnostic/common/vp/hal/vphal_render_composite.cpp
-index dd5025f32..0b0b6c432 100644
---- a/media_driver/agnostic/common/vp/hal/vphal_render_composite.cpp
-+++ b/media_driver/agnostic/common/vp/hal/vphal_render_composite.cpp
-@@ -1993,6 +1993,8 @@ MOS_STATUS CompositeState::RenderMultiPhase(
-     for (index = 0, phase = 0; (!bLastPhase); phase++)
-     {
-         bool                   disableAvsSampler = false;
-+        // AdjustParamsBasedOnFcLimit must be called before 
IsDisableAVSSampler in legacy path, or it will miss the AVS WA
-+        bool                   adjustParamBasedOnFcLimit = 
AdjustParamsBasedOnFcLimit(pcRenderParams);
-         VPHAL_COMPOSITE_PARAMS  CompositeParams;
-         // Prepare compositing structure
-         ResetCompParams(&CompositeParams);
-@@ -6103,6 +6105,44 @@ bool CompositeState::RenderBufferComputeWalker(
-     return bResult;
- }
- 
-+//!
-+//! \brief    Adjust Params Based On Fc Limit
-+//! \param    [in,out] pCompParams
-+//!           Pointer to Composite parameters.
-+//! \return   bool
-+//!
-+bool CompositeState::AdjustParamsBasedOnFcLimit(
-+    PCVPHAL_RENDER_PARAMS pcRenderParam)
-+{
-+    //The kernel is using the rectangle data to calculate mask. If the 
rectangle configuration does not comply to kernel requirement, the mask 
calculation will be incorrect and will see corruption.
-+    if (pcRenderParam->pColorFillParams == nullptr &&
-+        pcRenderParam->uSrcCount == 1 &&
-+        pcRenderParam->uDstCount == 1 &&
-+        pcRenderParam->pSrc[0] != nullptr &&
-+        pcRenderParam->pTarget[0] != nullptr)
-+    {
-+         if (pcRenderParam->pSrc[0]->rcDst.top >= 
pcRenderParam->pTarget[0]->rcDst.top &&
-+             pcRenderParam->pSrc[0]->rcDst.left >= 
pcRenderParam->pTarget[0]->rcDst.left &&
-+             pcRenderParam->pSrc[0]->rcDst.right <= 
pcRenderParam->pTarget[0]->rcDst.right &&
-+             pcRenderParam->pSrc[0]->rcDst.bottom <= 
pcRenderParam->pTarget[0]->rcDst.bottom)
-+         {
-+            VPHAL_RENDER_NORMALMESSAGE("Render Path : 1 Surface to 1 Surface 
FC Composition. ColorFill is Disabled. Output Dst is bigger than Input Dst. 
Will make Output Dst become Input Dst to Avoid FC Corruption. (%d %d %d %d) -> 
(%d %d %d %d)",
-+                pcRenderParam->pTarget[0]->rcDst.left,
-+                pcRenderParam->pTarget[0]->rcDst.top,
-+                pcRenderParam->pTarget[0]->rcDst.right,
-+                pcRenderParam->pTarget[0]->rcDst.bottom,
-+                pcRenderParam->pSrc[0]->rcDst.left,
-+                pcRenderParam->pSrc[0]->rcDst.top,
-+                pcRenderParam->pSrc[0]->rcDst.right,
-+                pcRenderParam->pSrc[0]->rcDst.bottom);
-+            pcRenderParam->pTarget[0]->rcSrc = pcRenderParam->pSrc[0]->rcDst;
-+            pcRenderParam->pTarget[0]->rcDst = pcRenderParam->pSrc[0]->rcDst;
-+            return true;
-+         }
-+    }
-+    return false;
-+}
-+
- //!
- //! \brief    Calculate Composite parameter and render data
- //! \param    [in] pCompParams
-diff --git a/media_driver/agnostic/common/vp/hal/vphal_render_composite.h 
b/media_driver/agnostic/common/vp/hal/vphal_render_composite.h
-index b3c2820c6..3838e89c0 100644
---- a/media_driver/agnostic/common/vp/hal/vphal_render_composite.h
-+++ b/media_driver/agnostic/common/vp/hal/vphal_render_composite.h
-@@ -497,6 +497,15 @@ protected:
-         PVPHAL_RENDERING_DATA_COMPOSITE pRenderingData,
-         bool*                           pbColorfill);
- 
-+    //!
-+    //! \brief    Adjust Params Based On Fc Limit
-+    //! \param    [in,out] PCVPHAL_RENDER_PARAMS
-+    //!           Pointer to pcRenderParam parameters.
-+    //! \return   bool
-+    //!
-+    bool AdjustParamsBasedOnFcLimit(
-+        PCVPHAL_RENDER_PARAMS pcRenderParam);
-+
-     //!
-     //! \brief    Set Sampler AVS parameters
-     //! \param    [in] pRenderingData
--- 
-2.40.1
-
diff --git 
a/recipes-multimedia/libva/files/0001-Fix-FC-Corruption-When-Blending-without-Colorfill.patch
 
b/recipes-multimedia/libva/files/0001-Fix-FC-Corruption-When-Blending-without-Colorfill.patch
deleted file mode 100644
index 620d0550..00000000
--- 
a/recipes-multimedia/libva/files/0001-Fix-FC-Corruption-When-Blending-without-Colorfill.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From 8da35f42a54ad63cbbe0362fc9dff37552d94c08 Mon Sep 17 00:00:00 2001
-From: Gu_Peiyi <[email protected]>
-Date: Wed, 6 Sep 2023 14:42:57 +0800
-Subject: [PATCH] Fix FC Corruption When Blending without Colorfill
-
-Fix fc will show corruption when alignedRect is bigger than 
DestYBottomRightLayer0/DestXBottomRightLayer0 and not set color fill
-
-Upstream-Status: Backport 
[https://github.com/intel/media-driver/commit/5cdd94ba90bcd8174f53af2a4e9a2f4bbca2533a]
-Signed-off-by: Lim Siew Hoon <[email protected]>
----
- .../common/vp/hal/features/vp_fc_filter.cpp   | 35 +++++++++++++++++++
- .../common/vp/hal/features/vp_fc_filter.h     |  2 ++
- 2 files changed, 37 insertions(+)
-
-diff --git a/media_softlet/agnostic/common/vp/hal/features/vp_fc_filter.cpp 
b/media_softlet/agnostic/common/vp/hal/features/vp_fc_filter.cpp
-index 66e1ad8fb..5d741e80c 100644
---- a/media_softlet/agnostic/common/vp/hal/features/vp_fc_filter.cpp
-+++ b/media_softlet/agnostic/common/vp/hal/features/vp_fc_filter.cpp
-@@ -213,9 +213,44 @@ MOS_STATUS VpFcFilter::InitCompParams(VP_COMPOSITE_PARAMS 
&compParams, SwFilterP
-     return MOS_STATUS_SUCCESS;
- }
- 
-+MOS_STATUS VpFcFilter::AdjustParamsBasedOnFcLimit(VP_COMPOSITE_PARAMS 
&compParams)
-+{
-+    //The kernel is using the rectangle data to calculate mask. If the 
rectangle configuration does not comply to kernel requirement, the mask 
calculation will be incorrect and will see corruption.
-+    if (compParams.pColorFillParams == nullptr &&
-+        compParams.sourceCount == 1 &&
-+        compParams.targetCount == 1 &&
-+        compParams.target[0].surf != nullptr &&
-+        compParams.source[0].surf != nullptr)
-+    {
-+        if (compParams.target[0].surf->rcDst.top <= 
compParams.source[0].surf->rcDst.top &&
-+            compParams.target[0].surf->rcDst.left <= 
compParams.source[0].surf->rcDst.left &&
-+            compParams.target[0].surf->rcDst.right >= 
compParams.source[0].surf->rcDst.right &&
-+            compParams.target[0].surf->rcDst.bottom >= 
compParams.source[0].surf->rcDst.bottom)
-+        {
-+            VP_RENDER_NORMALMESSAGE("Render Path : 1 Surface to 1 Surface FC 
Composition. ColorFill is Disabled. Output Dst is bigger than Input Dst. Will 
make Output Dst become Input Dst to Avoid FC Corruption. (%d %d %d %d) -> (%d 
%d %d %d)",
-+                compParams.target[0].surf->rcDst.left,
-+                compParams.target[0].surf->rcDst.top,
-+                compParams.target[0].surf->rcDst.right,
-+                compParams.target[0].surf->rcDst.bottom,
-+                compParams.source[0].surf->rcDst.left,
-+                compParams.source[0].surf->rcDst.top,
-+                compParams.source[0].surf->rcDst.right,
-+                compParams.source[0].surf->rcDst.bottom);
-+            compParams.target[0].surf->rcSrc = 
compParams.source[0].surf->rcDst;
-+            compParams.target[0].surf->rcDst = 
compParams.source[0].surf->rcDst;
-+        }
-+    }
-+
-+    return MOS_STATUS_SUCCESS;
-+}
-+
-+
- MOS_STATUS VpFcFilter::CalculateCompParams(VP_COMPOSITE_PARAMS &compParams)
- {
-     int layerCount = 0;
-+
-+    VP_RENDER_CHK_STATUS_RETURN(AdjustParamsBasedOnFcLimit(compParams));
-+
-     for (uint32_t i = 0; i < compParams.sourceCount; ++i)
-     {
-         VP_FC_LAYER *layer = &compParams.source[i];
-diff --git a/media_softlet/agnostic/common/vp/hal/features/vp_fc_filter.h 
b/media_softlet/agnostic/common/vp/hal/features/vp_fc_filter.h
-index d64c22806..94c6a1dbc 100644
---- a/media_softlet/agnostic/common/vp/hal/features/vp_fc_filter.h
-+++ b/media_softlet/agnostic/common/vp/hal/features/vp_fc_filter.h
-@@ -71,6 +71,8 @@ protected:
-         float &fStepX, float &fStepY);
-     MHW_SAMPLER_FILTER_MODE Get3DSamperFilterMode(VPHAL_SCALING_MODE 
scalingMode);
- 
-+    MOS_STATUS AdjustParamsBasedOnFcLimit(VP_COMPOSITE_PARAMS &compParams);
-+
-     SwFilterPipe            *m_executedPipe = nullptr;
-     PRENDER_FC_PARAMS       m_renderFcParams = nullptr;
- 
--- 
-2.40.1
-
diff --git 
a/recipes-multimedia/libva/files/0001-Force-to-render-path-according-to-app-setting.patch
 
b/recipes-multimedia/libva/files/0001-Force-to-render-path-according-to-app-setting.patch
deleted file mode 100644
index a6f5dbb3..00000000
--- 
a/recipes-multimedia/libva/files/0001-Force-to-render-path-according-to-app-setting.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From bfc77f3476a406600e05e3bfa5e289a94bf58aef Mon Sep 17 00:00:00 2001
-From: JayYang <[email protected]>
-Date: Fri, 4 Aug 2023 12:03:51 +0800
-Subject: [PATCH 1/4] Force to render path according to app setting
-
-If apps set VA flag VA_PROC_PIPELINE_FAST, force workload to render.
-
-Upstream-Status: Backport 
[https://github.com/intel/media-driver/commit/00d560ba561f57b8be85c41a791e6db05e1743e9]
-Signed-off-by: Lim Siew Hoon <[email protected]>
----
- .../linux/common/vp/ddi/ddi_vp_functions.cpp  | 22 +++++++++----------
- 1 file changed, 10 insertions(+), 12 deletions(-)
-
-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 89da5239f..fa02bf147 100644
---- a/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp
-+++ b/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp
-@@ -3991,23 +3991,21 @@ VAStatus DdiVpFunctions::DdiSetProcPipelineParams(
-     }
- #endif  //(_DEBUG || _RELEASE_INTERNAL)
- 
--    // Set stream type using pipeline_flags VA_PROC_PIPELINE_FAST flag
-     // Currently we only support 1 primary surface in VP
--    if (pipelineParam->pipeline_flags & VA_PROC_PIPELINE_FAST)
-+    if (vpCtx->iPriSurfs < VP_MAX_PRIMARY_SURFS)
-     {
--        vpHalSrcSurf->SurfType = SURF_IN_SUBSTREAM;
-+        vpHalSrcSurf->SurfType = SURF_IN_PRIMARY;
-+        vpCtx->iPriSurfs++;
-     }
-     else
-     {
--        if (vpCtx->iPriSurfs < VP_MAX_PRIMARY_SURFS)
--        {
--            vpHalSrcSurf->SurfType = SURF_IN_PRIMARY;
--            vpCtx->iPriSurfs++;
--        }
--        else
--        {
--            vpHalSrcSurf->SurfType = SURF_IN_SUBSTREAM;
--        }
-+        vpHalSrcSurf->SurfType = SURF_IN_SUBSTREAM;
-+    }
-+
-+    // Set workload path using pipeline_flags VA_PROC_PIPELINE_FAST flag
-+    if (pipelineParam->pipeline_flags & VA_PROC_PIPELINE_FAST)
-+    {
-+        vpHalRenderParams->bForceToRender = true;
-     }
- 
-     // Set src rect
--- 
-2.40.1
-
diff --git 
a/recipes-multimedia/libva/files/0002-Add-DRM-format-mappings-for-JPEG-decoder-output.patch
 
b/recipes-multimedia/libva/files/0002-Add-DRM-format-mappings-for-JPEG-decoder-output.patch
deleted file mode 100644
index 423614ac..00000000
--- 
a/recipes-multimedia/libva/files/0002-Add-DRM-format-mappings-for-JPEG-decoder-output.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From ea6cd2db43bab97744884001e0d98ba2ff5d3903 Mon Sep 17 00:00:00 2001
-From: Philip Langdale <[email protected]>
-Date: Sat, 5 Aug 2023 11:46:26 +0800
-Subject: [PATCH 2/4] Add DRM format mappings for JPEG decoder output
-
-The output formats from the JPEG decoder are currently not included
-in the DRM format mapping functions. This means that any attempt to
-call vaExportSurface on JPEG images will fail.
-
-However, there is no functional gap beyond the missing mappings, so if
-we add them in, exporting will then work correctly.
-
-The four formats in question are IMC3, 422H, 422V, and 444P.
-
-* 422H and 444P have trivial 1:1 mappings.
-* IMC3 can be treated the same as I420, because the only difference is
-  the chroma pitch, and that's explicitly set in the descriptor
-* 422V (aka 440P) has the same memory layout as 422H - it's just a
-  difference in how the consumer handle the chroma
-
-I also added the missing XYUV composite object mapping - it was already
-present for separate planes.
-
-Tested with ffmpeg+mpv.
-
-Upstream-Status: Backport 
[https://github.com/intel/media-driver/commit/c7cd5a68315674d44ac97ec7cc78856fa90b8036]
-Signed-off-by: Lim Siew Hoon <[email protected]>
----
- media_driver/linux/common/ddi/media_libva.cpp | 21 ++++++++++++++++++-
- 1 file changed, 20 insertions(+), 1 deletion(-)
-
-diff --git a/media_driver/linux/common/ddi/media_libva.cpp 
b/media_driver/linux/common/ddi/media_libva.cpp
-index af35be841..1706138a1 100755
---- a/media_driver/linux/common/ddi/media_libva.cpp
-+++ b/media_driver/linux/common/ddi/media_libva.cpp
-@@ -6981,8 +6981,12 @@ static uint32_t 
DdiMedia_GetDrmFormatOfSeparatePlane(uint32_t fourcc, int plane)
-         {
-         case VA_FOURCC_NV12:
-         case VA_FOURCC_I420:
-+        case VA_FOURCC_IMC3:
-         case VA_FOURCC_YV12:
-         case VA_FOURCC_YV16:
-+        case VA_FOURCC_422H:
-+        case VA_FOURCC_422V:
-+        case VA_FOURCC_444P:
-         case VA_FOURCC_Y800:
-         case VA_FOURCC_RGBP:
-         case VA_FOURCC_BGRP:
-@@ -7055,8 +7059,12 @@ static uint32_t 
DdiMedia_GetDrmFormatOfSeparatePlane(uint32_t fourcc, int plane)
-         case VA_FOURCC_NV12:
-             return DRM_FORMAT_GR88;
-         case VA_FOURCC_I420:
-+        case VA_FOURCC_IMC3:
-         case VA_FOURCC_YV12:
-         case VA_FOURCC_YV16:
-+        case VA_FOURCC_422H:
-+        case VA_FOURCC_422V:
-+        case VA_FOURCC_444P:
-         case VA_FOURCC_RGBP:
-         case VA_FOURCC_BGRP:
-             return DRM_FORMAT_R8;
-@@ -7070,7 +7078,6 @@ static uint32_t 
DdiMedia_GetDrmFormatOfSeparatePlane(uint32_t fourcc, int plane)
-     }
-     return 0;
- }
--
- static uint32_t DdiMedia_GetDrmFormatOfCompositeObject(uint32_t fourcc)
- {
-     switch (fourcc)
-@@ -7079,10 +7086,18 @@ static uint32_t 
DdiMedia_GetDrmFormatOfCompositeObject(uint32_t fourcc)
-         return DRM_FORMAT_NV12;
-     case VA_FOURCC_I420:
-         return DRM_FORMAT_YUV420;
-+    case VA_FOURCC_IMC3:
-+        return DRM_FORMAT_YUV420;
-     case VA_FOURCC_YV12:
-         return DRM_FORMAT_YVU420;
-     case VA_FOURCC_YV16:
-         return DRM_FORMAT_YVU422;
-+    case VA_FOURCC_422H:
-+        return DRM_FORMAT_YUV422;
-+    case VA_FOURCC_422V:
-+        return DRM_FORMAT_YUV422;
-+    case VA_FOURCC_444P:
-+        return DRM_FORMAT_YUV444;
-     case VA_FOURCC_YUY2:
-         return DRM_FORMAT_YUYV;
-     case VA_FOURCC_YVYU:
-@@ -7093,6 +7108,10 @@ static uint32_t 
DdiMedia_GetDrmFormatOfCompositeObject(uint32_t fourcc)
-         return DRM_FORMAT_UYVY;
-     case VA_FOURCC_AYUV:
-         return DRM_FORMAT_AYUV;
-+#if VA_CHECK_VERSION(1, 13, 0)
-+    case VA_FOURCC_XYUV:
-+        return DRM_FORMAT_XYUV8888;
-+#endif
-     case VA_FOURCC_Y210:
-         return DRM_FORMAT_Y210;
- #if VA_CHECK_VERSION(1, 9, 0)
--- 
-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
new file mode 100644
index 00000000..cda75cf0
--- /dev/null
+++ 
b/recipes-multimedia/libva/files/0002-Add-VASurfaceAttribMemoryType-for-ACM.patch
@@ -0,0 +1,34 @@
+From 3f3b888445b7288aee231c906b655230301b6434 Mon Sep 17 00:00:00 2001
+From: "Soon, Thean Siew" <[email protected]>
+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 <[email protected]>
+---
+ 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-Add-mocs-index-in-patch-list.patch 
b/recipes-multimedia/libva/files/0002-Add-mocs-index-in-patch-list.patch
deleted file mode 100644
index 756d47d9..00000000
--- a/recipes-multimedia/libva/files/0002-Add-mocs-index-in-patch-list.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 80c5c6e6e671d61eae16a53fd36442993813609f Mon Sep 17 00:00:00 2001
-From: LeyuYao <[email protected]>
-Date: Mon, 3 Jul 2023 00:58:09 +0800
-Subject: [PATCH 2/5] Add mocs index in patch list
-
-For linux usage
-
-upstream-status: backport
-
-Backport from upstream media-driver:
-https://github.com/intel/media-driver/commit/26d5f57cad88df823164944ad496507d22a50fb1
----
- media_softlet/agnostic/common/hw/mhw_utilities_next.cpp | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/media_softlet/agnostic/common/hw/mhw_utilities_next.cpp 
b/media_softlet/agnostic/common/hw/mhw_utilities_next.cpp
-index a9db7bf95..4db4e1f66 100644
---- a/media_softlet/agnostic/common/hw/mhw_utilities_next.cpp
-+++ b/media_softlet/agnostic/common/hw/mhw_utilities_next.cpp
-@@ -290,6 +290,8 @@ MOS_STATUS Mhw_AddResourceToCmd_PatchList(
-     // Offset and command LSB parameters
-     dwOffset = pParams->dwOffset | ((*pParams->pdwCmd) & ((1 << dwLsbNum) - 
1));
- 
-+    Mhw_SetMocsTableIndex(pOsInterface, pParams->presResource, 
pParams->mocsParams);
-+    
-     if (pParams->dwOffsetInSSH > 0)
-     {
-         // Calculate the patch offset to command buffer
--- 
-2.40.1
-
diff --git 
a/recipes-multimedia/libva/files/0003-Add-DRM-format-mappings-for-JPEG-output-to-softlet.patch
 
b/recipes-multimedia/libva/files/0003-Add-DRM-format-mappings-for-JPEG-output-to-softlet.patch
deleted file mode 100644
index 26bd9931..00000000
--- 
a/recipes-multimedia/libva/files/0003-Add-DRM-format-mappings-for-JPEG-output-to-softlet.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From 8839e41fd18f7ed695e912ac0720c824df3905d6 Mon Sep 17 00:00:00 2001
-From: Philip Langdale <[email protected]>
-Date: Wed, 30 Aug 2023 09:34:58 -0700
-Subject: [PATCH 3/4] Add DRM format mappings for JPEG output to softlet
-
-This is the softlet equivalent of my previous change to add DRM format
-mappings for the JPEG decoder output formats to the legacy code path.
-
-Tested compilation, but don't have the hardware to test at runtime.
-
-Upstream-Status: Backport 
[https://github.com/intel/media-driver/commit/ce81beded8b791d24473a173e53ae399f6a6a059]
-Signed-off-by: Lim Siew Hoon <[email protected]>
----
- .../common/ddi/media_libva_interface_next.cpp | 22 +++++++++++++++++++
- 1 file changed, 22 insertions(+)
-
-diff --git a/media_softlet/linux/common/ddi/media_libva_interface_next.cpp 
b/media_softlet/linux/common/ddi/media_libva_interface_next.cpp
-index b3851e9b5..231268cb7 100644
---- a/media_softlet/linux/common/ddi/media_libva_interface_next.cpp
-+++ b/media_softlet/linux/common/ddi/media_libva_interface_next.cpp
-@@ -4672,8 +4672,12 @@ uint32_t 
MediaLibvaInterfaceNext::GetDrmFormatOfSeparatePlane(uint32_t fourcc, i
-         {
-         case VA_FOURCC_NV12:
-         case VA_FOURCC_I420:
-+        case VA_FOURCC_IMC3:
-         case VA_FOURCC_YV12:
-         case VA_FOURCC_YV16:
-+        case VA_FOURCC_422H:
-+        case VA_FOURCC_422V:
-+        case VA_FOURCC_444P:
-         case VA_FOURCC_Y800:
-         case VA_FOURCC_RGBP:
-         case VA_FOURCC_BGRP:
-@@ -4746,8 +4750,12 @@ uint32_t 
MediaLibvaInterfaceNext::GetDrmFormatOfSeparatePlane(uint32_t fourcc, i
-         case VA_FOURCC_NV12:
-             return DRM_FORMAT_GR88;
-         case VA_FOURCC_I420:
-+        case VA_FOURCC_IMC3:
-         case VA_FOURCC_YV12:
-         case VA_FOURCC_YV16:
-+        case VA_FOURCC_422H:
-+        case VA_FOURCC_422V:
-+        case VA_FOURCC_444P:
-         case VA_FOURCC_RGBP:
-         case VA_FOURCC_BGRP:
-             return DRM_FORMAT_R8;
-@@ -4770,10 +4778,18 @@ uint32_t 
MediaLibvaInterfaceNext::GetDrmFormatOfCompositeObject(uint32_t fourcc)
-         return DRM_FORMAT_NV12;
-     case VA_FOURCC_I420:
-         return DRM_FORMAT_YUV420;
-+    case VA_FOURCC_IMC3:
-+        return DRM_FORMAT_YUV420;
-     case VA_FOURCC_YV12:
-         return DRM_FORMAT_YVU420;
-     case VA_FOURCC_YV16:
-         return DRM_FORMAT_YVU422;
-+    case VA_FOURCC_422H:
-+        return DRM_FORMAT_YUV422;
-+    case VA_FOURCC_422V:
-+        return DRM_FORMAT_YUV422;
-+    case VA_FOURCC_444P:
-+        return DRM_FORMAT_YUV444;
-     case VA_FOURCC_YUY2:
-         return DRM_FORMAT_YUYV;
-     case VA_FOURCC_YVYU:
-@@ -4782,6 +4798,12 @@ uint32_t 
MediaLibvaInterfaceNext::GetDrmFormatOfCompositeObject(uint32_t fourcc)
-         return DRM_FORMAT_VYUY;
-     case VA_FOURCC_UYVY:
-         return DRM_FORMAT_UYVY;
-+    case VA_FOURCC_AYUV:
-+        return DRM_FORMAT_AYUV;
-+#if VA_CHECK_VERSION(1, 13, 0)
-+    case VA_FOURCC_XYUV:
-+        return DRM_FORMAT_XYUV8888;
-+#endif
-     case VA_FOURCC_Y210:
-         return DRM_FORMAT_Y210;
- #if VA_CHECK_VERSION(1, 9, 0)
--- 
-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
new file mode 100644
index 00000000..99e5c973
--- /dev/null
+++ 
b/recipes-multimedia/libva/files/0003-Force-ARGB-surface-to-tile4-for-ACM.patch
@@ -0,0 +1,45 @@
+From a0149ae2dc69143406843302eb7e9e5338c54475 Mon Sep 17 00:00:00 2001
+From: Lim Siew Hoon <[email protected]>
+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 <[email protected]>
+Signed-off-by: Lim Siew Hoon <[email protected]>
+---
+ 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/0003-fix-vdsfc-csc-issue.patch 
b/recipes-multimedia/libva/files/0003-fix-vdsfc-csc-issue.patch
deleted file mode 100644
index f0d3d55d..00000000
--- a/recipes-multimedia/libva/files/0003-fix-vdsfc-csc-issue.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From e4f88d8a7fbde1df022a648e2cd06c1b8abbd4e4 Mon Sep 17 00:00:00 2001
-From: shawnli2 <[email protected]>
-Date: Sun, 25 Jun 2023 15:25:11 +0800
-Subject: [PATCH 3/5] fix vdsfc csc issue
-
-to support ARGB8 output, need to enable csc from YUV to RGB
-
-upstream-status: backport
-Backport from upstream media-driver:
-https://github.com/intel/media-driver/commit/9806aede1724d5eea3a8ddb262d1f2cbcca63456
----
- .../Xe_XPM_base/vp/hal/packet/vp_render_sfc_xe_xpm_base.cpp  | 5 +++--
- .../common/vp/hal/packet/vp_render_sfc_base_legacy.cpp       | 4 ++--
- .../vp/hal/packet/vp_render_sfc_xe_lpm_plus_base.cpp         | 5 +++--
- .../agnostic/common/vp/hal/packet/vp_render_sfc_base.cpp     | 4 ++--
- 4 files changed, 10 insertions(+), 8 deletions(-)
-
-diff --git 
a/media_driver/media_softlet/agnostic/Xe_M/Xe_XPM_base/vp/hal/packet/vp_render_sfc_xe_xpm_base.cpp
 
b/media_driver/media_softlet/agnostic/Xe_M/Xe_XPM_base/vp/hal/packet/vp_render_sfc_xe_xpm_base.cpp
-index 24bade3fd..daccd21f0 100644
---- 
a/media_driver/media_softlet/agnostic/Xe_M/Xe_XPM_base/vp/hal/packet/vp_render_sfc_xe_xpm_base.cpp
-+++ 
b/media_driver/media_softlet/agnostic/Xe_M/Xe_XPM_base/vp/hal/packet/vp_render_sfc_xe_xpm_base.cpp
-@@ -298,9 +298,10 @@ bool 
SfcRenderXe_Xpm_Base::IsOutputChannelSwapNeeded(MOS_FORMAT outputFormat)
- bool SfcRenderXe_Xpm_Base::IsCscNeeded(SFC_CSC_PARAMS &cscParams)
- {
-     VP_FUNC_CALL();
--    if (m_bVdboxToSfc && m_videoConfig.codecStandard == CODECHAL_JPEG)
-+
-+    if (m_bVdboxToSfc && cscParams.inputFormat != cscParams.outputFormat)
-     {
--        if (cscParams.inputFormat != cscParams.outputFormat)
-+        if (m_videoConfig.codecStandard == CODECHAL_JPEG || 
cscParams.outputFormat == Format_A8R8G8B8)
-         {
-             return true;
-         }
-diff --git 
a/media_driver/media_softlet/agnostic/common/vp/hal/packet/vp_render_sfc_base_legacy.cpp
 
b/media_driver/media_softlet/agnostic/common/vp/hal/packet/vp_render_sfc_base_legacy.cpp
-index 16cef55b3..19c99364b 100644
---- 
a/media_driver/media_softlet/agnostic/common/vp/hal/packet/vp_render_sfc_base_legacy.cpp
-+++ 
b/media_driver/media_softlet/agnostic/common/vp/hal/packet/vp_render_sfc_base_legacy.cpp
-@@ -197,10 +197,10 @@ MOS_STATUS SfcRenderBaseLegacy::SetIefStateCscParams(
-     {
-         psfcStateParams->bCSCEnable = true;
-         pIEFStateParams->bCSCEnable = true;
--        if (m_bVdboxToSfc && m_videoConfig.codecStandard == CODECHAL_JPEG)
-+        if (m_bVdboxToSfc)
-         {
-             m_cscInputSwapNeeded = false;
--            if (m_videoConfig.jpeg.jpegChromaType == jpegRGB)
-+            if (m_videoConfig.jpeg.jpegChromaType == jpegRGB && 
m_videoConfig.codecStandard == CODECHAL_JPEG)
-             {
-                 m_cscCoeff[0] = 1.000000000f;
-                 m_cscCoeff[1] = 0.000000000f;
-diff --git 
a/media_softlet/agnostic/Xe_M_plus/Xe_LPM_plus_base/vp/hal/packet/vp_render_sfc_xe_lpm_plus_base.cpp
 
b/media_softlet/agnostic/Xe_M_plus/Xe_LPM_plus_base/vp/hal/packet/vp_render_sfc_xe_lpm_plus_base.cpp
-index 304fd2ffc..e9737c3c5 100644
---- 
a/media_softlet/agnostic/Xe_M_plus/Xe_LPM_plus_base/vp/hal/packet/vp_render_sfc_xe_lpm_plus_base.cpp
-+++ 
b/media_softlet/agnostic/Xe_M_plus/Xe_LPM_plus_base/vp/hal/packet/vp_render_sfc_xe_lpm_plus_base.cpp
-@@ -636,9 +636,10 @@ bool 
SfcRenderXe_Lpm_Plus_Base::IsOutputChannelSwapNeeded(MOS_FORMAT outputForma
- bool SfcRenderXe_Lpm_Plus_Base::IsCscNeeded(SFC_CSC_PARAMS &cscParams)
- {
-     VP_FUNC_CALL();
--    if (m_bVdboxToSfc && m_videoConfig.codecStandard == CODECHAL_JPEG)
-+
-+    if (m_bVdboxToSfc && cscParams.inputFormat != cscParams.outputFormat)
-     {
--        if (cscParams.inputFormat != cscParams.outputFormat)
-+        if (m_videoConfig.codecStandard == CODECHAL_JPEG || 
cscParams.outputFormat == Format_A8R8G8B8)
-         {
-             return true;
-         }
-diff --git 
a/media_softlet/agnostic/common/vp/hal/packet/vp_render_sfc_base.cpp 
b/media_softlet/agnostic/common/vp/hal/packet/vp_render_sfc_base.cpp
-index 573a0a12d..2b7c5231a 100644
---- a/media_softlet/agnostic/common/vp/hal/packet/vp_render_sfc_base.cpp
-+++ b/media_softlet/agnostic/common/vp/hal/packet/vp_render_sfc_base.cpp
-@@ -238,10 +238,10 @@ MOS_STATUS SfcRenderBase::SetIefStateCscParams(
-     {
-         psfcStateParams->bCSCEnable = true;
-         pIEFStateParams->bCSCEnable = true;
--        if (m_bVdboxToSfc && m_videoConfig.codecStandard == CODECHAL_JPEG)
-+        if (m_bVdboxToSfc)
-         {
-             m_cscInputSwapNeeded = false;
--            if (m_videoConfig.jpeg.jpegChromaType == jpegRGB)
-+            if (m_videoConfig.jpeg.jpegChromaType == jpegRGB && 
m_videoConfig.codecStandard == CODECHAL_JPEG)
-             {
-                 m_cscCoeff[0] = 1.000000000f;
-                 m_cscCoeff[1] = 0.000000000f;
--- 
-2.40.1
-
diff --git 
a/recipes-multimedia/libva/files/0001-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
similarity index 88%
rename from 
recipes-multimedia/libva/files/0001-Set-sRGB-color-space-for-non-video-wall-and-no-backg.patch
rename to 
recipes-multimedia/libva/files/0004-Set-sRGB-color-space-for-non-video-wall-and-no-backg.patch
index 1d62b773..3a8ed3f8 100644
--- 
a/recipes-multimedia/libva/files/0001-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
@@ -1,23 +1,20 @@
-From b2c514337d2bc6015292aac5b57a603f8ad4fed5 Mon Sep 17 00:00:00 2001
+From 9b74d435324cc61e1d63709e13e1ad755fa4ce63 Mon Sep 17 00:00:00 2001
 From: Lu-Anxiao <[email protected]>
 Date: Mon, 9 Oct 2023 20:47:44 +0800
-Subject: [PATCH] Set sRGB color space for non-video wall and no background
+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: Chan, Xu Pian <[email protected]>
 ---
  .../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 2ef610d35..4e10905ff 100644
+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(
@@ -53,10 +50,10 @@ index 2ef610d35..4e10905ff 100644
      {
          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 fa02bf147..fe64bb8ae 100644
+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
-@@ -2085,8 +2085,9 @@ VAStatus DdiVpFunctions::SetBackgroundColorfill(
+@@ -2111,8 +2111,9 @@ VAStatus DdiVpFunctions::SetBackgroundColorfill(
  {
      DDI_VP_FUNC_ENTER;
      DDI_VP_CHK_NULL(vpHalRenderParams, "nullptr vpHalRenderParams.", 
VA_STATUS_ERROR_INVALID_PARAMETER);
@@ -67,7 +64,7 @@ index fa02bf147..fe64bb8ae 100644
      {
          if (vpHalRenderParams->pColorFillParams == nullptr)
          {
-@@ -2095,10 +2096,18 @@ VAStatus DdiVpFunctions::SetBackgroundColorfill(
+@@ -2121,10 +2122,18 @@ VAStatus DdiVpFunctions::SetBackgroundColorfill(
  
          DDI_VP_CHK_NULL(vpHalRenderParams->pColorFillParams, "nullptr 
pColorFillParams.", VA_STATUS_ERROR_UNKNOWN);
  
@@ -91,5 +88,5 @@ index fa02bf147..fe64bb8ae 100644
      else
      {
 -- 
-2.25.1
+2.40.1
 
diff --git a/recipes-multimedia/libva/files/0004-XRGB-force-to-tile4.patch 
b/recipes-multimedia/libva/files/0004-XRGB-force-to-tile4.patch
deleted file mode 100644
index 16b2961e..00000000
--- a/recipes-multimedia/libva/files/0004-XRGB-force-to-tile4.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From bd96cac9a35a8ca98c7e2b8f622afb75f31ed221 Mon Sep 17 00:00:00 2001
-From: JayYang <[email protected]>
-Date: Thu, 27 Jul 2023 21:05:50 +0800
-Subject: [PATCH 4/5] XRGB force to tile4
-
-Force BGRX surfaces to tile4 because glimagesink plugins backend support by 3D 
mesa
-driver is reporting back the XR24 (BGRx) for dmabuf modifier case is 
0x0100000000000009
-
-upstream-status: backport
-
-Backport from upstream media-driver:
-https://github.com/intel/media-driver/commit/b6d038491372f39330b33620ed8bdb8255b57a66
----
- media_softlet/linux/common/ddi/media_libva_util_next.cpp | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/media_softlet/linux/common/ddi/media_libva_util_next.cpp 
b/media_softlet/linux/common/ddi/media_libva_util_next.cpp
-index 1852e59d2..b31607945 100644
---- a/media_softlet/linux/common/ddi/media_libva_util_next.cpp
-+++ b/media_softlet/linux/common/ddi/media_libva_util_next.cpp
-@@ -649,7 +649,10 @@ VAStatus 
MediaLibvaUtilNext::GenerateGmmParamsForInternalSurface(
-             }
-             // For ARGB surface, always allocate it as tile4.
-             // This is a WA for ExportSurfaceHandle because modifer for 
tile64 isn't defined.
--            if ((params.format == Media_Format_A8R8G8B8 || params.format == 
Media_Format_B10G10R10A2 || params.format == Media_Format_A8B8G8R8) && 
!MEDIA_IS_SKU(&mediaDrvCtx->SkuTable, FtrTileY))
-+            if ((params.format == Media_Format_A8R8G8B8 || 
-+                params.format == Media_Format_B10G10R10A2 || 
-+                params.format == Media_Format_A8B8G8R8 ||
-+                params.format == Media_Format_X8R8G8B8) && 
!MEDIA_IS_SKU(&mediaDrvCtx->SkuTable, FtrTileY))
-             {
-                 gmmParams.Flags.Info.Tile4 = true;
-             }
--- 
-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
new file mode 100644
index 00000000..8fa08507
--- /dev/null
+++ 
b/recipes-multimedia/libva/files/0005-XRGB-force-to-do-swizzle-for-AVC-HEVC.patch
@@ -0,0 +1,54 @@
+From c2a7a53a71b252593fb31cba24cddf7a5f466ba1 Mon Sep 17 00:00:00 2001
+From: Vincent Cheah Beng Keat <[email protected]>
+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 <[email protected]>
+---
+ .../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
new file mode 100644
index 00000000..5870f2fb
--- /dev/null
+++ b/recipes-multimedia/libva/files/0006-Add-DG2-DIDs.patch
@@ -0,0 +1,39 @@
+From 741d8692cee1a73a45a6cd819a52ed9716012d20 Mon Sep 17 00:00:00 2001
+From: JayYang <[email protected]>
+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
+---
+ 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<GfxDeviceInfo>::
+ static bool dg2Gt4Device56B1 = DeviceInfoFactory<GfxDeviceInfo>::
+     RegisterDevice(0x56B1, &dg2Gt4Info);
+ 
++static bool dg2Gt4Device56BA = DeviceInfoFactory<GfxDeviceInfo>::
++    RegisterDevice(0x56BA, &dg2Gt4Info);
++
++static bool dg2Gt4Device56BB = DeviceInfoFactory<GfxDeviceInfo>::
++    RegisterDevice(0x56BB, &dg2Gt4Info);
++
++static bool dg2Gt4Device56BC = DeviceInfoFactory<GfxDeviceInfo>::
++    RegisterDevice(0x56BC, &dg2Gt4Info);
++
++static bool dg2Gt4Device56BD = DeviceInfoFactory<GfxDeviceInfo>::
++    RegisterDevice(0x56BD, &dg2Gt4Info);
++
+ static bool dg2Gt4Device56B2 = DeviceInfoFactory<GfxDeviceInfo>::
+     RegisterDevice(0x56B2, &dg2Gt4Info);
+ 
+-- 
+2.40.1
+
diff --git a/recipes-multimedia/libva/intel-media-driver_23.2.4.bb 
b/recipes-multimedia/libva/intel-media-driver_23.3.5.bb
similarity index 66%
rename from recipes-multimedia/libva/intel-media-driver_23.2.4.bb
rename to recipes-multimedia/libva/intel-media-driver_23.3.5.bb
index e6016264..c91c7417 100644
--- a/recipes-multimedia/libva/intel-media-driver_23.2.4.bb
+++ b/recipes-multimedia/libva/intel-media-driver_23.3.5.bb
@@ -19,20 +19,15 @@ REQUIRED_DISTRO_FEATURES = "opengl"
 DEPENDS += "libva gmmlib"
 
 SRC_URI = "git://github.com/intel/media-driver.git;protocol=https;nobranch=1 \
-           file://0001-ARGB-force-to-tile4.patch \
-           file://0002-Add-mocs-index-in-patch-list.patch \
-           file://0003-fix-vdsfc-csc-issue.patch \
-           file://0004-XRGB-force-to-tile4.patch \
-           file://0001-Force-to-render-path-according-to-app-setting.patch \
-           file://0002-Add-DRM-format-mappings-for-JPEG-decoder-output.patch \
-           
file://0003-Add-DRM-format-mappings-for-JPEG-output-to-softlet.patch \
-           file://0004-Disable-vp9-padding-on-mtl.patch \
-           file://0001-Fix-FC-Corruption-When-Blending-without-Colorfill.patch 
\
-           
file://0001-Fix-FC-Corruption-When-Blending-without-Colorfill-in.patch \
-           
file://0001-Set-sRGB-color-space-for-non-video-wall-and-no-backg.patch \
+           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 = "cf942344b9e439d19873f1d47c0c890d7c63b6ad"
+SRCREV = "0f36979420a33bf12d17fa939af8d16b36ef8fcd"
 S = "${WORKDIR}/git"
 
 COMPATIBLE_HOST:x86-x32 = "null"
-- 
2.40.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#8162): 
https://lists.yoctoproject.org/g/meta-intel/message/8162
Mute This Topic: https://lists.yoctoproject.org/mt/102775589/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-intel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to