Skip to content

Commit

Permalink
Add registry to configure MTL Media CCS
Browse files Browse the repository at this point in the history
Signed-off-by: Cheah, Vincent Beng Keat <[email protected]>
  • Loading branch information
vcheah committed Jan 9, 2024
1 parent 9a03376 commit 3467612
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@
#define __MEDIA_USER_FEATURE_VALUE_ENABLE_SOFTPIN "Enable Softpin"
#define __MEDIA_USER_FEATURE_VALUE_DISABLE_KMD_WATCHDOG "Disable KMD Watchdog"
#define __MEDIA_USER_FEATURE_VALUE_ENABLE_VM_BIND "Enable VM Bind"
#define __MEDIA_USER_FEATURE_VALUE_ENABLE_MEDIA_CCS "Enable Media CCS"

#endif // __MOS_UTIL_USER_FEATURE_KEYS_SPECIFIC_H__
16 changes: 15 additions & 1 deletion media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,21 @@ static bool InitMtlMediaSkuExt(struct GfxDeviceInfo *devInfo,
MEDIA_WR_SKU(skuTable, FtrHcpDecMemoryCompression, 0);
MEDIA_WR_SKU(skuTable, Ftr10bitDecMemoryCompression, 0);

#if (_DEBUG || _RELEASE_INTERNAL)
uint32_t value = 0;
ReadUserSettingForDebug(
userSettingPtr,
value,
__MEDIA_USER_FEATURE_VALUE_ENABLE_MEDIA_CCS,
MediaUserSetting::Group::Device);

if (value > 1)
value = 0;

MEDIA_WR_SKU(skuTable, FtrCCSNode, (uint8_t)value);
#else
MEDIA_WR_SKU(skuTable, FtrCCSNode, 1);
#endif

MEDIA_WR_SKU(skuTable, FtrVpP010Output, 1);
MEDIA_WR_SKU(skuTable, FtrVp10BitSupport, 1);
Expand Down Expand Up @@ -337,4 +351,4 @@ static struct LinuxDeviceInit arlDeviceInit =
};

static bool arlDeviceRegister = DeviceInfoFactory<LinuxDeviceInit>::
RegisterDevice((uint32_t)IGFX_ARROWLAKE, &arlDeviceInit);
RegisterDevice((uint32_t)IGFX_ARROWLAKE, &arlDeviceInit);
9 changes: 9 additions & 0 deletions media_softlet/linux/common/os/mos_user_setting_specific.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,14 @@ MOS_STATUS MosUserSetting::InitMosUserSettingSpecific(MediaUserSettingSharedPtr
0,
false); //

#if (_DEBUG || _RELEASE_INTERNAL)
DeclareUserSettingKeyForDebug(
userSettingPtr,
__MEDIA_USER_FEATURE_VALUE_ENABLE_MEDIA_CCS,
MediaUserSetting::Group::Device,
1,
false); //
#endif

return MOS_STATUS_SUCCESS;
}
Original file line number Diff line number Diff line change
Expand Up @@ -1554,6 +1554,9 @@ MOS_STATUS MosUtilities::MosInitializeReg(RegBufferMap &regBufferMap)
std::string id = "";

static const char *disableReportRegKeyList[] = {
#if (_DEBUG || _RELEASE_INTERNAL)
__MEDIA_USER_FEATURE_VALUE_ENABLE_MEDIA_CCS,
#endif
"INTEL MEDIA ALLOC MODE"
};
static const uint32_t disableReportRegKeyListCount = sizeof(disableReportRegKeyList) / sizeof(disableReportRegKeyList[0]);
Expand Down

0 comments on commit 3467612

Please sign in to comment.