diff --git a/media_driver/agnostic/common/os/mos_util_debug.c b/media_driver/agnostic/common/os/mos_util_debug.c index 3ae8890213b..406e520af6d 100644 --- a/media_driver/agnostic/common/os/mos_util_debug.c +++ b/media_driver/agnostic/common/os/mos_util_debug.c @@ -121,6 +121,12 @@ MOS_USER_FEATURE_VALUE_ID pcComponentUserFeatureKeys[MOS_COMPONENT_COUNT][3] = { __MOS_USER_FEATURE_KEY_MESSAGE_SCALABILITY_TAG_ID, __MOS_USER_FEATURE_KEY_BY_SUB_COMPONENT_SCALABILITY_ID, __MOS_USER_FEATURE_KEY_SUB_COMPONENT_SCALABILITY_TAG_ID + }, + + { + __MOS_USER_FEATURE_KEY_MESSAGE_MMC_TAG_ID, + __MOS_USER_FEATURE_KEY_BY_SUB_COMPONENT_MMC_ID, + __MOS_USER_FEATURE_KEY_SUB_COMPONENT_MMC_TAG_ID } }; diff --git a/media_driver/agnostic/common/os/mos_util_debug.h b/media_driver/agnostic/common/os/mos_util_debug.h index 2fbbb2773c0..0069e5bea09 100644 --- a/media_driver/agnostic/common/os/mos_util_debug.h +++ b/media_driver/agnostic/common/os/mos_util_debug.h @@ -165,6 +165,15 @@ typedef enum MOS_SCALABILITY_SUBCOMP_COUNT } MOS_SCALABILITY_SUBCOMP_ID; +//! +//! \brief Define MMC Sub-Component IDs +//! +typedef enum +{ + MOS_MMC_SUBCOMP_SELF = 0, + MOS_MMC_SUBCOMP_COUNT +} MOS_MMC_SUBCOMP_ID; + //! //! \brief MOS debug params structure, includes debug level and asserts enabled. //! diff --git a/media_driver/agnostic/common/os/mos_util_user_feature_keys.h b/media_driver/agnostic/common/os/mos_util_user_feature_keys.h index 6bee288a897..cecd5992dbf 100644 --- a/media_driver/agnostic/common/os/mos_util_user_feature_keys.h +++ b/media_driver/agnostic/common/os/mos_util_user_feature_keys.h @@ -221,6 +221,19 @@ //! #define __MOS_USER_FEATURE_KEY_SUB_COMPONENT_SCALABILITY_TAG "SCALABILITY Sub Components Tags" +//! +//! \brief User feature keys for component MMC: +//! +#define __MOS_USER_FEATURE_KEY_MESSAGE_MMC_TAG "MMC Message Tags" +#define __MOS_USER_FEATURE_KEY_BY_SUB_COMPONENT_MMC "MMC Tags By Sub Component" +//! +//! \brief 63____________________________________________________________________________3__________0 +//! | | Self | +//! | Reserved (can create MMC subcomponents) |Asrt|level| +//! |____________________________________________________________________________|__________| +//! +#define __MOS_USER_FEATURE_KEY_SUB_COMPONENT_MMC_TAG "MMC Sub Components Tags" + #endif // MOS_MESSAGES_ENABLED //User feature key for MDF diff --git a/media_driver/agnostic/common/os/mos_utilities.c b/media_driver/agnostic/common/os/mos_utilities.c index 4b7ece98107..1e7a02a4fa7 100644 --- a/media_driver/agnostic/common/os/mos_utilities.c +++ b/media_driver/agnostic/common/os/mos_utilities.c @@ -2321,6 +2321,33 @@ MOS_DECLARE_UF_KEY_DBGONLY(__MEDIA_USER_FEATURE_VALUE_ENCODE_BRC_SOFTWARE_ID, MOS_USER_FEATURE_VALUE_TYPE_UINT64, "0", "Allows different SCALABILITY subcomponents to have different debug levels. "), + MOS_DECLARE_UF_KEY(__MOS_USER_FEATURE_KEY_MESSAGE_MMC_TAG_ID, + __MOS_USER_FEATURE_KEY_MESSAGE_MMC_TAG, + __MEDIA_USER_FEATURE_SUBKEY_INTERNAL, + __MEDIA_USER_FEATURE_SUBKEY_INTERNAL, + "MOS", + MOS_USER_FEATURE_TYPE_USER, + MOS_USER_FEATURE_VALUE_TYPE_UINT32, + __MOS_USER_FEATURE_KEY_MESSAGE_DEFAULT_VALUE_STR, + "Enables messages and/or asserts for all of MMC "), + MOS_DECLARE_UF_KEY(__MOS_USER_FEATURE_KEY_BY_SUB_COMPONENT_MMC_ID, + __MOS_USER_FEATURE_KEY_BY_SUB_COMPONENT_MMC, + __MEDIA_USER_FEATURE_SUBKEY_INTERNAL, + __MEDIA_USER_FEATURE_SUBKEY_INTERNAL, + "MOS", + MOS_USER_FEATURE_TYPE_USER, + MOS_USER_FEATURE_VALUE_TYPE_UINT32, + "0", + "If enabled, will allow the subcomponent tags to take effect."), + MOS_DECLARE_UF_KEY(__MOS_USER_FEATURE_KEY_SUB_COMPONENT_MMC_TAG_ID, + __MOS_USER_FEATURE_KEY_SUB_COMPONENT_MMC_TAG, + __MEDIA_USER_FEATURE_SUBKEY_INTERNAL, + __MEDIA_USER_FEATURE_SUBKEY_INTERNAL, + "MOS", + MOS_USER_FEATURE_TYPE_USER, + MOS_USER_FEATURE_VALUE_TYPE_UINT64, + "0", + "Allows different MMC subcomponents to have different debug levels. "), #endif // MOS_MESSAGES_ENABLED MOS_DECLARE_UF_KEY_DBGONLY(__MEDIA_USER_FEATURE_VALUE_HEVC_SF_2_DMA_SUBMITS_ENABLE_ID, @@ -2667,7 +2694,16 @@ MOS_DECLARE_UF_KEY_DBGONLY(__MEDIA_USER_FEATURE_VALUE_ENCODE_BRC_SOFTWARE_ID, MOS_USER_FEATURE_VALUE_TYPE_BOOL, "0", "Enable memory compression"), - MOS_DECLARE_UF_KEY_DBGONLY(__MEDIA_USER_FEATURE_ENABLE_RENDER_ENGINE_MMC_ID, + MOS_DECLARE_UF_KEY(__VPHAL_ENABLE_MMC_IN_USE_ID, + "VP MMC In Use", + __MEDIA_USER_FEATURE_SUBKEY_INTERNAL, + __MEDIA_USER_FEATURE_SUBKEY_REPORT, + "VP", + MOS_USER_FEATURE_TYPE_USER, + MOS_USER_FEATURE_VALUE_TYPE_BOOL, + "0", + "VP use memory compression"), + MOS_DECLARE_UF_KEY_DBGONLY(__MEDIA_USER_FEATURE_ENABLE_RENDER_ENGINE_MMC_ID, "Enable Media RenderEngine MMC", __MEDIA_USER_FEATURE_SUBKEY_INTERNAL, __MEDIA_USER_FEATURE_SUBKEY_REPORT, diff --git a/media_driver/agnostic/common/os/mos_utilities.h b/media_driver/agnostic/common/os/mos_utilities.h index b735326adfc..f258dc48b40 100644 --- a/media_driver/agnostic/common/os/mos_utilities.h +++ b/media_driver/agnostic/common/os/mos_utilities.h @@ -422,6 +422,9 @@ typedef enum _MOS_USER_FEATURE_VALUE_ID __MOS_USER_FEATURE_KEY_MESSAGE_SCALABILITY_TAG_ID, __MOS_USER_FEATURE_KEY_BY_SUB_COMPONENT_SCALABILITY_ID, __MOS_USER_FEATURE_KEY_SUB_COMPONENT_SCALABILITY_TAG_ID, + __MOS_USER_FEATURE_KEY_MESSAGE_MMC_TAG_ID, + __MOS_USER_FEATURE_KEY_BY_SUB_COMPONENT_MMC_ID, + __MOS_USER_FEATURE_KEY_SUB_COMPONENT_MMC_TAG_ID, #endif // MOS_MESSAGES_ENABLED __MEDIA_USER_FEATURE_VALUE_HEVC_SF_2_DMA_SUBMITS_ENABLE_ID, __MEDIA_USER_FEATURE_VALUE_HEVCDATROWSTORECACHE_DISABLE_ID, @@ -463,6 +466,7 @@ typedef enum _MOS_USER_FEATURE_VALUE_ID __VPHAL_BYPASS_COMPOSITION_ID, __VPHAL_VEBOX_DISABLE_SFC_ID, __VPHAL_ENABLE_MMC_ID, + __VPHAL_ENABLE_MMC_IN_USE_ID, __VPHAL_ENABLE_VEBOX_MMC_DECOMPRESS_ID, __VPHAL_VEBOX_DISABLE_TEMPORAL_DENOISE_FILTER_ID, #if (_DEBUG || _RELEASE_INTERNAL) diff --git a/media_driver/linux/common/os/mos_util_debug_specific.h b/media_driver/linux/common/os/mos_util_debug_specific.h index ad8c3af298f..b3d459944c3 100644 --- a/media_driver/linux/common/os/mos_util_debug_specific.h +++ b/media_driver/linux/common/os/mos_util_debug_specific.h @@ -71,6 +71,7 @@ typedef enum MOS_COMPONENT_CM, MOS_COMPONENT_CPLIB, MOS_COMPONENT_SCALABILITY, + MOS_COMPONENT_MMC, MOS_COMPONENT_COUNT } MOS_COMPONENT_ID;