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