Skip to content

Commit 6256f89

Browse files
Page fault support to be controlled with the registry key
Signed-off-by: Milczarek, Slawomir <[email protected]>
1 parent 13947f3 commit 6256f89

File tree

4 files changed

+12
-17
lines changed

4 files changed

+12
-17
lines changed

shared/source/os_interface/linux/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ set(NEO_CORE_OS_INTERFACE_LINUX
4141
${CMAKE_CURRENT_SOURCE_DIR}/drm_memory_operations_handler_default.cpp
4242
${CMAKE_CURRENT_SOURCE_DIR}/drm_memory_operations_handler_default.h
4343
${CMAKE_CURRENT_SOURCE_DIR}/drm_memory_manager_create_multi_host_allocation.cpp
44-
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}drm_query.cpp
4544
${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config_drm.cpp
4645
${CMAKE_CURRENT_SOURCE_DIR}/hw_device_id.h
4746
${CMAKE_CURRENT_SOURCE_DIR}/hw_device_id_linux.cpp

shared/source/os_interface/linux/drm_neo.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,6 +1211,14 @@ void Drm::queryPageFaultSupport() {
12111211
}
12121212
}
12131213

1214+
bool Drm::hasPageFaultSupport() const {
1215+
if (DebugManager.flags.EnableRecoverablePageFaults.get() != -1) {
1216+
return !!DebugManager.flags.EnableRecoverablePageFaults.get();
1217+
}
1218+
1219+
return false;
1220+
}
1221+
12141222
unsigned int Drm::bindDrmContext(uint32_t drmContextId, uint32_t deviceIndex, aub_stream::EngineType engineType, bool engineInstancedDevice) {
12151223
auto engineInfo = this->engineInfo.get();
12161224
if (!engineInfo) {

shared/source/os_interface/linux/drm_query.cpp

Lines changed: 0 additions & 16 deletions
This file was deleted.

shared/test/common/libult/linux/drm_mock.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ class DrmMock : public Drm {
131131
}
132132

133133
bool hasPageFaultSupport() const override {
134+
if (DebugManager.flags.EnableRecoverablePageFaults.get() != -1) {
135+
return !!DebugManager.flags.EnableRecoverablePageFaults.get();
136+
}
137+
134138
return pageFaultSupported;
135139
}
136140

0 commit comments

Comments
 (0)