[Media Common] revert user setting for ddi regkey
revert user setting for ddi regkey (#63265).
diff --git a/media_common/agnostic/common/shared/user_setting/media_user_setting.h b/media_common/agnostic/common/shared/user_setting/media_user_setting.h
index 6c55f5b..4ca77ef 100644
--- a/media_common/agnostic/common/shared/user_setting/media_user_setting.h
+++ b/media_common/agnostic/common/shared/user_setting/media_user_setting.h
@@ -127,8 +127,7 @@
const std::string &valueName,
const Group &group,
const Value &customValue = Value(),
- bool useCustomValue = false,
- uint32_t option = MEDIA_USER_SETTING_INTERNAL);
+ bool useCustomValue = false);
//!
//! \brief Write value to specific item
@@ -149,8 +148,7 @@
const std::string &valueName,
const Value &value,
const Group &group,
- bool isForReport = false,
- uint32_t option = MEDIA_USER_SETTING_INTERNAL);
+ bool isForReport = false);
//!
//! \brief Check whether the key has been registered
@@ -206,15 +204,14 @@
const std::string &valueName,
const MediaUserSetting::Group &group,
const MediaUserSetting::Value &customValue = MediaUserSetting::Value(),
- bool useCustomValue = false,
- uint32_t option = MEDIA_USER_SETTING_INTERNAL)
+ bool useCustomValue = false)
{
MediaUserSettingSharedPtr instance = userSetting;
if (userSetting == nullptr)
{
instance = MediaUserSetting::MediaUserSetting::Instance();
}
- auto status = instance->Read(value, valueName, group, customValue, useCustomValue, option);
+ auto status = instance->Read(value, valueName, group, customValue, useCustomValue);
if(status != MOS_STATUS_SUCCESS)
{
MOS_OS_NORMALMESSAGE("User setting %s read error", valueName.c_str());
@@ -229,11 +226,10 @@
const std::string &valueName,
const MediaUserSetting::Group &group,
const MediaUserSetting::Value &customValue = MediaUserSetting::Value(),
- bool useCustomValue = false,
- uint32_t option = MEDIA_USER_SETTING_INTERNAL)
+ bool useCustomValue = false)
{
MediaUserSetting::Value outValue;
- MOS_STATUS status = ReadUserSetting(userSetting, outValue, valueName, group, customValue, useCustomValue, option);
+ MOS_STATUS status = ReadUserSetting(userSetting, outValue, valueName, group, customValue, useCustomValue);
//If user setting is not set, outValue is the default value or customValue value if useCustomValue == true.
//If the user setting is not registered, it is not allowed to read a value for it. Set it with the inital outValue.
value = outValue.Get<T>();
@@ -244,8 +240,7 @@
MediaUserSettingSharedPtr userSetting,
const std::string &valueName,
const MediaUserSetting::Value &value,
- const MediaUserSetting::Group &group,
- uint32_t option = MEDIA_USER_SETTING_INTERNAL)
+ const MediaUserSetting::Group &group)
{
MediaUserSettingSharedPtr instance = userSetting;
if (userSetting == nullptr)
@@ -259,15 +254,14 @@
MediaUserSettingSharedPtr userSetting,
const std::string &valueName,
const MediaUserSetting::Value &value,
- const MediaUserSetting::Group &group,
- uint32_t option = MEDIA_USER_SETTING_INTERNAL)
+ const MediaUserSetting::Group &group)
{
MediaUserSettingSharedPtr instance = userSetting;
if (userSetting == nullptr)
{
instance = MediaUserSetting::MediaUserSetting::Instance();
}
- return instance->Write(valueName, value, group, true, option);
+ return instance->Write(valueName, value, group, true);
}
inline bool IsDeclaredUserSetting(
@@ -307,15 +301,14 @@
const std::string &valueName,
const MediaUserSetting::Group &group,
const MediaUserSetting::Value &customValue = MediaUserSetting::Value(),
- bool useCustomValue = false,
- uint32_t option = MEDIA_USER_SETTING_INTERNAL)
+ bool useCustomValue = false)
{
MediaUserSettingSharedPtr instance = userSetting;
if (userSetting == nullptr)
{
instance = MediaUserSetting::MediaUserSetting::Instance();
}
- auto status = instance->Read(value, valueName, group, customValue, useCustomValue, option);
+ auto status = instance->Read(value, valueName, group, customValue, useCustomValue);
if(status != MOS_STATUS_SUCCESS)
{
MOS_OS_NORMALMESSAGE("User setting %s read error", valueName.c_str());
@@ -330,11 +323,10 @@
const std::string &valueName,
const MediaUserSetting::Group &group,
const MediaUserSetting::Value &customValue = MediaUserSetting::Value(),
- bool useCustomValue = false,
- uint32_t option = MEDIA_USER_SETTING_INTERNAL)
+ bool useCustomValue = false)
{
MediaUserSetting::Value outValue;
- MOS_STATUS status = ReadUserSettingForDebug(userSetting, outValue, valueName, group, customValue, useCustomValue, option);
+ MOS_STATUS status = ReadUserSettingForDebug(userSetting, outValue, valueName, group, customValue, useCustomValue);
//If user setting is not set, outValue is the default value or customValue value if useCustomValue == true.
//If the user setting is not registered, it is not allowed to read a value for it. Set it with the inital outValue.
@@ -346,8 +338,7 @@
MediaUserSettingSharedPtr userSetting,
const std::string &valueName,
const MediaUserSetting::Value &value,
- const MediaUserSetting::Group &group,
- uint32_t option = MEDIA_USER_SETTING_INTERNAL)
+ const MediaUserSetting::Group &group)
{
MediaUserSettingSharedPtr instance = userSetting;
if (userSetting == nullptr)
@@ -361,15 +352,14 @@
MediaUserSettingSharedPtr userSetting,
const std::string &valueName,
const MediaUserSetting::Value &value,
- const MediaUserSetting::Group &group,
- uint32_t option = MEDIA_USER_SETTING_INTERNAL)
+ const MediaUserSetting::Group &group)
{
MediaUserSettingSharedPtr instance = userSetting;
if (userSetting == nullptr)
{
instance = MediaUserSetting::MediaUserSetting::Instance();
}
- return instance->Write(valueName, value, group, true, option);
+ return instance->Write(valueName, value, group, true);
}
#else
diff --git a/media_common/agnostic/common/shared/user_setting/media_user_setting_configure.h b/media_common/agnostic/common/shared/user_setting/media_user_setting_configure.h
index 8cecc4a..b1016c1 100644
--- a/media_common/agnostic/common/shared/user_setting/media_user_setting_configure.h
+++ b/media_common/agnostic/common/shared/user_setting/media_user_setting_configure.h
@@ -121,8 +121,7 @@
const std::string &itemName,
const Group &group,
const Value &customValue,
- bool useCustomValue = false,
- uint32_t option = MEDIA_USER_SETTING_INTERNAL);
+ bool useCustomValue = false);
//!
//! \brief Write value to specific item
@@ -143,50 +142,7 @@
const std::string &itemName,
const Value &value,
const Group &group,
- bool isForReport,
- uint32_t option = MEDIA_USER_SETTING_INTERNAL);
-
- //!
- //! \brief Get the path of the key
- //! \return std::string
- //! the path
- //!
- std::string GetPath(
- std::shared_ptr<Definition> def,
- uint32_t option,
- bool bReport);
-
- //!
- //! \brief Get the report path of the internal key
- //! \return std::string
- //! the path
- //!
- std::string GetInteranlReportPath(
- std::shared_ptr<Definition> def);
-
- //!
- //! \brief Get the read path of the internal key
- //! \return std::string
- //! the path
- //!
- std::string GetInteranlReadPath(
- std::shared_ptr<Definition> def);
-
- //!
- //! \brief Get the path of the internal key
- //! \return std::string
- //! the path
- //!
- std::string GetInternalPath(
- std::shared_ptr<Definition> def,
- bool bReport);
-
- //!
- //! \brief Get the path of the external key
- //! \return std::string
- //! the path
- //!
- std::string GetExternalPath(uint32_t option);
+ bool isForReport);
//!
//! \brief Check whether definition of specific item name exist in all groups
@@ -251,7 +207,6 @@
static const UFKEY_NEXT m_rootKey;
static const char *m_configPath;
static const char *m_reportPath;
- static const std::map<uint32_t, const char *> m_pathOption;
};
}}
diff --git a/media_common/linux/common/os/mos_util_user_feature_keys_specific.h b/media_common/linux/common/os/mos_util_user_feature_keys_specific.h
index 75bdcf5..61bbc6d 100644
--- a/media_common/linux/common/os/mos_util_user_feature_keys_specific.h
+++ b/media_common/linux/common/os/mos_util_user_feature_keys_specific.h
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009-2022, Intel Corporation
+* Copyright (c) 2009-2017, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -34,16 +34,6 @@
#define __MEDIA_USER_FEATURE_VALUE_VP_DBG_STATE_DUMP_LOCATION ""
#define __MOS_USER_FEATURE_KEY_XML_FILEPATH_LOCATION ""
-/*---------------------------------------------------------------------------\
-** This table defines the bits for the Media Reg Internal DWORD.
-** ---------------------------------------------------------------------------
-** | Bit | Description |
-** |-------|-----------------------------------------------------------------|
-** | 31:1 | Available |
-** | 0 | Reserved for DL, but not used now |
-\*--------------------------------------------------------------------------*/
-#define MEDIA_USER_SETTING_INTERNAL 0x1
-
//!
//! \brief User feature keys to define debug message levels and assertions.
//!
diff --git a/media_driver/agnostic/common/shared/user_setting/media_user_setting.cpp b/media_driver/agnostic/common/shared/user_setting/media_user_setting.cpp
index b661d79..93486d4 100644
--- a/media_driver/agnostic/common/shared/user_setting/media_user_setting.cpp
+++ b/media_driver/agnostic/common/shared/user_setting/media_user_setting.cpp
@@ -89,20 +89,18 @@
const std::string &valueName,
const Group &group,
const Value &customValue,
- bool useCustomValue,
- uint32_t option)
+ bool useCustomValue)
{
- return m_configure.Read(value, valueName, group, customValue, useCustomValue, option);
+ return m_configure.Read(value, valueName, group, customValue, useCustomValue);
}
MOS_STATUS MediaUserSetting::Write(
const std::string &valueName,
const Value &value,
const Group &group,
- bool isForReport,
- uint32_t option)
+ bool isForReport)
{
- return m_configure.Write(valueName, value, group, isForReport, option);
+ return m_configure.Write(valueName, value, group, isForReport);
}
bool MediaUserSetting::IsDeclaredUserSetting(const std::string &valueName)
diff --git a/media_driver/agnostic/common/shared/user_setting/media_user_setting_configure.cpp b/media_driver/agnostic/common/shared/user_setting/media_user_setting_configure.cpp
index 4284532..e9b51ba 100644
--- a/media_driver/agnostic/common/shared/user_setting/media_user_setting_configure.cpp
+++ b/media_driver/agnostic/common/shared/user_setting/media_user_setting_configure.cpp
@@ -104,8 +104,7 @@
const std::string &valueName,
const Group &group,
const Value &customValue,
- bool useCustomValue,
- uint32_t option)
+ bool useCustomValue)
{
int32_t ret = 0;
@@ -123,7 +122,17 @@
return MOS_STATUS_SUCCESS;
}
- std::string path = GetPath(def, option, false);
+ std::string basePath = "";
+ if(def->UseStatePath())
+ {
+ if (m_keyPathInfo != nullptr && m_keyPathInfo->Path != nullptr)
+ {
+ basePath = m_keyPathInfo->Path;
+ }
+ }
+ std::string subPath = def->GetSubPath();
+
+ std::string path = basePath + subPath;
UFKEY_NEXT key = {};
std::string strValue = "";
@@ -171,8 +180,7 @@
const std::string &valueName,
const Value &value,
const Group &group,
- bool isForReport,
- uint32_t option)
+ bool isForReport)
{
auto &defs = GetDefinitions(group);
@@ -192,7 +200,13 @@
return MOS_STATUS_INVALID_PARAMETER;
}
- std::string path = GetPath(def, option, true);
+ std::string basePath = "";
+ if (m_keyPathInfo != nullptr && m_keyPathInfo->Path != nullptr)
+ {
+ basePath = m_keyPathInfo->Path;
+ }
+
+ std::string path = basePath + (isForReport ? m_reportPath : m_configPath);
UFKEY_NEXT key = {};
MOS_STATUS status = MOS_STATUS_UNKNOWN;
@@ -226,95 +240,4 @@
return MOS_STATUS_SUCCESS;
}
-std::string Configure::GetPath(
- std::shared_ptr<Definition> def,
- uint32_t option,
- bool bReport)
-{
- std::string path = "";
- if (def == nullptr)
- {
- return path;
- }
-
- if (option == MEDIA_USER_SETTING_INTERNAL)
- {
- return GetInternalPath(def, bReport);
- }
- else
- {
- return GetExternalPath(option);
- }
-}
-
-std::string Configure::GetInteranlReadPath(
- std::shared_ptr<Definition> def)
-{
- std::string path = "";
- if (def == nullptr)
- {
- return path;
- }
-
- if (def->UseStatePath())
- {
- if (m_keyPathInfo != nullptr && m_keyPathInfo->Path != nullptr)
- {
- path = m_keyPathInfo->Path;
- }
- }
- path += def->GetSubPath();
-
- return path;
-}
-
-std::string Configure::GetInteranlReportPath(
- std::shared_ptr<Definition> def)
-{
- std::string path = "";
- if (def == nullptr)
- {
- return path;
- }
-
- if (def->UseStatePath())
- {
- if (m_keyPathInfo != nullptr && m_keyPathInfo->Path != nullptr)
- {
- path = m_keyPathInfo->Path;
- }
- }
- path += m_reportPath;
-
- return path;
-}
-
-std::string Configure::GetInternalPath(
- std::shared_ptr<Definition> def,
- bool bReport)
-{
- if (bReport)
- {
- return GetInteranlReportPath(def);
- }
- else
- {
- return GetInteranlReadPath(def);
- }
-}
-
-std::string Configure::GetExternalPath(uint32_t option)
-{
- auto it = m_pathOption.find(option);
- if (it != m_pathOption.end())
- {
- return it->second;
- }
- else
- {
- MOS_OS_ASSERTMESSAGE("Invalid Option");
- return "";
- }
-}
-
}}
\ No newline at end of file
diff --git a/media_softlet/agnostic/common/os/mos_user_setting.cpp b/media_softlet/agnostic/common/os/mos_user_setting.cpp
index 848014c..691a063 100644
--- a/media_softlet/agnostic/common/os/mos_user_setting.cpp
+++ b/media_softlet/agnostic/common/os/mos_user_setting.cpp
@@ -38,8 +38,6 @@
InitUserSettingForDebug(userSettingPtr);
#endif
- InitMosUserSettingSpecific(userSettingPtr);
-
return MOS_STATUS_SUCCESS;
}
diff --git a/media_softlet/agnostic/common/os/mos_user_setting.h b/media_softlet/agnostic/common/os/mos_user_setting.h
index d98b9c9..74ade93 100644
--- a/media_softlet/agnostic/common/os/mos_user_setting.h
+++ b/media_softlet/agnostic/common/os/mos_user_setting.h
@@ -52,15 +52,6 @@
//!
static MOS_STATUS InitMosUserSetting(MediaUserSettingSharedPtr userSettingPtr);
- //!
- //! \brief Init user settings
- //! \details declare the ddi user settings
- //! \return MOS_STATUS
- //! Returns one of the MOS_STATUS error codes if failed,
- //! else MOS_STATUS_SUCCESS
- //!
- static MOS_STATUS InitMosUserSettingSpecific(MediaUserSettingSharedPtr userSettingPtr);
-
private:
//!
//! \brief Init the mos user settings of mos message
diff --git a/media_softlet/linux/common/os/media_srcs.cmake b/media_softlet/linux/common/os/media_srcs.cmake
index ff3d9d6..bd2de05 100644
--- a/media_softlet/linux/common/os/media_srcs.cmake
+++ b/media_softlet/linux/common/os/media_srcs.cmake
@@ -29,7 +29,6 @@
${CMAKE_CURRENT_LIST_DIR}/mos_os_specific_next.cpp
${CMAKE_CURRENT_LIST_DIR}/mos_decompression.cpp
${CMAKE_CURRENT_LIST_DIR}/mos_mediacopy.cpp
- ${CMAKE_CURRENT_LIST_DIR}/mos_user_setting_specific.cpp
)
set(TMP_HEADERS_
diff --git a/media_softlet/linux/common/os/mos_user_setting_specific.cpp b/media_softlet/linux/common/os/mos_user_setting_specific.cpp
deleted file mode 100644
index ca9e293..0000000
--- a/media_softlet/linux/common/os/mos_user_setting_specific.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-* Copyright (c) 2022, Intel Corporation
-*
-* Permission is hereby granted, free of charge, to any person obtaining a
-* copy of this software and associated documentation files (the "Software"),
-* to deal in the Software without restriction, including without limitation
-* the rights to use, copy, modify, merge, publish, distribute, sublicense,
-* and/or sell copies of the Software, and to permit persons to whom the
-* Software is furnished to do so, subject to the following conditions:
-*
-* The above copyright notice and this permission notice shall be included
-* in all copies or substantial portions of the Software.
-*
-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-* OTHER DEALINGS IN THE SOFTWARE.
-*/
-//!
-//! \file mos_user_setting_specific.cpp
-//! \brief This file defines the user settings keys for all components
-//! \details Common OS debug across different platform
-//!
-
-#include "mos_user_setting.h"
-
-MOS_STATUS MosUserSetting::InitMosUserSettingSpecific(MediaUserSettingSharedPtr userSettingPtr)
-{
- return MOS_STATUS_SUCCESS;
-}
diff --git a/media_softlet/linux/common/shared/media_srcs.cmake b/media_softlet/linux/common/shared/media_srcs.cmake
index f663682..a4f8786 100644
--- a/media_softlet/linux/common/shared/media_srcs.cmake
+++ b/media_softlet/linux/common/shared/media_srcs.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2022, Intel Corporation
+# Copyright (c) 2017-2019, Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -18,8 +18,6 @@
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
-media_include_subdirectory(user_setting)
-
set(TMP_SOURCES_
${CMAKE_CURRENT_LIST_DIR}/hal_oca_interface_next.cpp
)
diff --git a/media_softlet/linux/common/shared/user_setting/media_srcs.cmake b/media_softlet/linux/common/shared/user_setting/media_srcs.cmake
deleted file mode 100644
index 8e72f0c..0000000
--- a/media_softlet/linux/common/shared/user_setting/media_srcs.cmake
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright (c) 2022, Intel Corporation
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-
-set(TMP_SOURCES_
- ${CMAKE_CURRENT_LIST_DIR}/media_user_setting_configure_specific.cpp
-)
-
-set(SOURCES_
- ${SOURCES_}
- ${TMP_SOURCES_}
- )
-
- media_add_curr_to_include_path()
\ No newline at end of file
diff --git a/media_softlet/linux/common/shared/user_setting/media_user_setting_configure_specific.cpp b/media_softlet/linux/common/shared/user_setting/media_user_setting_configure_specific.cpp
deleted file mode 100644
index 7b820bf..0000000
--- a/media_softlet/linux/common/shared/user_setting/media_user_setting_configure_specific.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2022, Intel Corporation
-*
-* Permission is hereby granted, free of charge, to any person obtaining a
-* copy of this software and associated documentation files (the "Software"),
-* to deal in the Software without restriction, including without limitation
-* the rights to use, copy, modify, merge, publish, distribute, sublicense,
-* and/or sell copies of the Software, and to permit persons to whom the
-* Software is furnished to do so, subject to the following conditions:
-*
-* The above copyright notice and this permission notice shall be included
-* in all copies or substantial portions of the Software.
-*
-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-* OTHER DEALINGS IN THE SOFTWARE.
-*/
-//!
-//! \file media_user_setting_configure_specific.cpp
-//! \brief The interface of media user setting configure.
-
-#include "media_user_setting_configure.h"
-
-namespace MediaUserSetting
-{
-namespace Internal
-{
-const std::map<uint32_t, const char *> Configure::m_pathOption = {};
-
-} // namespace Internal
-} // namespace MediaUserSetting
\ No newline at end of file