diff options
Diffstat (limited to 'recipes-multimedia/libva/files/0001-Fix-FC-Corruption-When-Blending-without-Colorfill-in.patch')
-rw-r--r-- | recipes-multimedia/libva/files/0001-Fix-FC-Corruption-When-Blending-without-Colorfill-in.patch | 96 |
1 files changed, 0 insertions, 96 deletions
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 | |||