Revert "refactor: Disable SharedSystemUsmSupport by default"
This reverts commit 0765b13a10
.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
parent
7d9399e836
commit
9c9a0a87b9
|
@ -160,7 +160,7 @@ bool IoctlHelperXe::queryDeviceIdAndRevision(Drm &drm) {
|
||||||
hwInfo->platform.usDeviceID = config->info[DRM_XE_QUERY_CONFIG_REV_AND_DEVICE_ID] & 0xffff;
|
hwInfo->platform.usDeviceID = config->info[DRM_XE_QUERY_CONFIG_REV_AND_DEVICE_ID] & 0xffff;
|
||||||
hwInfo->platform.usRevId = static_cast<int>((config->info[DRM_XE_QUERY_CONFIG_REV_AND_DEVICE_ID] >> 16) & 0xff);
|
hwInfo->platform.usRevId = static_cast<int>((config->info[DRM_XE_QUERY_CONFIG_REV_AND_DEVICE_ID] >> 16) & 0xff);
|
||||||
|
|
||||||
if ((debugManager.flags.EnableRecoverablePageFaults.get() != 0) && (debugManager.flags.EnableSharedSystemUsmSupport.get() == 1) && (config->info[DRM_XE_QUERY_CONFIG_FLAGS] & DRM_XE_QUERY_CONFIG_FLAG_HAS_CPU_ADDR_MIRROR)) {
|
if ((debugManager.flags.EnableRecoverablePageFaults.get() != 0) && (debugManager.flags.EnableSharedSystemUsmSupport.get() != 0) && (config->info[DRM_XE_QUERY_CONFIG_FLAGS] & DRM_XE_QUERY_CONFIG_FLAG_HAS_CPU_ADDR_MIRROR)) {
|
||||||
drm.setSharedSystemAllocEnable(true);
|
drm.setSharedSystemAllocEnable(true);
|
||||||
drm.setPageFaultSupported(true);
|
drm.setPageFaultSupported(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2783,7 +2783,6 @@ TEST_F(IoctlHelperXeTest, whenQueryDeviceIdAndRevisionConfigFlagHasGpuAddrMirror
|
||||||
MockExecutionEnvironment executionEnvironment{};
|
MockExecutionEnvironment executionEnvironment{};
|
||||||
std::unique_ptr<Drm> drm{Drm::create(std::make_unique<HwDeviceIdDrm>(0, ""), *executionEnvironment.rootDeviceEnvironments[0])};
|
std::unique_ptr<Drm> drm{Drm::create(std::make_unique<HwDeviceIdDrm>(0, ""), *executionEnvironment.rootDeviceEnvironments[0])};
|
||||||
DebugManagerStateRestore restore;
|
DebugManagerStateRestore restore;
|
||||||
debugManager.flags.EnableSharedSystemUsmSupport.set(1);
|
|
||||||
mockIoctl = [](int fileDescriptor, unsigned long int request, void *arg) -> int {
|
mockIoctl = [](int fileDescriptor, unsigned long int request, void *arg) -> int {
|
||||||
if (request == DRM_IOCTL_XE_DEVICE_QUERY) {
|
if (request == DRM_IOCTL_XE_DEVICE_QUERY) {
|
||||||
struct drm_xe_device_query *deviceQuery = static_cast<struct drm_xe_device_query *>(arg);
|
struct drm_xe_device_query *deviceQuery = static_cast<struct drm_xe_device_query *>(arg);
|
||||||
|
@ -2806,33 +2805,6 @@ TEST_F(IoctlHelperXeTest, whenQueryDeviceIdAndRevisionConfigFlagHasGpuAddrMirror
|
||||||
EXPECT_TRUE(drm->hasPageFaultSupport());
|
EXPECT_TRUE(drm->hasPageFaultSupport());
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(IoctlHelperXeTest, whenQueryDeviceIdAndRevisionConfigFlagHasGpuAddrMirrorSetButDebugFlagNotSetThenSharedSystemAllocEnableFalse) {
|
|
||||||
MockExecutionEnvironment executionEnvironment{};
|
|
||||||
std::unique_ptr<Drm> drm{Drm::create(std::make_unique<HwDeviceIdDrm>(0, ""), *executionEnvironment.rootDeviceEnvironments[0])};
|
|
||||||
DebugManagerStateRestore restore;
|
|
||||||
debugManager.flags.EnableSharedSystemUsmSupport.set(-1);
|
|
||||||
mockIoctl = [](int fileDescriptor, unsigned long int request, void *arg) -> int {
|
|
||||||
if (request == DRM_IOCTL_XE_DEVICE_QUERY) {
|
|
||||||
struct drm_xe_device_query *deviceQuery = static_cast<struct drm_xe_device_query *>(arg);
|
|
||||||
if (deviceQuery->query == DRM_XE_DEVICE_QUERY_CONFIG) {
|
|
||||||
if (deviceQuery->data) {
|
|
||||||
struct drm_xe_query_config *config = reinterpret_cast<struct drm_xe_query_config *>(deviceQuery->data);
|
|
||||||
config->num_params = DRM_XE_QUERY_CONFIG_REV_AND_DEVICE_ID + 1;
|
|
||||||
config->info[DRM_XE_QUERY_CONFIG_FLAGS] = DRM_XE_QUERY_CONFIG_FLAG_HAS_CPU_ADDR_MIRROR;
|
|
||||||
} else {
|
|
||||||
deviceQuery->size = (DRM_XE_QUERY_CONFIG_REV_AND_DEVICE_ID + 1) * sizeof(uint64_t);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return -1;
|
|
||||||
};
|
|
||||||
|
|
||||||
EXPECT_TRUE(IoctlHelperXe::queryDeviceIdAndRevision(*drm));
|
|
||||||
EXPECT_FALSE(drm->isSharedSystemAllocEnabled());
|
|
||||||
EXPECT_FALSE(drm->hasPageFaultSupport());
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(IoctlHelperXeTest, whenQueryDeviceIdAndRevisionAndConfigFlagHasGpuAddrMirrorClearThenSharedSystemAllocEnableFalse) {
|
TEST_F(IoctlHelperXeTest, whenQueryDeviceIdAndRevisionAndConfigFlagHasGpuAddrMirrorClearThenSharedSystemAllocEnableFalse) {
|
||||||
MockExecutionEnvironment executionEnvironment{};
|
MockExecutionEnvironment executionEnvironment{};
|
||||||
std::unique_ptr<Drm> drm{Drm::create(std::make_unique<HwDeviceIdDrm>(0, ""), *executionEnvironment.rootDeviceEnvironments[0])};
|
std::unique_ptr<Drm> drm{Drm::create(std::make_unique<HwDeviceIdDrm>(0, ""), *executionEnvironment.rootDeviceEnvironments[0])};
|
||||||
|
|
Loading…
Reference in New Issue