diff options
Diffstat (limited to 'recipes-multimedia/libva/files/0007-Skip-report-keys.patch')
-rw-r--r-- | recipes-multimedia/libva/files/0007-Skip-report-keys.patch | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/recipes-multimedia/libva/files/0007-Skip-report-keys.patch b/recipes-multimedia/libva/files/0007-Skip-report-keys.patch new file mode 100644 index 00000000..459ff490 --- /dev/null +++ b/recipes-multimedia/libva/files/0007-Skip-report-keys.patch | |||
@@ -0,0 +1,78 @@ | |||
1 | From b1aebef4d342c77fc2b9c5efbf20aeb2aa9d634e Mon Sep 17 00:00:00 2001 | ||
2 | From: Wang_Pingli <pingli.wang@intel.com> | ||
3 | Date: Thu, 28 Dec 2023 16:44:40 +0800 | ||
4 | Subject: [PATCH 07/12] Skip report keys | ||
5 | |||
6 | Skip to report keys | ||
7 | |||
8 | Upstream-Status: Backport [https://github.com/intel/media-driver/commit/68ce25b0a6fa90614eb4734c8680aa4e149e8323] | ||
9 | Signed-off-by: Lim, Siew Hoon <siew.hoon.lim@intel.com> | ||
10 | --- | ||
11 | .../os/osservice/mos_utilities_specific.cpp | 30 +++++++++++++++++-- | ||
12 | 1 file changed, 28 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp b/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp | ||
15 | index b5df29f06..96785e21e 100644 | ||
16 | --- a/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp | ||
17 | +++ b/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp | ||
18 | @@ -67,6 +67,8 @@ int32_t g_mosMemoryFailSimulateAllocCounter = 0; | ||
19 | int32_t *MosUtilities::m_mosAllocMemoryFailSimulateAllocCounter = &g_mosMemoryFailSimulateAllocCounter; | ||
20 | #endif | ||
21 | |||
22 | +static bool s_skipToReportReg = false; | ||
23 | + | ||
24 | double MosUtilities::MosGetTime() | ||
25 | { | ||
26 | struct timespec ts = {}; | ||
27 | @@ -1551,6 +1553,10 @@ MOS_STATUS MosUtilities::MosInitializeReg(RegBufferMap ®BufferMap) | ||
28 | { | ||
29 | std::string id = ""; | ||
30 | |||
31 | + static const char *disableReportRegKeyList[] = { | ||
32 | + "INTEL MEDIA ALLOC MODE" | ||
33 | + }; | ||
34 | + static const uint32_t disableReportRegKeyListCount = sizeof(disableReportRegKeyList) / sizeof(disableReportRegKeyList[0]); | ||
35 | while(!regStream.eof()) | ||
36 | { | ||
37 | std::string line = ""; | ||
38 | @@ -1585,8 +1591,22 @@ MOS_STATUS MosUtilities::MosInitializeReg(RegBufferMap ®BufferMap) | ||
39 | { | ||
40 | std::string name = line.substr(0,pos); | ||
41 | std::string value = line.substr(pos+1); | ||
42 | - auto &keys = regBufferMap[id]; | ||
43 | - keys[name] = value; | ||
44 | + if (name.size() > 0 && value.size() > 0) | ||
45 | + { | ||
46 | + auto &keys = regBufferMap[id]; | ||
47 | + keys[name] = value; | ||
48 | + if (s_skipToReportReg == false && id == USER_SETTING_CONFIG_PATH) | ||
49 | + { | ||
50 | + for (uint32_t i = 0; i < disableReportRegKeyListCount; i++) | ||
51 | + { | ||
52 | + if (strcmp(name.c_str(), disableReportRegKeyList[i]) == 0) | ||
53 | + { | ||
54 | + s_skipToReportReg = true; | ||
55 | + break; | ||
56 | + } | ||
57 | + } | ||
58 | + } | ||
59 | + } | ||
60 | } | ||
61 | } | ||
62 | } | ||
63 | @@ -1606,6 +1626,12 @@ MOS_STATUS MosUtilities::MosInitializeReg(RegBufferMap ®BufferMap) | ||
64 | MOS_STATUS MosUtilities::MosUninitializeReg(RegBufferMap ®BufferMap) | ||
65 | { | ||
66 | MOS_STATUS status = MOS_STATUS_SUCCESS; | ||
67 | + | ||
68 | + if (s_skipToReportReg) | ||
69 | + { | ||
70 | + return MOS_STATUS_SUCCESS; | ||
71 | + } | ||
72 | + | ||
73 | if (regBufferMap.size() == 0) | ||
74 | { | ||
75 | return MOS_STATUS_SUCCESS; | ||
76 | -- | ||
77 | 2.40.1 | ||
78 | |||