summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia
diff options
context:
space:
mode:
authorTeng, Jin Chung <jin.chung.teng@intel.com>2021-07-23 01:38:44 (GMT)
committerAnuj Mittal <anuj.mittal@intel.com>2021-07-23 08:06:20 (GMT)
commit3aec137ac5da69e75e60659f3064e8fb7ed8fb7a (patch)
treefff53fb330c4492df905bf15ae8ce19127cbaa98 /recipes-multimedia
parent0c37f3522f5a9fa07f5d9503744d70257bf5b29c (diff)
downloadmeta-intel-3aec137ac5da69e75e60659f3064e8fb7ed8fb7a.tar.gz
intel media-driver: Exposing the registry to disable scalability
Disabling scalibility to fix certain format not able to decode until scalability feature is ready. Signed-off-by: Teng, Jin Chung <jin.chung.teng@intel.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'recipes-multimedia')
-rw-r--r--recipes-multimedia/libva/files/0001-Expose-the-reg-to-disable-scalability.patch178
-rw-r--r--recipes-multimedia/libva/intel-media-driver_21.2.3.bb1
2 files changed, 179 insertions, 0 deletions
diff --git a/recipes-multimedia/libva/files/0001-Expose-the-reg-to-disable-scalability.patch b/recipes-multimedia/libva/files/0001-Expose-the-reg-to-disable-scalability.patch
new file mode 100644
index 0000000..03d9431
--- /dev/null
+++ b/recipes-multimedia/libva/files/0001-Expose-the-reg-to-disable-scalability.patch
@@ -0,0 +1,178 @@
1From 2cc1938f4692c0310df98726cc03d9d55d52e794 Mon Sep 17 00:00:00 2001
2From: "Xu, Zhengguo" <zhengguo.xu@intel.com>
3Date: Mon, 12 Jul 2021 11:14:53 +0800
4Subject: [PATCH] Expose the reg to disable scalability
5
6This reg only works in release-internal/debug version. Expose it in release version now.
7
8This patch was imported from iHD media-driver git server
9(https://github.com/intel/media-driver.git) as of pull request
10https://github.com/intel/media-driver/pull/1221
11
12Upstream-status: Submitted
13Signed-off-by: jinchung <jin.chung.teng@intel.com>
14---
15 .../agnostic/common/codec/hal/codechal_decode_scalability.cpp | 5 +----
16 media_driver/agnostic/common/os/mos_os.h | 3 ++-
17 media_driver/agnostic/common/os/mos_utilities.cpp | 2 +-
18 media_driver/agnostic/gen11/hw/vdbox/mhw_vdbox_mfx_g11_X.h | 5 +----
19 .../agnostic/gen12/codec/hal/codechal_decode_scalability_g12.cpp | 8 +++-----
20 media_driver/agnostic/gen12/hw/vdbox/mhw_vdbox_mfx_g12_X.h | 5 +----
21 media_driver/linux/common/os/mos_os_specific.c | 2 +-
22 7 files changed, 10 insertions(+), 20 deletions(-)
23 mode change 100644 => 100755 media_driver/agnostic/common/codec/hal/codechal_decode_scalability.cpp
24 mode change 100644 => 100755 media_driver/agnostic/common/os/mos_os.h
25 mode change 100644 => 100755 media_driver/agnostic/common/os/mos_utilities.cpp
26 mode change 100644 => 100755 media_driver/agnostic/gen11/hw/vdbox/mhw_vdbox_mfx_g11_X.h
27 mode change 100644 => 100755 media_driver/agnostic/gen12/codec/hal/codechal_decode_scalability_g12.cpp
28 mode change 100644 => 100755 media_driver/agnostic/gen12/hw/vdbox/mhw_vdbox_mfx_g12_X.h
29 mode change 100644 => 100755 media_driver/linux/common/os/mos_os_specific.c
30
31diff --git a/media_driver/agnostic/common/codec/hal/codechal_decode_scalability.cpp b/media_driver/agnostic/common/codec/hal/codechal_decode_scalability.cpp
32old mode 100644
33new mode 100755
34index a7719c1..f6d71ef
35--- a/media_driver/agnostic/common/codec/hal/codechal_decode_scalability.cpp
36+++ b/media_driver/agnostic/common/codec/hal/codechal_decode_scalability.cpp
37@@ -1968,10 +1968,7 @@ MOS_STATUS CodecHalDecodeScalability_InitializeState (
38 vdboxNum = vdboxMfxInterface->GetNumVdbox();
39
40 if (vdboxNum < 2
41-#if (_DEBUG || _RELEASE_INTERNAL)
42- || !osInterface->bHcpDecScalabilityMode
43-#endif
44- )
45+ || !osInterface->bHcpDecScalabilityMode)
46 {
47 eStatus = MOS_STATUS_INVALID_PARAMETER;
48 CODECHAL_DECODE_ASSERTMESSAGE("not support scalability on this platform.");
49diff --git a/media_driver/agnostic/common/os/mos_os.h b/media_driver/agnostic/common/os/mos_os.h
50old mode 100644
51new mode 100755
52index dafa184..f59f1ff
53--- a/media_driver/agnostic/common/os/mos_os.h
54+++ b/media_driver/agnostic/common/os/mos_os.h
55@@ -1406,9 +1406,10 @@ typedef struct _MOS_INTERFACE
56 #endif // MOS_MEDIASOLO_SUPPORTED
57 bool VEEnable;
58 bool bCanEnableSecureRt;
59+
60+ int32_t bHcpDecScalabilityMode; //!< enable scalability decode {mode: default, user force, false}
61 #if (_DEBUG || _RELEASE_INTERNAL)
62 MOS_FORCE_VEBOX eForceVebox; //!< Force select Vebox
63- int32_t bHcpDecScalabilityMode; //!< enable scalability decode {mode: default, user force, false}
64 int32_t bEnableDbgOvrdInVE; //!< It is for all scalable engines: used together with KMD VE for UMD to specify an engine directly
65 int32_t bSoftReset; //!< trigger soft reset
66 #endif // (_DEBUG || _RELEASE_INTERNAL)
67diff --git a/media_driver/agnostic/common/os/mos_utilities.cpp b/media_driver/agnostic/common/os/mos_utilities.cpp
68old mode 100644
69new mode 100755
70index 74c46e7..15ced88
71--- a/media_driver/agnostic/common/os/mos_utilities.cpp
72+++ b/media_driver/agnostic/common/os/mos_utilities.cpp
73@@ -3858,7 +3858,7 @@ static MOS_USER_FEATURE_VALUE MOSUserFeatureDescFields[__MOS_USER_FEATURE_KEY_MA
74 MOS_USER_FEATURE_VALUE_TYPE_BOOL,
75 "0",
76 "TRUE for Enabling KMD Virtual Engine Debug Override. (Default FALSE: not override"),
77- MOS_DECLARE_UF_KEY_DBGONLY(__MEDIA_USER_FEATURE_VALUE_ENABLE_HCP_SCALABILITY_DECODE_ID,
78+ MOS_DECLARE_UF_KEY(__MEDIA_USER_FEATURE_VALUE_ENABLE_HCP_SCALABILITY_DECODE_ID,
79 "Enable HCP Scalability Decode",
80 __MEDIA_USER_FEATURE_SUBKEY_INTERNAL,
81 __MEDIA_USER_FEATURE_SUBKEY_REPORT,
82diff --git a/media_driver/agnostic/gen11/hw/vdbox/mhw_vdbox_mfx_g11_X.h b/media_driver/agnostic/gen11/hw/vdbox/mhw_vdbox_mfx_g11_X.h
83old mode 100644
84new mode 100755
85index ca6f30b..79e60b3
86--- a/media_driver/agnostic/gen11/hw/vdbox/mhw_vdbox_mfx_g11_X.h
87+++ b/media_driver/agnostic/gen11/hw/vdbox/mhw_vdbox_mfx_g11_X.h
88@@ -119,11 +119,8 @@ public:
89 m_osInterface = osInterface;
90
91 if (m_numVdbox > 1
92-#if (_DEBUG || _RELEASE_INTERNAL)
93 && m_osInterface != nullptr
94- && m_osInterface->bHcpDecScalabilityMode
95-#endif
96- )
97+ && m_osInterface->bHcpDecScalabilityMode)
98 {
99 m_scalabilitySupported = true;
100 }
101diff --git a/media_driver/agnostic/gen12/codec/hal/codechal_decode_scalability_g12.cpp b/media_driver/agnostic/gen12/codec/hal/codechal_decode_scalability_g12.cpp
102old mode 100644
103new mode 100755
104index 857397b..6a6d3a8
105--- a/media_driver/agnostic/gen12/codec/hal/codechal_decode_scalability_g12.cpp
106+++ b/media_driver/agnostic/gen12/codec/hal/codechal_decode_scalability_g12.cpp
107@@ -927,10 +927,7 @@ MOS_STATUS CodecHalDecodeScalability_InitializeState_G12(
108 vdboxNum = vdboxMfxInterface->GetNumVdbox();
109
110 if (vdboxNum < 2
111-#if (_DEBUG || _RELEASE_INTERNAL)
112- || !osInterface->bHcpDecScalabilityMode
113-#endif
114- )
115+ || !osInterface->bHcpDecScalabilityMode)
116 {
117 eStatus = MOS_STATUS_INVALID_PARAMETER;
118 CODECHAL_DECODE_ASSERTMESSAGE("not support scalability on this platform.");
119@@ -1587,13 +1584,14 @@ MOS_STATUS CodecHalDecodeScalability_DecidePipeNum_G12(
120 bCanEnableRealTile = !(static_cast<PCODECHAL_DECODE_SCALABILITY_STATE_G12>(pScalState))->bDisableRtMode;
121 if (!pScalStateG12->bEnableRtMultiPhase)
122 u8MaxTileColumn = 2;
123+#endif
124 if(!bCanEnableScalability
125 && pOsInterface
126 && (pOsInterface->bHcpDecScalabilityMode == MOS_SCALABILITY_ENABLE_MODE_USER_FORCE))
127 {
128 bCanEnableScalability = true;
129 }
130-#endif
131+
132 bCanEnableRealTile = bCanEnableRealTile && pInitParamsG12->bIsTileEnabled && (pInitParams->u8NumTileColumns > 1) &&
133 (pInitParams->u8NumTileColumns <= u8MaxTileColumn) && (pInitParams->u8NumTileRows <= HEVC_NUM_MAX_TILE_ROW) &&
134 pInitParamsG12->bHasSubsetParams;
135diff --git a/media_driver/agnostic/gen12/hw/vdbox/mhw_vdbox_mfx_g12_X.h b/media_driver/agnostic/gen12/hw/vdbox/mhw_vdbox_mfx_g12_X.h
136old mode 100644
137new mode 100755
138index 88f37f2..4af87aa
139--- a/media_driver/agnostic/gen12/hw/vdbox/mhw_vdbox_mfx_g12_X.h
140+++ b/media_driver/agnostic/gen12/hw/vdbox/mhw_vdbox_mfx_g12_X.h
141@@ -118,11 +118,8 @@ public:
142
143 m_osInterface = osInterface;
144 if (m_numVdbox > 1
145-#if (_DEBUG || _RELEASE_INTERNAL)
146 && m_osInterface != nullptr
147- && m_osInterface->bHcpDecScalabilityMode
148-#endif
149- )
150+ && m_osInterface->bHcpDecScalabilityMode)
151 {
152 m_scalabilitySupported = true;
153 }
154diff --git a/media_driver/linux/common/os/mos_os_specific.c b/media_driver/linux/common/os/mos_os_specific.c
155old mode 100644
156new mode 100755
157index b07739a..610f2ae
158--- a/media_driver/linux/common/os/mos_os_specific.c
159+++ b/media_driver/linux/common/os/mos_os_specific.c
160@@ -7286,7 +7286,6 @@ static MOS_STATUS Mos_Specific_InitInterface_Ve(
161 osInterface->bGucSubmission = true;
162 }
163
164-#if (_DEBUG || _RELEASE_INTERNAL)
165 //Read Scalable/Legacy Decode mode on Gen11+
166 //1:by default for scalable decode mode
167 //0:for legacy decode mode
168@@ -7304,6 +7303,7 @@ static MOS_STATUS Mos_Specific_InitInterface_Ve(
169 osInterface->bHcpDecScalabilityMode = MOS_SCALABILITY_ENABLE_MODE_USER_FORCE;
170 }
171
172+#if (_DEBUG || _RELEASE_INTERNAL)
173 osInterface->frameSplit = false;
174 MOS_ZeroMemory(&userFeatureData, sizeof(userFeatureData));
175 MOS_UserFeature_ReadValue_ID(
176--
1772.7.4
178
diff --git a/recipes-multimedia/libva/intel-media-driver_21.2.3.bb b/recipes-multimedia/libva/intel-media-driver_21.2.3.bb
index 3f1eec9..e955f15 100644
--- a/recipes-multimedia/libva/intel-media-driver_21.2.3.bb
+++ b/recipes-multimedia/libva/intel-media-driver_21.2.3.bb
@@ -20,6 +20,7 @@ DEPENDS += "libva gmmlib"
20 20
21SRC_URI = "git://github.com/intel/media-driver.git;protocol=https;nobranch=1 \ 21SRC_URI = "git://github.com/intel/media-driver.git;protocol=https;nobranch=1 \
22 file://0001-VP-Fix-2pass-CSC-PROCAMP-not-work-issue.patch \ 22 file://0001-VP-Fix-2pass-CSC-PROCAMP-not-work-issue.patch \
23 file://0001-Expose-the-reg-to-disable-scalability.patch \
23 " 24 "
24 25
25SRCREV = "008fb3b400dd906276f999eeaef3f49d52fd3d05" 26SRCREV = "008fb3b400dd906276f999eeaef3f49d52fd3d05"