From 0a086bf9d0ef0b4ea44ccaa7002ddacf6035ca19 Mon Sep 17 00:00:00 2001 From: Vincent Cheah Beng Keat Date: Mon, 15 Apr 2024 07:56:40 +0800 Subject: [PATCH] Add registry to configure MTL Media CCS Signed-off-by: Cheah, Vincent Beng Keat --- .../os/mos_util_user_feature_keys_specific.h | 1 + .../linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp | 16 +++++++++++++++- .../common/os/mos_user_setting_specific.cpp | 9 +++++++++ .../os/osservice/mos_utilities_specific.cpp | 3 +++ 4 files changed, 28 insertions(+), 1 deletion(-) 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 947bdfe2488..353c0f14df2 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 @@ -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__ diff --git a/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp b/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp index 844545a874c..feca8a5004e 100644 --- a/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp +++ b/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp @@ -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); @@ -337,4 +351,4 @@ static struct LinuxDeviceInit arlDeviceInit = }; static bool arlDeviceRegister = DeviceInfoFactory:: - RegisterDevice((uint32_t)IGFX_ARROWLAKE, &arlDeviceInit); \ No newline at end of file + RegisterDevice((uint32_t)IGFX_ARROWLAKE, &arlDeviceInit); diff --git a/media_softlet/linux/common/os/mos_user_setting_specific.cpp b/media_softlet/linux/common/os/mos_user_setting_specific.cpp index caed584f48a..9c087f9e7d4 100644 --- a/media_softlet/linux/common/os/mos_user_setting_specific.cpp +++ b/media_softlet/linux/common/os/mos_user_setting_specific.cpp @@ -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; } diff --git a/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp b/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp index 96785e21ec1..c8eb99e8e60 100644 --- a/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp +++ b/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp @@ -1554,6 +1554,9 @@ MOS_STATUS MosUtilities::MosInitializeReg(RegBufferMap ®BufferMap) 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]);