diff options
Diffstat (limited to 'recipes-multimedia')
-rw-r--r-- | recipes-multimedia/libva/files/0001-Media-Common-Fix-the-user-setting-memory-free.patch | 86 | ||||
-rw-r--r-- | recipes-multimedia/libva/intel-media-driver_21.3.5.bb | 1 |
2 files changed, 87 insertions, 0 deletions
diff --git a/recipes-multimedia/libva/files/0001-Media-Common-Fix-the-user-setting-memory-free.patch b/recipes-multimedia/libva/files/0001-Media-Common-Fix-the-user-setting-memory-free.patch new file mode 100644 index 00000000..e513e0aa --- /dev/null +++ b/recipes-multimedia/libva/files/0001-Media-Common-Fix-the-user-setting-memory-free.patch | |||
@@ -0,0 +1,86 @@ | |||
1 | From 437e63b6c35eb5d12aac18d7f76ce1a702ad16e0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
3 | Date: Thu, 2 Dec 2021 15:50:33 +0000 | ||
4 | Subject: [PATCH] [Media Common] Fix the user setting memory free | ||
5 | |||
6 | From 4b8a411f2b8df112cbb5dbf8562735700cd15cf1 Mon Sep 17 00:00:00 2001 | ||
7 | From: "Wang, Pingli" <pingli.wang@intel.com> | ||
8 | Date: Thu, 2 Dec 2021 17:57:50 +0800 | ||
9 | Subject: [PATCH] [Media Common]Fix the user setting memory free | ||
10 | |||
11 | This commit fix the #1300 | ||
12 | |||
13 | Signed-off-by: Wang, Pingli <pingli.wang@intel.com> | ||
14 | |||
15 | This patch was imported from iHD media-driver git server | ||
16 | (https://github.com/intel/media-driver.git) as of pull request | ||
17 | https://github.com/intel/media-driver/pull/1305. | ||
18 | |||
19 | Upstream-status: Submitted | ||
20 | |||
21 | Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
22 | --- | ||
23 | media_softlet/linux/common/os/mos_utilities_specific_next.cpp | 4 ++++ | ||
24 | media_softlet/linux/common/os/mos_utilities_specific_next.h | 4 ++++ | ||
25 | 2 files changed, 8 insertions(+) | ||
26 | |||
27 | diff --git a/media_softlet/linux/common/os/mos_utilities_specific_next.cpp b/media_softlet/linux/common/os/mos_utilities_specific_next.cpp | ||
28 | index 584ba086..c138cb08 100644 | ||
29 | --- a/media_softlet/linux/common/os/mos_utilities_specific_next.cpp | ||
30 | +++ b/media_softlet/linux/common/os/mos_utilities_specific_next.cpp | ||
31 | @@ -70,6 +70,7 @@ double MosUtilities::MosGetTime() | ||
32 | //! | ||
33 | const char *const MosUtilitiesSpecificNext::m_mosTracePath = "/sys/kernel/debug/tracing/trace_marker_raw"; | ||
34 | int32_t MosUtilitiesSpecificNext::m_mosTraceFd = -1; | ||
35 | +MosMutex MosUtilitiesSpecificNext::m_userSettingMutex; | ||
36 | |||
37 | std::map<std::string, std::map<std::string, std::string>> MosUtilitiesSpecificNext::m_regBuffer; | ||
38 | |||
39 | @@ -612,6 +613,7 @@ MOS_STATUS MosUtilitiesSpecificNext::UserFeatureSet(MOS_PUF_KEYLIST *pKeyList, M | ||
40 | MOS_AtomicIncrement(&MosUtilities::m_mosMemAllocFakeCounter); //ulValueBuf does not count it, because it is freed after the MEMNJA final report. | ||
41 | MOS_OS_NORMALMESSAGE("ulValueBuf %p for key %s", ulValueBuf, NewKey.pValueArray[0].pcValueName); | ||
42 | |||
43 | + m_userSettingMutex.Lock(); | ||
44 | if ( (iPos = UserFeatureFindValue(*Key, NewKey.pValueArray[0].pcValueName)) == NOT_FOUND) | ||
45 | { | ||
46 | //not found, add a new value to key struct. | ||
47 | @@ -620,6 +622,7 @@ MOS_STATUS MosUtilitiesSpecificNext::UserFeatureSet(MOS_PUF_KEYLIST *pKeyList, M | ||
48 | if (iPos >= UF_CAPABILITY) | ||
49 | { | ||
50 | MOS_OS_ASSERTMESSAGE("user setting value icount %d must less than UF_CAPABILITY(64)", iPos); | ||
51 | + m_userSettingMutex.Unlock(); | ||
52 | return MOS_STATUS_USER_FEATURE_KEY_READ_FAILED; | ||
53 | } | ||
54 | |||
55 | @@ -646,6 +649,7 @@ MOS_STATUS MosUtilitiesSpecificNext::UserFeatureSet(MOS_PUF_KEYLIST *pKeyList, M | ||
56 | NewKey.pValueArray[0].ulValueBuf, | ||
57 | NewKey.pValueArray[0].ulValueLen); | ||
58 | |||
59 | + m_userSettingMutex.Unlock(); | ||
60 | return MOS_STATUS_SUCCESS; | ||
61 | } | ||
62 | |||
63 | diff --git a/media_softlet/linux/common/os/mos_utilities_specific_next.h b/media_softlet/linux/common/os/mos_utilities_specific_next.h | ||
64 | index 878ce4e6..57e505d0 100644 | ||
65 | --- a/media_softlet/linux/common/os/mos_utilities_specific_next.h | ||
66 | +++ b/media_softlet/linux/common/os/mos_utilities_specific_next.h | ||
67 | @@ -30,6 +30,8 @@ | ||
68 | #include "mos_defs.h" | ||
69 | #include "mos_utilities_specific.h" | ||
70 | |||
71 | +class MosMutex; | ||
72 | + | ||
73 | class MosUtilitiesSpecificNext | ||
74 | { | ||
75 | public: | ||
76 | @@ -294,5 +296,7 @@ public: | ||
77 | static int32_t m_mosTraceFd; | ||
78 | static const char* const m_mosTracePath; | ||
79 | static std::map<std::string, std::map<std::string, std::string>> m_regBuffer; | ||
80 | +private: | ||
81 | + static MosMutex m_userSettingMutex; | ||
82 | }; | ||
83 | #endif // __MOS_UTILITIES_SPECIFIC_NEXT_H__ | ||
84 | -- | ||
85 | 2.31.1 | ||
86 | |||
diff --git a/recipes-multimedia/libva/intel-media-driver_21.3.5.bb b/recipes-multimedia/libva/intel-media-driver_21.3.5.bb index cc32b86b..dc6cd8cb 100644 --- a/recipes-multimedia/libva/intel-media-driver_21.3.5.bb +++ b/recipes-multimedia/libva/intel-media-driver_21.3.5.bb | |||
@@ -20,6 +20,7 @@ DEPENDS += "libva gmmlib" | |||
20 | 20 | ||
21 | SRC_URI = "git://github.com/intel/media-driver.git;protocol=https;nobranch=1 \ | 21 | SRC_URI = "git://github.com/intel/media-driver.git;protocol=https;nobranch=1 \ |
22 | file://0001-MOS-user-setting-reentrant.patch \ | 22 | file://0001-MOS-user-setting-reentrant.patch \ |
23 | file://0001-Media-Common-Fix-the-user-setting-memory-free.patch \ | ||
23 | " | 24 | " |
24 | 25 | ||
25 | SRCREV = "ec4dc5d653733c21f8bf390794674052b5abdb09" | 26 | SRCREV = "ec4dc5d653733c21f8bf390794674052b5abdb09" |