Skip to content

Commit

Permalink
[Media Common] Defaule Enable Media MMC
Browse files Browse the repository at this point in the history
Defaule Enable Media MMC for BW saving
  • Loading branch information
Guangyao-Bai committed Jun 17, 2020
1 parent fbaa057 commit 58c7ceb
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 11 deletions.
4 changes: 0 additions & 4 deletions media_driver/agnostic/gen12/renderhal/renderhal_g12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -855,11 +855,7 @@ MOS_STATUS XRenderHal_Interface_g12::IsRenderHalMMCEnabled(
// Read user feature key to set MMC for Fast Composition surfaces
MOS_ZeroMemory(&UserFeatureData, sizeof(UserFeatureData));
UserFeatureData.i32DataFlag = MOS_USER_FEATURE_VALUE_DATA_FLAG_CUSTOM_DEFAULT_VALUE_TYPE;
#ifdef LINUX
UserFeatureData.bData = false; // disable MMC on Linux
#else
UserFeatureData.bData = true; // init as default value to enable MMCD on Gen12LP
#endif

MOS_USER_FEATURE_INVALID_KEY_ASSERT(MOS_UserFeature_ReadValue_ID(
nullptr,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3000,7 +3000,7 @@ MOS_STATUS VPHAL_VEBOX_STATE_G12_BASE::Initialize(
// Read user feature key for MMC enable
MOS_ZeroMemory(&UserFeatureData, sizeof(UserFeatureData));
UserFeatureData.i32DataFlag = MOS_USER_FEATURE_VALUE_DATA_FLAG_CUSTOM_DEFAULT_VALUE_TYPE;
UserFeatureData.bData = false; // disable MMC by default
UserFeatureData.bData = true; // enable MMC by default
MOS_USER_FEATURE_INVALID_KEY_ASSERT(MOS_UserFeature_ReadValue_ID(
nullptr,
__VPHAL_ENABLE_MMC_ID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,7 @@ MOS_STATUS MediaVeboxDecompStateG12::IsVeboxDecompressionEnabled()
MOS_ZeroMemory(&UserFeatureData, sizeof(UserFeatureData));
UserFeatureData.i32DataFlag = MOS_USER_FEATURE_VALUE_DATA_FLAG_CUSTOM_DEFAULT_VALUE_TYPE;

#ifdef LINUX
UserFeatureData.bData = false; // disable VE Decompress on Linux
#else
UserFeatureData.bData = true;
#endif

MOS_USER_FEATURE_INVALID_KEY_ASSERT(MOS_UserFeature_ReadValue_ID(
nullptr,
Expand Down
1 change: 0 additions & 1 deletion media_driver/linux/gen12/ddi/media_sku_wa_g12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@ static bool InitTglMediaWa(struct GfxDeviceInfo *devInfo,
MEDIA_WR_WA(waTable, Wa_18011246551, 1);

MEDIA_WR_WA(waTable, WaDisableVeboxFor8K, 1);
MEDIA_WR_WA(waTable, WaDisableCodecMmc, 1);

return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ VPMediaMemComp::VPMediaMemComp(
m_mmcInuseFeatureId = __VPHAL_ENABLE_MMC_IN_USE_ID;

#if(LINUX)
m_bComponentMmcEnabled = false;
m_bComponentMmcEnabled = !MEDIA_IS_WA(vpInterface->m_waTable, WaDisableVPMmc);
#else
m_bComponentMmcEnabled = true;
#endif
Expand Down

0 comments on commit 58c7ceb

Please sign in to comment.