diff options
Diffstat (limited to 'recipes-multimedia/libva/files/0001-Fix-FC-Corruption-When-Blending-without-Colorfill.patch')
-rw-r--r-- | recipes-multimedia/libva/files/0001-Fix-FC-Corruption-When-Blending-without-Colorfill.patch | 79 |
1 files changed, 79 insertions, 0 deletions
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 new file mode 100644 index 00000000..620d0550 --- /dev/null +++ b/recipes-multimedia/libva/files/0001-Fix-FC-Corruption-When-Blending-without-Colorfill.patch | |||
@@ -0,0 +1,79 @@ | |||
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 | |||