Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add registry to configure MTL Media CCS #1760

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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__
17 changes: 16 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,22 @@ 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);

/* MEDIA_CSS default value is 1 */
if (value > 1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trying to understand, default Value is 0, when you read a data which is none 0, then you will force a 0 ? this means you want to make FtrCCSNode to 0 in Debug/Release version of driver?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made a mistake. The default value of FtrCCSNode is 1. I have it updated in the next patch and added a comment accordingly. For debug/internal-release build, we could use registry key to enable/disable CCS.

value = 1;

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 +352,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
Loading