diff options
Diffstat (limited to 'recipes-multimedia/libva')
16 files changed, 195 insertions, 629 deletions
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 @@ | |||
1 | From f172dc91c054bb6377b733db12d9210e5f73e7b2 Mon Sep 17 00:00:00 2001 | ||
2 | From: JayYang <jay.yang@intel.com> | ||
3 | Date: Fri, 7 Jul 2023 13:40:14 +0800 | ||
4 | Subject: [PATCH 1/5] ARGB force to tile4 | ||
5 | |||
6 | Gmm may create tile64 ARGB surfaces, whereas no tile64 modifier is defined to export such surfaces. | ||
7 | Force ARGB, ABGR, A2RGB10 surfaces to tile4 as WA. | ||
8 | |||
9 | upstream-status: backport | ||
10 | Backport from upstream intel-media-driver: | ||
11 | https://github.com/intel/media-driver/commit/bd5bde0d8a0c0a6672c3586ee6727eff3ca9bc21 | ||
12 | --- | ||
13 | media_softlet/linux/common/ddi/media_libva_util_next.cpp | 6 ++++++ | ||
14 | 1 file changed, 6 insertions(+) | ||
15 | |||
16 | diff --git a/media_softlet/linux/common/ddi/media_libva_util_next.cpp b/media_softlet/linux/common/ddi/media_libva_util_next.cpp | ||
17 | index e3c49eef8..1852e59d2 100644 | ||
18 | --- a/media_softlet/linux/common/ddi/media_libva_util_next.cpp | ||
19 | +++ b/media_softlet/linux/common/ddi/media_libva_util_next.cpp | ||
20 | @@ -647,6 +647,12 @@ VAStatus MediaLibvaUtilNext::GenerateGmmParamsForInternalSurface( | ||
21 | } | ||
22 | } | ||
23 | } | ||
24 | + // For ARGB surface, always allocate it as tile4. | ||
25 | + // This is a WA for ExportSurfaceHandle because modifer for tile64 isn't defined. | ||
26 | + if ((params.format == Media_Format_A8R8G8B8 || params.format == Media_Format_B10G10R10A2 || params.format == Media_Format_A8B8G8R8) && !MEDIA_IS_SKU(&mediaDrvCtx->SkuTable, FtrTileY)) | ||
27 | + { | ||
28 | + gmmParams.Flags.Info.Tile4 = true; | ||
29 | + } | ||
30 | break; | ||
31 | case I915_TILING_X: | ||
32 | gmmParams.Flags.Info.TiledX = true; | ||
33 | -- | ||
34 | 2.40.1 | ||
35 | |||
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 index 075f2350..2f1602d2 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 @@ | |||
1 | From ea2ae0cd656a17eee9897aa1bf4e61b0d05ec347 Mon Sep 17 00:00:00 2001 | 1 | From d9ea15202df23be0ead2157392ca347c42d28ce0 Mon Sep 17 00:00:00 2001 |
2 | From: Lim Siew Hoon <siew.hoon.lim@intel.com> | 2 | From: LeyuYao <leyu.yao@intel.com> |
3 | Date: Tue, 5 Sep 2023 16:13:42 +0800 | 3 | Date: Thu, 7 Sep 2023 16:50:46 +0800 |
4 | Subject: [PATCH 4/4] Disable vp9 padding on mtl. | 4 | Subject: [PATCH 1/7] Disable VP9 padding on MTL |
5 | 5 | ||
6 | Upstream-Status: Submitted [https://github.com/intel/media-driver/pull/1720] | 6 | This is impact performance on large solution with not 8-aligned height |
7 | |||
8 | Upstream-Status: Backport [https://github.com/intel/media-driver/commit/f34b7d0cd] | ||
7 | Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> | 9 | Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> |
8 | --- | 10 | --- |
9 | media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp | 2 +- | 11 | media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp | 2 +- |
10 | 1 file changed, 1 insertion(+), 1 deletion(-) | 12 | 1 file changed, 1 insertion(+), 1 deletion(-) |
11 | 13 | ||
12 | 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 | 14 | 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 |
13 | index 679ca45f6..0e6837034 100644 | 15 | index 91b2ed5ed..0f4d47931 100644 |
14 | --- a/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp | 16 | --- a/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp |
15 | +++ b/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp | 17 | +++ b/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp |
16 | @@ -284,7 +284,7 @@ static bool InitMtlMediaWaExt(struct GfxDeviceInfo *devInfo, | 18 | @@ -284,7 +284,7 @@ static bool InitMtlMediaWaExt(struct GfxDeviceInfo *devInfo, |
@@ -20,8 +22,8 @@ index 679ca45f6..0e6837034 100644 | |||
20 | - MEDIA_WR_WA(waTable, Wa_Vp9UnalignedHeight, 1); | 22 | - MEDIA_WR_WA(waTable, Wa_Vp9UnalignedHeight, 1); |
21 | + MEDIA_WR_WA(waTable, Wa_Vp9UnalignedHeight, 0); | 23 | + MEDIA_WR_WA(waTable, Wa_Vp9UnalignedHeight, 0); |
22 | 24 | ||
23 | return true; | 25 | MEDIA_WR_WA(waTable, Wa_15013355402, 1); |
24 | } | 26 | |
25 | -- | 27 | -- |
26 | 2.40.1 | 28 | 2.40.1 |
27 | 29 | ||
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 @@ | |||
1 | From ae912b6550af4808436fabc7cae3278a20a955b6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gu_Peiyi <peiyi.gu@intel.com> | ||
3 | Date: Tue, 12 Sep 2023 15:06:17 +0800 | ||
4 | Subject: [PATCH] Fix FC Corruption When Blending without Colorfill in Legacy | ||
5 | Path | ||
6 | |||
7 | Fix fc will show corruption when alignedRect is bigger than DestYBottomRightLayer0/DestXBottomRightLayer0 and not set color fill | ||
8 | |||
9 | Upstream-Status: Backport [https://github.com/intel/media-driver/commit/197841a545b1eaf7f202e2d057a5a6395be46061] | ||
10 | Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
11 | --- | ||
12 | .../common/vp/hal/vphal_render_composite.cpp | 40 +++++++++++++++++++ | ||
13 | .../common/vp/hal/vphal_render_composite.h | 9 +++++ | ||
14 | 2 files changed, 49 insertions(+) | ||
15 | |||
16 | diff --git a/media_driver/agnostic/common/vp/hal/vphal_render_composite.cpp b/media_driver/agnostic/common/vp/hal/vphal_render_composite.cpp | ||
17 | index dd5025f32..0b0b6c432 100644 | ||
18 | --- a/media_driver/agnostic/common/vp/hal/vphal_render_composite.cpp | ||
19 | +++ b/media_driver/agnostic/common/vp/hal/vphal_render_composite.cpp | ||
20 | @@ -1993,6 +1993,8 @@ MOS_STATUS CompositeState::RenderMultiPhase( | ||
21 | for (index = 0, phase = 0; (!bLastPhase); phase++) | ||
22 | { | ||
23 | bool disableAvsSampler = false; | ||
24 | + // AdjustParamsBasedOnFcLimit must be called before IsDisableAVSSampler in legacy path, or it will miss the AVS WA | ||
25 | + bool adjustParamBasedOnFcLimit = AdjustParamsBasedOnFcLimit(pcRenderParams); | ||
26 | VPHAL_COMPOSITE_PARAMS CompositeParams; | ||
27 | // Prepare compositing structure | ||
28 | ResetCompParams(&CompositeParams); | ||
29 | @@ -6103,6 +6105,44 @@ bool CompositeState::RenderBufferComputeWalker( | ||
30 | return bResult; | ||
31 | } | ||
32 | |||
33 | +//! | ||
34 | +//! \brief Adjust Params Based On Fc Limit | ||
35 | +//! \param [in,out] pCompParams | ||
36 | +//! Pointer to Composite parameters. | ||
37 | +//! \return bool | ||
38 | +//! | ||
39 | +bool CompositeState::AdjustParamsBasedOnFcLimit( | ||
40 | + PCVPHAL_RENDER_PARAMS pcRenderParam) | ||
41 | +{ | ||
42 | + //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. | ||
43 | + if (pcRenderParam->pColorFillParams == nullptr && | ||
44 | + pcRenderParam->uSrcCount == 1 && | ||
45 | + pcRenderParam->uDstCount == 1 && | ||
46 | + pcRenderParam->pSrc[0] != nullptr && | ||
47 | + pcRenderParam->pTarget[0] != nullptr) | ||
48 | + { | ||
49 | + if (pcRenderParam->pSrc[0]->rcDst.top >= pcRenderParam->pTarget[0]->rcDst.top && | ||
50 | + pcRenderParam->pSrc[0]->rcDst.left >= pcRenderParam->pTarget[0]->rcDst.left && | ||
51 | + pcRenderParam->pSrc[0]->rcDst.right <= pcRenderParam->pTarget[0]->rcDst.right && | ||
52 | + pcRenderParam->pSrc[0]->rcDst.bottom <= pcRenderParam->pTarget[0]->rcDst.bottom) | ||
53 | + { | ||
54 | + 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)", | ||
55 | + pcRenderParam->pTarget[0]->rcDst.left, | ||
56 | + pcRenderParam->pTarget[0]->rcDst.top, | ||
57 | + pcRenderParam->pTarget[0]->rcDst.right, | ||
58 | + pcRenderParam->pTarget[0]->rcDst.bottom, | ||
59 | + pcRenderParam->pSrc[0]->rcDst.left, | ||
60 | + pcRenderParam->pSrc[0]->rcDst.top, | ||
61 | + pcRenderParam->pSrc[0]->rcDst.right, | ||
62 | + pcRenderParam->pSrc[0]->rcDst.bottom); | ||
63 | + pcRenderParam->pTarget[0]->rcSrc = pcRenderParam->pSrc[0]->rcDst; | ||
64 | + pcRenderParam->pTarget[0]->rcDst = pcRenderParam->pSrc[0]->rcDst; | ||
65 | + return true; | ||
66 | + } | ||
67 | + } | ||
68 | + return false; | ||
69 | +} | ||
70 | + | ||
71 | //! | ||
72 | //! \brief Calculate Composite parameter and render data | ||
73 | //! \param [in] pCompParams | ||
74 | diff --git a/media_driver/agnostic/common/vp/hal/vphal_render_composite.h b/media_driver/agnostic/common/vp/hal/vphal_render_composite.h | ||
75 | index b3c2820c6..3838e89c0 100644 | ||
76 | --- a/media_driver/agnostic/common/vp/hal/vphal_render_composite.h | ||
77 | +++ b/media_driver/agnostic/common/vp/hal/vphal_render_composite.h | ||
78 | @@ -497,6 +497,15 @@ protected: | ||
79 | PVPHAL_RENDERING_DATA_COMPOSITE pRenderingData, | ||
80 | bool* pbColorfill); | ||
81 | |||
82 | + //! | ||
83 | + //! \brief Adjust Params Based On Fc Limit | ||
84 | + //! \param [in,out] PCVPHAL_RENDER_PARAMS | ||
85 | + //! Pointer to pcRenderParam parameters. | ||
86 | + //! \return bool | ||
87 | + //! | ||
88 | + bool AdjustParamsBasedOnFcLimit( | ||
89 | + PCVPHAL_RENDER_PARAMS pcRenderParam); | ||
90 | + | ||
91 | //! | ||
92 | //! \brief Set Sampler AVS parameters | ||
93 | //! \param [in] pRenderingData | ||
94 | -- | ||
95 | 2.40.1 | ||
96 | |||
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 @@ | |||
1 | From 8da35f42a54ad63cbbe0362fc9dff37552d94c08 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gu_Peiyi <peiyi.gu@intel.com> | ||
3 | Date: Wed, 6 Sep 2023 14:42:57 +0800 | ||
4 | Subject: [PATCH] Fix FC Corruption When Blending without Colorfill | ||
5 | |||
6 | Fix fc will show corruption when alignedRect is bigger than DestYBottomRightLayer0/DestXBottomRightLayer0 and not set color fill | ||
7 | |||
8 | Upstream-Status: Backport [https://github.com/intel/media-driver/commit/5cdd94ba90bcd8174f53af2a4e9a2f4bbca2533a] | ||
9 | Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
10 | --- | ||
11 | .../common/vp/hal/features/vp_fc_filter.cpp | 35 +++++++++++++++++++ | ||
12 | .../common/vp/hal/features/vp_fc_filter.h | 2 ++ | ||
13 | 2 files changed, 37 insertions(+) | ||
14 | |||
15 | 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 | ||
16 | index 66e1ad8fb..5d741e80c 100644 | ||
17 | --- a/media_softlet/agnostic/common/vp/hal/features/vp_fc_filter.cpp | ||
18 | +++ b/media_softlet/agnostic/common/vp/hal/features/vp_fc_filter.cpp | ||
19 | @@ -213,9 +213,44 @@ MOS_STATUS VpFcFilter::InitCompParams(VP_COMPOSITE_PARAMS &compParams, SwFilterP | ||
20 | return MOS_STATUS_SUCCESS; | ||
21 | } | ||
22 | |||
23 | +MOS_STATUS VpFcFilter::AdjustParamsBasedOnFcLimit(VP_COMPOSITE_PARAMS &compParams) | ||
24 | +{ | ||
25 | + //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. | ||
26 | + if (compParams.pColorFillParams == nullptr && | ||
27 | + compParams.sourceCount == 1 && | ||
28 | + compParams.targetCount == 1 && | ||
29 | + compParams.target[0].surf != nullptr && | ||
30 | + compParams.source[0].surf != nullptr) | ||
31 | + { | ||
32 | + if (compParams.target[0].surf->rcDst.top <= compParams.source[0].surf->rcDst.top && | ||
33 | + compParams.target[0].surf->rcDst.left <= compParams.source[0].surf->rcDst.left && | ||
34 | + compParams.target[0].surf->rcDst.right >= compParams.source[0].surf->rcDst.right && | ||
35 | + compParams.target[0].surf->rcDst.bottom >= compParams.source[0].surf->rcDst.bottom) | ||
36 | + { | ||
37 | + 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)", | ||
38 | + compParams.target[0].surf->rcDst.left, | ||
39 | + compParams.target[0].surf->rcDst.top, | ||
40 | + compParams.target[0].surf->rcDst.right, | ||
41 | + compParams.target[0].surf->rcDst.bottom, | ||
42 | + compParams.source[0].surf->rcDst.left, | ||
43 | + compParams.source[0].surf->rcDst.top, | ||
44 | + compParams.source[0].surf->rcDst.right, | ||
45 | + compParams.source[0].surf->rcDst.bottom); | ||
46 | + compParams.target[0].surf->rcSrc = compParams.source[0].surf->rcDst; | ||
47 | + compParams.target[0].surf->rcDst = compParams.source[0].surf->rcDst; | ||
48 | + } | ||
49 | + } | ||
50 | + | ||
51 | + return MOS_STATUS_SUCCESS; | ||
52 | +} | ||
53 | + | ||
54 | + | ||
55 | MOS_STATUS VpFcFilter::CalculateCompParams(VP_COMPOSITE_PARAMS &compParams) | ||
56 | { | ||
57 | int layerCount = 0; | ||
58 | + | ||
59 | + VP_RENDER_CHK_STATUS_RETURN(AdjustParamsBasedOnFcLimit(compParams)); | ||
60 | + | ||
61 | for (uint32_t i = 0; i < compParams.sourceCount; ++i) | ||
62 | { | ||
63 | VP_FC_LAYER *layer = &compParams.source[i]; | ||
64 | 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 | ||
65 | index d64c22806..94c6a1dbc 100644 | ||
66 | --- a/media_softlet/agnostic/common/vp/hal/features/vp_fc_filter.h | ||
67 | +++ b/media_softlet/agnostic/common/vp/hal/features/vp_fc_filter.h | ||
68 | @@ -71,6 +71,8 @@ protected: | ||
69 | float &fStepX, float &fStepY); | ||
70 | MHW_SAMPLER_FILTER_MODE Get3DSamperFilterMode(VPHAL_SCALING_MODE scalingMode); | ||
71 | |||
72 | + MOS_STATUS AdjustParamsBasedOnFcLimit(VP_COMPOSITE_PARAMS &compParams); | ||
73 | + | ||
74 | SwFilterPipe *m_executedPipe = nullptr; | ||
75 | PRENDER_FC_PARAMS m_renderFcParams = nullptr; | ||
76 | |||
77 | -- | ||
78 | 2.40.1 | ||
79 | |||
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 @@ | |||
1 | From bfc77f3476a406600e05e3bfa5e289a94bf58aef Mon Sep 17 00:00:00 2001 | ||
2 | From: JayYang <jay.yang@intel.com> | ||
3 | Date: Fri, 4 Aug 2023 12:03:51 +0800 | ||
4 | Subject: [PATCH 1/4] Force to render path according to app setting | ||
5 | |||
6 | If apps set VA flag VA_PROC_PIPELINE_FAST, force workload to render. | ||
7 | |||
8 | Upstream-Status: Backport [https://github.com/intel/media-driver/commit/00d560ba561f57b8be85c41a791e6db05e1743e9] | ||
9 | Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
10 | --- | ||
11 | .../linux/common/vp/ddi/ddi_vp_functions.cpp | 22 +++++++++---------- | ||
12 | 1 file changed, 10 insertions(+), 12 deletions(-) | ||
13 | |||
14 | diff --git a/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp b/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp | ||
15 | index 89da5239f..fa02bf147 100644 | ||
16 | --- a/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp | ||
17 | +++ b/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp | ||
18 | @@ -3991,23 +3991,21 @@ VAStatus DdiVpFunctions::DdiSetProcPipelineParams( | ||
19 | } | ||
20 | #endif //(_DEBUG || _RELEASE_INTERNAL) | ||
21 | |||
22 | - // Set stream type using pipeline_flags VA_PROC_PIPELINE_FAST flag | ||
23 | // Currently we only support 1 primary surface in VP | ||
24 | - if (pipelineParam->pipeline_flags & VA_PROC_PIPELINE_FAST) | ||
25 | + if (vpCtx->iPriSurfs < VP_MAX_PRIMARY_SURFS) | ||
26 | { | ||
27 | - vpHalSrcSurf->SurfType = SURF_IN_SUBSTREAM; | ||
28 | + vpHalSrcSurf->SurfType = SURF_IN_PRIMARY; | ||
29 | + vpCtx->iPriSurfs++; | ||
30 | } | ||
31 | else | ||
32 | { | ||
33 | - if (vpCtx->iPriSurfs < VP_MAX_PRIMARY_SURFS) | ||
34 | - { | ||
35 | - vpHalSrcSurf->SurfType = SURF_IN_PRIMARY; | ||
36 | - vpCtx->iPriSurfs++; | ||
37 | - } | ||
38 | - else | ||
39 | - { | ||
40 | - vpHalSrcSurf->SurfType = SURF_IN_SUBSTREAM; | ||
41 | - } | ||
42 | + vpHalSrcSurf->SurfType = SURF_IN_SUBSTREAM; | ||
43 | + } | ||
44 | + | ||
45 | + // Set workload path using pipeline_flags VA_PROC_PIPELINE_FAST flag | ||
46 | + if (pipelineParam->pipeline_flags & VA_PROC_PIPELINE_FAST) | ||
47 | + { | ||
48 | + vpHalRenderParams->bForceToRender = true; | ||
49 | } | ||
50 | |||
51 | // Set src rect | ||
52 | -- | ||
53 | 2.40.1 | ||
54 | |||
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 @@ | |||
1 | From ea6cd2db43bab97744884001e0d98ba2ff5d3903 Mon Sep 17 00:00:00 2001 | ||
2 | From: Philip Langdale <philipl@overt.org> | ||
3 | Date: Sat, 5 Aug 2023 11:46:26 +0800 | ||
4 | Subject: [PATCH 2/4] Add DRM format mappings for JPEG decoder output | ||
5 | |||
6 | The output formats from the JPEG decoder are currently not included | ||
7 | in the DRM format mapping functions. This means that any attempt to | ||
8 | call vaExportSurface on JPEG images will fail. | ||
9 | |||
10 | However, there is no functional gap beyond the missing mappings, so if | ||
11 | we add them in, exporting will then work correctly. | ||
12 | |||
13 | The four formats in question are IMC3, 422H, 422V, and 444P. | ||
14 | |||
15 | * 422H and 444P have trivial 1:1 mappings. | ||
16 | * IMC3 can be treated the same as I420, because the only difference is | ||
17 | the chroma pitch, and that's explicitly set in the descriptor | ||
18 | * 422V (aka 440P) has the same memory layout as 422H - it's just a | ||
19 | difference in how the consumer handle the chroma | ||
20 | |||
21 | I also added the missing XYUV composite object mapping - it was already | ||
22 | present for separate planes. | ||
23 | |||
24 | Tested with ffmpeg+mpv. | ||
25 | |||
26 | Upstream-Status: Backport [https://github.com/intel/media-driver/commit/c7cd5a68315674d44ac97ec7cc78856fa90b8036] | ||
27 | Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
28 | --- | ||
29 | media_driver/linux/common/ddi/media_libva.cpp | 21 ++++++++++++++++++- | ||
30 | 1 file changed, 20 insertions(+), 1 deletion(-) | ||
31 | |||
32 | diff --git a/media_driver/linux/common/ddi/media_libva.cpp b/media_driver/linux/common/ddi/media_libva.cpp | ||
33 | index af35be841..1706138a1 100755 | ||
34 | --- a/media_driver/linux/common/ddi/media_libva.cpp | ||
35 | +++ b/media_driver/linux/common/ddi/media_libva.cpp | ||
36 | @@ -6981,8 +6981,12 @@ static uint32_t DdiMedia_GetDrmFormatOfSeparatePlane(uint32_t fourcc, int plane) | ||
37 | { | ||
38 | case VA_FOURCC_NV12: | ||
39 | case VA_FOURCC_I420: | ||
40 | + case VA_FOURCC_IMC3: | ||
41 | case VA_FOURCC_YV12: | ||
42 | case VA_FOURCC_YV16: | ||
43 | + case VA_FOURCC_422H: | ||
44 | + case VA_FOURCC_422V: | ||
45 | + case VA_FOURCC_444P: | ||
46 | case VA_FOURCC_Y800: | ||
47 | case VA_FOURCC_RGBP: | ||
48 | case VA_FOURCC_BGRP: | ||
49 | @@ -7055,8 +7059,12 @@ static uint32_t DdiMedia_GetDrmFormatOfSeparatePlane(uint32_t fourcc, int plane) | ||
50 | case VA_FOURCC_NV12: | ||
51 | return DRM_FORMAT_GR88; | ||
52 | case VA_FOURCC_I420: | ||
53 | + case VA_FOURCC_IMC3: | ||
54 | case VA_FOURCC_YV12: | ||
55 | case VA_FOURCC_YV16: | ||
56 | + case VA_FOURCC_422H: | ||
57 | + case VA_FOURCC_422V: | ||
58 | + case VA_FOURCC_444P: | ||
59 | case VA_FOURCC_RGBP: | ||
60 | case VA_FOURCC_BGRP: | ||
61 | return DRM_FORMAT_R8; | ||
62 | @@ -7070,7 +7078,6 @@ static uint32_t DdiMedia_GetDrmFormatOfSeparatePlane(uint32_t fourcc, int plane) | ||
63 | } | ||
64 | return 0; | ||
65 | } | ||
66 | - | ||
67 | static uint32_t DdiMedia_GetDrmFormatOfCompositeObject(uint32_t fourcc) | ||
68 | { | ||
69 | switch (fourcc) | ||
70 | @@ -7079,10 +7086,18 @@ static uint32_t DdiMedia_GetDrmFormatOfCompositeObject(uint32_t fourcc) | ||
71 | return DRM_FORMAT_NV12; | ||
72 | case VA_FOURCC_I420: | ||
73 | return DRM_FORMAT_YUV420; | ||
74 | + case VA_FOURCC_IMC3: | ||
75 | + return DRM_FORMAT_YUV420; | ||
76 | case VA_FOURCC_YV12: | ||
77 | return DRM_FORMAT_YVU420; | ||
78 | case VA_FOURCC_YV16: | ||
79 | return DRM_FORMAT_YVU422; | ||
80 | + case VA_FOURCC_422H: | ||
81 | + return DRM_FORMAT_YUV422; | ||
82 | + case VA_FOURCC_422V: | ||
83 | + return DRM_FORMAT_YUV422; | ||
84 | + case VA_FOURCC_444P: | ||
85 | + return DRM_FORMAT_YUV444; | ||
86 | case VA_FOURCC_YUY2: | ||
87 | return DRM_FORMAT_YUYV; | ||
88 | case VA_FOURCC_YVYU: | ||
89 | @@ -7093,6 +7108,10 @@ static uint32_t DdiMedia_GetDrmFormatOfCompositeObject(uint32_t fourcc) | ||
90 | return DRM_FORMAT_UYVY; | ||
91 | case VA_FOURCC_AYUV: | ||
92 | return DRM_FORMAT_AYUV; | ||
93 | +#if VA_CHECK_VERSION(1, 13, 0) | ||
94 | + case VA_FOURCC_XYUV: | ||
95 | + return DRM_FORMAT_XYUV8888; | ||
96 | +#endif | ||
97 | case VA_FOURCC_Y210: | ||
98 | return DRM_FORMAT_Y210; | ||
99 | #if VA_CHECK_VERSION(1, 9, 0) | ||
100 | -- | ||
101 | 2.40.1 | ||
102 | |||
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..fecb82ca --- /dev/null +++ b/recipes-multimedia/libva/files/0002-Add-VASurfaceAttribMemoryType-for-ACM.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 3f3b888445b7288aee231c906b655230301b6434 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Soon, Thean Siew" <thean.siew.soon@intel.com> | ||
3 | Date: Tue, 10 Oct 2023 12:55:37 +0000 | ||
4 | Subject: [PATCH 2/7] Add VASurfaceAttribMemoryType for ACM | ||
5 | |||
6 | Upstream-Status: Backport [https://github.com/intel/media-driver/commit/15e137e706] | ||
7 | |||
8 | Signed-off-by: Soon, Thean Siew <thean.siew.soon@intel.com> | ||
9 | --- | ||
10 | media_driver/linux/Xe_M/ddi/media_libva_caps_dg2.cpp | 7 +++++++ | ||
11 | 1 file changed, 7 insertions(+) | ||
12 | |||
13 | 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 | ||
14 | index d70523962..496068178 100644 | ||
15 | --- a/media_driver/linux/Xe_M/ddi/media_libva_caps_dg2.cpp | ||
16 | +++ b/media_driver/linux/Xe_M/ddi/media_libva_caps_dg2.cpp | ||
17 | @@ -1045,6 +1045,13 @@ VAStatus MediaLibvaCapsDG2::AddEncSurfaceAttributes( | ||
18 | attribList[numAttribs].flags = VA_SURFACE_ATTRIB_GETTABLE; | ||
19 | attribList[numAttribs].value.value.i = m_encMinHeight; | ||
20 | numAttribs++; | ||
21 | + | ||
22 | + attribList[numAttribs].type = VASurfaceAttribMemoryType; | ||
23 | + attribList[numAttribs].value.type = VAGenericValueTypeInteger; | ||
24 | + attribList[numAttribs].flags = VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE; | ||
25 | + attribList[numAttribs].value.value.i = VA_SURFACE_ATTRIB_MEM_TYPE_VA | | ||
26 | + VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2; | ||
27 | + numAttribs++; | ||
28 | } | ||
29 | else | ||
30 | { | ||
31 | -- | ||
32 | 2.40.1 | ||
33 | |||
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 @@ | |||
1 | From 80c5c6e6e671d61eae16a53fd36442993813609f Mon Sep 17 00:00:00 2001 | ||
2 | From: LeyuYao <leyu.yao@intel.com> | ||
3 | Date: Mon, 3 Jul 2023 00:58:09 +0800 | ||
4 | Subject: [PATCH 2/5] Add mocs index in patch list | ||
5 | |||
6 | For linux usage | ||
7 | |||
8 | upstream-status: backport | ||
9 | |||
10 | Backport from upstream media-driver: | ||
11 | https://github.com/intel/media-driver/commit/26d5f57cad88df823164944ad496507d22a50fb1 | ||
12 | --- | ||
13 | media_softlet/agnostic/common/hw/mhw_utilities_next.cpp | 2 ++ | ||
14 | 1 file changed, 2 insertions(+) | ||
15 | |||
16 | diff --git a/media_softlet/agnostic/common/hw/mhw_utilities_next.cpp b/media_softlet/agnostic/common/hw/mhw_utilities_next.cpp | ||
17 | index a9db7bf95..4db4e1f66 100644 | ||
18 | --- a/media_softlet/agnostic/common/hw/mhw_utilities_next.cpp | ||
19 | +++ b/media_softlet/agnostic/common/hw/mhw_utilities_next.cpp | ||
20 | @@ -290,6 +290,8 @@ MOS_STATUS Mhw_AddResourceToCmd_PatchList( | ||
21 | // Offset and command LSB parameters | ||
22 | dwOffset = pParams->dwOffset | ((*pParams->pdwCmd) & ((1 << dwLsbNum) - 1)); | ||
23 | |||
24 | + Mhw_SetMocsTableIndex(pOsInterface, pParams->presResource, pParams->mocsParams); | ||
25 | + | ||
26 | if (pParams->dwOffsetInSSH > 0) | ||
27 | { | ||
28 | // Calculate the patch offset to command buffer | ||
29 | -- | ||
30 | 2.40.1 | ||
31 | |||
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 @@ | |||
1 | From 8839e41fd18f7ed695e912ac0720c824df3905d6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Philip Langdale <philipl@overt.org> | ||
3 | Date: Wed, 30 Aug 2023 09:34:58 -0700 | ||
4 | Subject: [PATCH 3/4] Add DRM format mappings for JPEG output to softlet | ||
5 | |||
6 | This is the softlet equivalent of my previous change to add DRM format | ||
7 | mappings for the JPEG decoder output formats to the legacy code path. | ||
8 | |||
9 | Tested compilation, but don't have the hardware to test at runtime. | ||
10 | |||
11 | Upstream-Status: Backport [https://github.com/intel/media-driver/commit/ce81beded8b791d24473a173e53ae399f6a6a059] | ||
12 | Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
13 | --- | ||
14 | .../common/ddi/media_libva_interface_next.cpp | 22 +++++++++++++++++++ | ||
15 | 1 file changed, 22 insertions(+) | ||
16 | |||
17 | diff --git a/media_softlet/linux/common/ddi/media_libva_interface_next.cpp b/media_softlet/linux/common/ddi/media_libva_interface_next.cpp | ||
18 | index b3851e9b5..231268cb7 100644 | ||
19 | --- a/media_softlet/linux/common/ddi/media_libva_interface_next.cpp | ||
20 | +++ b/media_softlet/linux/common/ddi/media_libva_interface_next.cpp | ||
21 | @@ -4672,8 +4672,12 @@ uint32_t MediaLibvaInterfaceNext::GetDrmFormatOfSeparatePlane(uint32_t fourcc, i | ||
22 | { | ||
23 | case VA_FOURCC_NV12: | ||
24 | case VA_FOURCC_I420: | ||
25 | + case VA_FOURCC_IMC3: | ||
26 | case VA_FOURCC_YV12: | ||
27 | case VA_FOURCC_YV16: | ||
28 | + case VA_FOURCC_422H: | ||
29 | + case VA_FOURCC_422V: | ||
30 | + case VA_FOURCC_444P: | ||
31 | case VA_FOURCC_Y800: | ||
32 | case VA_FOURCC_RGBP: | ||
33 | case VA_FOURCC_BGRP: | ||
34 | @@ -4746,8 +4750,12 @@ uint32_t MediaLibvaInterfaceNext::GetDrmFormatOfSeparatePlane(uint32_t fourcc, i | ||
35 | case VA_FOURCC_NV12: | ||
36 | return DRM_FORMAT_GR88; | ||
37 | case VA_FOURCC_I420: | ||
38 | + case VA_FOURCC_IMC3: | ||
39 | case VA_FOURCC_YV12: | ||
40 | case VA_FOURCC_YV16: | ||
41 | + case VA_FOURCC_422H: | ||
42 | + case VA_FOURCC_422V: | ||
43 | + case VA_FOURCC_444P: | ||
44 | case VA_FOURCC_RGBP: | ||
45 | case VA_FOURCC_BGRP: | ||
46 | return DRM_FORMAT_R8; | ||
47 | @@ -4770,10 +4778,18 @@ uint32_t MediaLibvaInterfaceNext::GetDrmFormatOfCompositeObject(uint32_t fourcc) | ||
48 | return DRM_FORMAT_NV12; | ||
49 | case VA_FOURCC_I420: | ||
50 | return DRM_FORMAT_YUV420; | ||
51 | + case VA_FOURCC_IMC3: | ||
52 | + return DRM_FORMAT_YUV420; | ||
53 | case VA_FOURCC_YV12: | ||
54 | return DRM_FORMAT_YVU420; | ||
55 | case VA_FOURCC_YV16: | ||
56 | return DRM_FORMAT_YVU422; | ||
57 | + case VA_FOURCC_422H: | ||
58 | + return DRM_FORMAT_YUV422; | ||
59 | + case VA_FOURCC_422V: | ||
60 | + return DRM_FORMAT_YUV422; | ||
61 | + case VA_FOURCC_444P: | ||
62 | + return DRM_FORMAT_YUV444; | ||
63 | case VA_FOURCC_YUY2: | ||
64 | return DRM_FORMAT_YUYV; | ||
65 | case VA_FOURCC_YVYU: | ||
66 | @@ -4782,6 +4798,12 @@ uint32_t MediaLibvaInterfaceNext::GetDrmFormatOfCompositeObject(uint32_t fourcc) | ||
67 | return DRM_FORMAT_VYUY; | ||
68 | case VA_FOURCC_UYVY: | ||
69 | return DRM_FORMAT_UYVY; | ||
70 | + case VA_FOURCC_AYUV: | ||
71 | + return DRM_FORMAT_AYUV; | ||
72 | +#if VA_CHECK_VERSION(1, 13, 0) | ||
73 | + case VA_FOURCC_XYUV: | ||
74 | + return DRM_FORMAT_XYUV8888; | ||
75 | +#endif | ||
76 | case VA_FOURCC_Y210: | ||
77 | return DRM_FORMAT_Y210; | ||
78 | #if VA_CHECK_VERSION(1, 9, 0) | ||
79 | -- | ||
80 | 2.40.1 | ||
81 | |||
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..31a7be9c --- /dev/null +++ b/recipes-multimedia/libva/files/0003-Force-ARGB-surface-to-tile4-for-ACM.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From a0149ae2dc69143406843302eb7e9e5338c54475 Mon Sep 17 00:00:00 2001 | ||
2 | From: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
3 | Date: Wed, 11 Oct 2023 15:36:21 +0800 | ||
4 | Subject: [PATCH 3/7] Force ARGB surface to tile4 for ACM | ||
5 | |||
6 | Upstream-Status: Submitted [https://github.com/intel/media-driver/pull/1728] | ||
7 | |||
8 | Signed-off-by: Soon, Thean Siew <thean.siew.soon@intel.com> | ||
9 | Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
10 | --- | ||
11 | media_driver/linux/common/ddi/media_libva_util.cpp | 10 ++++++++++ | ||
12 | 1 file changed, 10 insertions(+) | ||
13 | |||
14 | diff --git a/media_driver/linux/common/ddi/media_libva_util.cpp b/media_driver/linux/common/ddi/media_libva_util.cpp | ||
15 | index 59c02f145..f91f974cc 100755 | ||
16 | --- a/media_driver/linux/common/ddi/media_libva_util.cpp | ||
17 | +++ b/media_driver/linux/common/ddi/media_libva_util.cpp | ||
18 | @@ -504,6 +504,7 @@ VAStatus DdiMediaUtil_AllocateSurface( | ||
19 | gmmCustomParams.Flags.Gpu.UnifiedAuxSurface = 0; | ||
20 | } | ||
21 | } | ||
22 | + | ||
23 | break; | ||
24 | case TILING_X: | ||
25 | gmmCustomParams.Flags.Info.TiledX = true; | ||
26 | @@ -685,6 +686,15 @@ VAStatus DdiMediaUtil_AllocateSurface( | ||
27 | } | ||
28 | } | ||
29 | } | ||
30 | + // There's no VAAPI interface for modifier query yet. As a workaround, always allocate | ||
31 | + // RGB surface as tile4. | ||
32 | + if ((format == Media_Format_A8R8G8B8 || | ||
33 | + format == Media_Format_B10G10R10A2 | | ||
34 | + format == Media_Format_A8B8G8R8 || | ||
35 | + format == Media_Format_X8R8G8B8) && !MEDIA_IS_SKU(&mediaDrvCtx->SkuTable, FtrTileY)) | ||
36 | + { | ||
37 | + gmmParams.Flags.Info.Tile4 = true; | ||
38 | + } | ||
39 | break; | ||
40 | case TILING_X: | ||
41 | gmmParams.Flags.Info.TiledX = true; | ||
42 | -- | ||
43 | 2.40.1 | ||
44 | |||
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 @@ | |||
1 | From e4f88d8a7fbde1df022a648e2cd06c1b8abbd4e4 Mon Sep 17 00:00:00 2001 | ||
2 | From: shawnli2 <shawn.li@intel.com> | ||
3 | Date: Sun, 25 Jun 2023 15:25:11 +0800 | ||
4 | Subject: [PATCH 3/5] fix vdsfc csc issue | ||
5 | |||
6 | to support ARGB8 output, need to enable csc from YUV to RGB | ||
7 | |||
8 | upstream-status: backport | ||
9 | Backport from upstream media-driver: | ||
10 | https://github.com/intel/media-driver/commit/9806aede1724d5eea3a8ddb262d1f2cbcca63456 | ||
11 | --- | ||
12 | .../Xe_XPM_base/vp/hal/packet/vp_render_sfc_xe_xpm_base.cpp | 5 +++-- | ||
13 | .../common/vp/hal/packet/vp_render_sfc_base_legacy.cpp | 4 ++-- | ||
14 | .../vp/hal/packet/vp_render_sfc_xe_lpm_plus_base.cpp | 5 +++-- | ||
15 | .../agnostic/common/vp/hal/packet/vp_render_sfc_base.cpp | 4 ++-- | ||
16 | 4 files changed, 10 insertions(+), 8 deletions(-) | ||
17 | |||
18 | 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 | ||
19 | index 24bade3fd..daccd21f0 100644 | ||
20 | --- a/media_driver/media_softlet/agnostic/Xe_M/Xe_XPM_base/vp/hal/packet/vp_render_sfc_xe_xpm_base.cpp | ||
21 | +++ b/media_driver/media_softlet/agnostic/Xe_M/Xe_XPM_base/vp/hal/packet/vp_render_sfc_xe_xpm_base.cpp | ||
22 | @@ -298,9 +298,10 @@ bool SfcRenderXe_Xpm_Base::IsOutputChannelSwapNeeded(MOS_FORMAT outputFormat) | ||
23 | bool SfcRenderXe_Xpm_Base::IsCscNeeded(SFC_CSC_PARAMS &cscParams) | ||
24 | { | ||
25 | VP_FUNC_CALL(); | ||
26 | - if (m_bVdboxToSfc && m_videoConfig.codecStandard == CODECHAL_JPEG) | ||
27 | + | ||
28 | + if (m_bVdboxToSfc && cscParams.inputFormat != cscParams.outputFormat) | ||
29 | { | ||
30 | - if (cscParams.inputFormat != cscParams.outputFormat) | ||
31 | + if (m_videoConfig.codecStandard == CODECHAL_JPEG || cscParams.outputFormat == Format_A8R8G8B8) | ||
32 | { | ||
33 | return true; | ||
34 | } | ||
35 | 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 | ||
36 | index 16cef55b3..19c99364b 100644 | ||
37 | --- a/media_driver/media_softlet/agnostic/common/vp/hal/packet/vp_render_sfc_base_legacy.cpp | ||
38 | +++ b/media_driver/media_softlet/agnostic/common/vp/hal/packet/vp_render_sfc_base_legacy.cpp | ||
39 | @@ -197,10 +197,10 @@ MOS_STATUS SfcRenderBaseLegacy::SetIefStateCscParams( | ||
40 | { | ||
41 | psfcStateParams->bCSCEnable = true; | ||
42 | pIEFStateParams->bCSCEnable = true; | ||
43 | - if (m_bVdboxToSfc && m_videoConfig.codecStandard == CODECHAL_JPEG) | ||
44 | + if (m_bVdboxToSfc) | ||
45 | { | ||
46 | m_cscInputSwapNeeded = false; | ||
47 | - if (m_videoConfig.jpeg.jpegChromaType == jpegRGB) | ||
48 | + if (m_videoConfig.jpeg.jpegChromaType == jpegRGB && m_videoConfig.codecStandard == CODECHAL_JPEG) | ||
49 | { | ||
50 | m_cscCoeff[0] = 1.000000000f; | ||
51 | m_cscCoeff[1] = 0.000000000f; | ||
52 | 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 | ||
53 | index 304fd2ffc..e9737c3c5 100644 | ||
54 | --- a/media_softlet/agnostic/Xe_M_plus/Xe_LPM_plus_base/vp/hal/packet/vp_render_sfc_xe_lpm_plus_base.cpp | ||
55 | +++ b/media_softlet/agnostic/Xe_M_plus/Xe_LPM_plus_base/vp/hal/packet/vp_render_sfc_xe_lpm_plus_base.cpp | ||
56 | @@ -636,9 +636,10 @@ bool SfcRenderXe_Lpm_Plus_Base::IsOutputChannelSwapNeeded(MOS_FORMAT outputForma | ||
57 | bool SfcRenderXe_Lpm_Plus_Base::IsCscNeeded(SFC_CSC_PARAMS &cscParams) | ||
58 | { | ||
59 | VP_FUNC_CALL(); | ||
60 | - if (m_bVdboxToSfc && m_videoConfig.codecStandard == CODECHAL_JPEG) | ||
61 | + | ||
62 | + if (m_bVdboxToSfc && cscParams.inputFormat != cscParams.outputFormat) | ||
63 | { | ||
64 | - if (cscParams.inputFormat != cscParams.outputFormat) | ||
65 | + if (m_videoConfig.codecStandard == CODECHAL_JPEG || cscParams.outputFormat == Format_A8R8G8B8) | ||
66 | { | ||
67 | return true; | ||
68 | } | ||
69 | 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 | ||
70 | index 573a0a12d..2b7c5231a 100644 | ||
71 | --- a/media_softlet/agnostic/common/vp/hal/packet/vp_render_sfc_base.cpp | ||
72 | +++ b/media_softlet/agnostic/common/vp/hal/packet/vp_render_sfc_base.cpp | ||
73 | @@ -238,10 +238,10 @@ MOS_STATUS SfcRenderBase::SetIefStateCscParams( | ||
74 | { | ||
75 | psfcStateParams->bCSCEnable = true; | ||
76 | pIEFStateParams->bCSCEnable = true; | ||
77 | - if (m_bVdboxToSfc && m_videoConfig.codecStandard == CODECHAL_JPEG) | ||
78 | + if (m_bVdboxToSfc) | ||
79 | { | ||
80 | m_cscInputSwapNeeded = false; | ||
81 | - if (m_videoConfig.jpeg.jpegChromaType == jpegRGB) | ||
82 | + if (m_videoConfig.jpeg.jpegChromaType == jpegRGB && m_videoConfig.codecStandard == CODECHAL_JPEG) | ||
83 | { | ||
84 | m_cscCoeff[0] = 1.000000000f; | ||
85 | m_cscCoeff[1] = 0.000000000f; | ||
86 | -- | ||
87 | 2.40.1 | ||
88 | |||
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 index 1d62b773..501bde3c 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,7 +1,7 @@ | |||
1 | From b2c514337d2bc6015292aac5b57a603f8ad4fed5 Mon Sep 17 00:00:00 2001 | 1 | From 9b74d435324cc61e1d63709e13e1ad755fa4ce63 Mon Sep 17 00:00:00 2001 |
2 | From: Lu-Anxiao <anxiao.lu@intel.com> | 2 | From: Lu-Anxiao <anxiao.lu@intel.com> |
3 | Date: Mon, 9 Oct 2023 20:47:44 +0800 | 3 | Date: Mon, 9 Oct 2023 20:47:44 +0800 |
4 | Subject: [PATCH] Set sRGB color space for non-video wall and no background | 4 | Subject: [PATCH 4/7] Set sRGB color space for non-video wall and no background |
5 | colorfill cases. | 5 | colorfill cases. |
6 | 6 | ||
7 | * [VP] Set sRGB color space for non-video wall and no background colorfill cases. | 7 | * [VP] Set sRGB color space for non-video wall and no background colorfill cases. |
@@ -10,14 +10,15 @@ This solves the regression caused by | |||
10 | https://github.com/intel/media-driver/commit/a9c2df7b01c2f33775c676f5490ea274410e9db2. | 10 | https://github.com/intel/media-driver/commit/a9c2df7b01c2f33775c676f5490ea274410e9db2. |
11 | 11 | ||
12 | Upstream-Status: Backport [https://github.com/intel/media-driver/commit/509ab5f6c6d447575c61e32d323aa4e7aa212fbd] | 12 | Upstream-Status: Backport [https://github.com/intel/media-driver/commit/509ab5f6c6d447575c61e32d323aa4e7aa212fbd] |
13 | Signed-off-by: Chan, Xu Pian <xu.pian.chan@intel.com> | 13 | |
14 | Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
14 | --- | 15 | --- |
15 | .../linux/common/vp/ddi/media_libva_vp.c | 18 +++++++++++++----- | 16 | .../linux/common/vp/ddi/media_libva_vp.c | 18 +++++++++++++----- |
16 | .../linux/common/vp/ddi/ddi_vp_functions.cpp | 19 ++++++++++++++----- | 17 | .../linux/common/vp/ddi/ddi_vp_functions.cpp | 19 ++++++++++++++----- |
17 | 2 files changed, 27 insertions(+), 10 deletions(-) | 18 | 2 files changed, 27 insertions(+), 10 deletions(-) |
18 | 19 | ||
19 | diff --git a/media_driver/linux/common/vp/ddi/media_libva_vp.c b/media_driver/linux/common/vp/ddi/media_libva_vp.c | 20 | diff --git a/media_driver/linux/common/vp/ddi/media_libva_vp.c b/media_driver/linux/common/vp/ddi/media_libva_vp.c |
20 | index 2ef610d35..4e10905ff 100644 | 21 | index 3c7407249..dcff2555a 100644 |
21 | --- a/media_driver/linux/common/vp/ddi/media_libva_vp.c | 22 | --- a/media_driver/linux/common/vp/ddi/media_libva_vp.c |
22 | +++ b/media_driver/linux/common/vp/ddi/media_libva_vp.c | 23 | +++ b/media_driver/linux/common/vp/ddi/media_libva_vp.c |
23 | @@ -1148,7 +1148,7 @@ DdiVp_SetProcPipelineParams( | 24 | @@ -1148,7 +1148,7 @@ DdiVp_SetProcPipelineParams( |
@@ -53,10 +54,10 @@ index 2ef610d35..4e10905ff 100644 | |||
53 | { | 54 | { |
54 | MOS_FreeMemAndSetNull(pVpHalRenderParams->pColorFillParams); | 55 | MOS_FreeMemAndSetNull(pVpHalRenderParams->pColorFillParams); |
55 | diff --git a/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp b/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp | 56 | diff --git a/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp b/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp |
56 | index fa02bf147..fe64bb8ae 100644 | 57 | index 7ebad0b59..7c2e4a0e5 100644 |
57 | --- a/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp | 58 | --- a/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp |
58 | +++ b/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp | 59 | +++ b/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp |
59 | @@ -2085,8 +2085,9 @@ VAStatus DdiVpFunctions::SetBackgroundColorfill( | 60 | @@ -2111,8 +2111,9 @@ VAStatus DdiVpFunctions::SetBackgroundColorfill( |
60 | { | 61 | { |
61 | DDI_VP_FUNC_ENTER; | 62 | DDI_VP_FUNC_ENTER; |
62 | DDI_VP_CHK_NULL(vpHalRenderParams, "nullptr vpHalRenderParams.", VA_STATUS_ERROR_INVALID_PARAMETER); | 63 | DDI_VP_CHK_NULL(vpHalRenderParams, "nullptr vpHalRenderParams.", VA_STATUS_ERROR_INVALID_PARAMETER); |
@@ -67,7 +68,7 @@ index fa02bf147..fe64bb8ae 100644 | |||
67 | { | 68 | { |
68 | if (vpHalRenderParams->pColorFillParams == nullptr) | 69 | if (vpHalRenderParams->pColorFillParams == nullptr) |
69 | { | 70 | { |
70 | @@ -2095,10 +2096,18 @@ VAStatus DdiVpFunctions::SetBackgroundColorfill( | 71 | @@ -2121,10 +2122,18 @@ VAStatus DdiVpFunctions::SetBackgroundColorfill( |
71 | 72 | ||
72 | DDI_VP_CHK_NULL(vpHalRenderParams->pColorFillParams, "nullptr pColorFillParams.", VA_STATUS_ERROR_UNKNOWN); | 73 | DDI_VP_CHK_NULL(vpHalRenderParams->pColorFillParams, "nullptr pColorFillParams.", VA_STATUS_ERROR_UNKNOWN); |
73 | 74 | ||
@@ -91,5 +92,5 @@ index fa02bf147..fe64bb8ae 100644 | |||
91 | else | 92 | else |
92 | { | 93 | { |
93 | -- | 94 | -- |
94 | 2.25.1 | 95 | 2.40.1 |
95 | 96 | ||
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 @@ | |||
1 | From bd96cac9a35a8ca98c7e2b8f622afb75f31ed221 Mon Sep 17 00:00:00 2001 | ||
2 | From: JayYang <jay.yang@intel.com> | ||
3 | Date: Thu, 27 Jul 2023 21:05:50 +0800 | ||
4 | Subject: [PATCH 4/5] XRGB force to tile4 | ||
5 | |||
6 | Force BGRX surfaces to tile4 because glimagesink plugins backend support by 3D mesa | ||
7 | driver is reporting back the XR24 (BGRx) for dmabuf modifier case is 0x0100000000000009 | ||
8 | |||
9 | upstream-status: backport | ||
10 | |||
11 | Backport from upstream media-driver: | ||
12 | https://github.com/intel/media-driver/commit/b6d038491372f39330b33620ed8bdb8255b57a66 | ||
13 | --- | ||
14 | media_softlet/linux/common/ddi/media_libva_util_next.cpp | 5 ++++- | ||
15 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/media_softlet/linux/common/ddi/media_libva_util_next.cpp b/media_softlet/linux/common/ddi/media_libva_util_next.cpp | ||
18 | index 1852e59d2..b31607945 100644 | ||
19 | --- a/media_softlet/linux/common/ddi/media_libva_util_next.cpp | ||
20 | +++ b/media_softlet/linux/common/ddi/media_libva_util_next.cpp | ||
21 | @@ -649,7 +649,10 @@ VAStatus MediaLibvaUtilNext::GenerateGmmParamsForInternalSurface( | ||
22 | } | ||
23 | // For ARGB surface, always allocate it as tile4. | ||
24 | // This is a WA for ExportSurfaceHandle because modifer for tile64 isn't defined. | ||
25 | - if ((params.format == Media_Format_A8R8G8B8 || params.format == Media_Format_B10G10R10A2 || params.format == Media_Format_A8B8G8R8) && !MEDIA_IS_SKU(&mediaDrvCtx->SkuTable, FtrTileY)) | ||
26 | + if ((params.format == Media_Format_A8R8G8B8 || | ||
27 | + params.format == Media_Format_B10G10R10A2 || | ||
28 | + params.format == Media_Format_A8B8G8R8 || | ||
29 | + params.format == Media_Format_X8R8G8B8) && !MEDIA_IS_SKU(&mediaDrvCtx->SkuTable, FtrTileY)) | ||
30 | { | ||
31 | gmmParams.Flags.Info.Tile4 = true; | ||
32 | } | ||
33 | -- | ||
34 | 2.40.1 | ||
35 | |||
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..3d02fef3 --- /dev/null +++ b/recipes-multimedia/libva/files/0005-XRGB-force-to-do-swizzle-for-AVC-HEVC.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From c2a7a53a71b252593fb31cba24cddf7a5f466ba1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Vincent Cheah Beng Keat <vincent.beng.keat.cheah@intel.com> | ||
3 | Date: Wed, 18 Oct 2023 10:49:13 +0800 | ||
4 | Subject: [PATCH 5/7] XRGB force to do swizzle for AVC/HEVC | ||
5 | |||
6 | This is to fix msdkh264enc/msdkh265enc incorrect encoded output when having BGRx input. | ||
7 | |||
8 | Upstream-Status: Backport [https://github.com/intel/media-driver/commit/433068b0db298f9592880f25601449366b4aa8d3] | ||
9 | |||
10 | Signed-off-by: Cheah, Vincent Beng Keat <vincent.beng.keat.cheah@intel.com> | ||
11 | --- | ||
12 | .../linux/common/codec/ddi/enc/ddi_encode_avc_specific.h | 1 + | ||
13 | .../linux/common/codec/ddi/enc/ddi_encode_hevc_specific.h | 6 ++++-- | ||
14 | 2 files changed, 5 insertions(+), 2 deletions(-) | ||
15 | |||
16 | 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 | ||
17 | index 057af4420..e4a1cbe58 100644 | ||
18 | --- a/media_softlet/linux/common/codec/ddi/enc/ddi_encode_avc_specific.h | ||
19 | +++ b/media_softlet/linux/common/codec/ddi/enc/ddi_encode_avc_specific.h | ||
20 | @@ -557,6 +557,7 @@ private: | ||
21 | inline bool NeedDisplayFormatSwizzle(DDI_MEDIA_SURFACE *rawSurface) | ||
22 | { | ||
23 | if (Media_Format_A8R8G8B8 == rawSurface->format || | ||
24 | + Media_Format_X8R8G8B8 == rawSurface->format || | ||
25 | Media_Format_B10G10R10A2 == rawSurface->format) | ||
26 | { | ||
27 | return true; | ||
28 | 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 | ||
29 | index 65483b43d..56e688e4a 100644 | ||
30 | --- a/media_softlet/linux/common/codec/ddi/enc/ddi_encode_hevc_specific.h | ||
31 | +++ b/media_softlet/linux/common/codec/ddi/enc/ddi_encode_hevc_specific.h | ||
32 | @@ -293,14 +293,16 @@ private: | ||
33 | bool ret = false; | ||
34 | |||
35 | if (Media_Format_A8R8G8B8 == rawSurface->format || | ||
36 | - Media_Format_B10G10R10A2 == rawSurface->format) | ||
37 | + Media_Format_X8R8G8B8 == rawSurface->format || | ||
38 | + Media_Format_B10G10R10A2 == rawSurface->format) | ||
39 | { | ||
40 | ret = true; | ||
41 | } | ||
42 | |||
43 | if (ret && | ||
44 | (Media_Format_A8R8G8B8 == reconSurface->format || | ||
45 | - Media_Format_B10G10R10A2 == reconSurface->format)) | ||
46 | + Media_Format_X8R8G8B8 == reconSurface->format || | ||
47 | + Media_Format_B10G10R10A2 == reconSurface->format)) | ||
48 | { | ||
49 | ret = false; | ||
50 | } | ||
51 | -- | ||
52 | 2.40.1 | ||
53 | |||
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..2e3a91fe --- /dev/null +++ b/recipes-multimedia/libva/files/0006-Add-DG2-DIDs.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From 741d8692cee1a73a45a6cd819a52ed9716012d20 Mon Sep 17 00:00:00 2001 | ||
2 | From: JayYang <jay.yang@intel.com> | ||
3 | Date: Mon, 30 Oct 2023 13:37:49 +0800 | ||
4 | Subject: [PATCH 6/7] Add DG2 DIDs | ||
5 | |||
6 | Add some device IDs for DG2. | ||
7 | |||
8 | Upstream-Status: Backport [https://github.com/intel/media-driver/commit/e7ba5c82f59764ac6700f6ebeb0e6f459d85e27c] | ||
9 | Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
10 | --- | ||
11 | media_driver/linux/Xe_M/ddi/media_sysinfo_xe.cpp | 12 ++++++++++++ | ||
12 | 1 file changed, 12 insertions(+) | ||
13 | |||
14 | diff --git a/media_driver/linux/Xe_M/ddi/media_sysinfo_xe.cpp b/media_driver/linux/Xe_M/ddi/media_sysinfo_xe.cpp | ||
15 | index fe15b419c..7ff3527f7 100644 | ||
16 | --- a/media_driver/linux/Xe_M/ddi/media_sysinfo_xe.cpp | ||
17 | +++ b/media_driver/linux/Xe_M/ddi/media_sysinfo_xe.cpp | ||
18 | @@ -459,6 +459,18 @@ static bool dg2Gt4Device56B0 = DeviceInfoFactory<GfxDeviceInfo>:: | ||
19 | static bool dg2Gt4Device56B1 = DeviceInfoFactory<GfxDeviceInfo>:: | ||
20 | RegisterDevice(0x56B1, &dg2Gt4Info); | ||
21 | |||
22 | +static bool dg2Gt4Device56BA = DeviceInfoFactory<GfxDeviceInfo>:: | ||
23 | + RegisterDevice(0x56BA, &dg2Gt4Info); | ||
24 | + | ||
25 | +static bool dg2Gt4Device56BB = DeviceInfoFactory<GfxDeviceInfo>:: | ||
26 | + RegisterDevice(0x56BB, &dg2Gt4Info); | ||
27 | + | ||
28 | +static bool dg2Gt4Device56BC = DeviceInfoFactory<GfxDeviceInfo>:: | ||
29 | + RegisterDevice(0x56BC, &dg2Gt4Info); | ||
30 | + | ||
31 | +static bool dg2Gt4Device56BD = DeviceInfoFactory<GfxDeviceInfo>:: | ||
32 | + RegisterDevice(0x56BD, &dg2Gt4Info); | ||
33 | + | ||
34 | static bool dg2Gt4Device56B2 = DeviceInfoFactory<GfxDeviceInfo>:: | ||
35 | RegisterDevice(0x56B2, &dg2Gt4Info); | ||
36 | |||
37 | -- | ||
38 | 2.40.1 | ||
39 | |||
diff --git a/recipes-multimedia/libva/intel-media-driver_23.2.4.bb b/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" | |||
19 | DEPENDS += "libva gmmlib" | 19 | DEPENDS += "libva gmmlib" |
20 | 20 | ||
21 | SRC_URI = "git://github.com/intel/media-driver.git;protocol=https;nobranch=1 \ | 21 | SRC_URI = "git://github.com/intel/media-driver.git;protocol=https;nobranch=1 \ |
22 | file://0001-ARGB-force-to-tile4.patch \ | 22 | file://0001-Disable-VP9-padding-on-MTL.patch \ |
23 | file://0002-Add-mocs-index-in-patch-list.patch \ | 23 | file://0002-Add-VASurfaceAttribMemoryType-for-ACM.patch \ |
24 | file://0003-fix-vdsfc-csc-issue.patch \ | 24 | file://0003-Force-ARGB-surface-to-tile4-for-ACM.patch \ |
25 | file://0004-XRGB-force-to-tile4.patch \ | 25 | file://0004-Set-sRGB-color-space-for-non-video-wall-and-no-backg.patch \ |
26 | file://0001-Force-to-render-path-according-to-app-setting.patch \ | 26 | file://0005-XRGB-force-to-do-swizzle-for-AVC-HEVC.patch \ |
27 | file://0002-Add-DRM-format-mappings-for-JPEG-decoder-output.patch \ | 27 | file://0006-Add-DG2-DIDs.patch \ |
28 | file://0003-Add-DRM-format-mappings-for-JPEG-output-to-softlet.patch \ | ||
29 | file://0004-Disable-vp9-padding-on-mtl.patch \ | ||
30 | file://0001-Fix-FC-Corruption-When-Blending-without-Colorfill.patch \ | ||
31 | file://0001-Fix-FC-Corruption-When-Blending-without-Colorfill-in.patch \ | ||
32 | file://0001-Set-sRGB-color-space-for-non-video-wall-and-no-backg.patch \ | ||
33 | " | 28 | " |
34 | 29 | ||
35 | SRCREV = "cf942344b9e439d19873f1d47c0c890d7c63b6ad" | 30 | SRCREV = "0f36979420a33bf12d17fa939af8d16b36ef8fcd" |
36 | S = "${WORKDIR}/git" | 31 | S = "${WORKDIR}/git" |
37 | 32 | ||
38 | COMPATIBLE_HOST:x86-x32 = "null" | 33 | COMPATIBLE_HOST:x86-x32 = "null" |