Page fault support to be controlled with the registry key

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
Milczarek, Slawomir
2022-04-13 10:05:04 +00:00
committed by Compute-Runtime-Automation
parent 13947f3e99
commit 6256f89a79
4 changed files with 12 additions and 17 deletions

View File

@@ -41,7 +41,6 @@ set(NEO_CORE_OS_INTERFACE_LINUX
${CMAKE_CURRENT_SOURCE_DIR}/drm_memory_operations_handler_default.cpp
${CMAKE_CURRENT_SOURCE_DIR}/drm_memory_operations_handler_default.h
${CMAKE_CURRENT_SOURCE_DIR}/drm_memory_manager_create_multi_host_allocation.cpp
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}drm_query.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config_drm.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hw_device_id.h
${CMAKE_CURRENT_SOURCE_DIR}/hw_device_id_linux.cpp

View File

@@ -1211,6 +1211,14 @@ void Drm::queryPageFaultSupport() {
}
}
bool Drm::hasPageFaultSupport() const {
if (DebugManager.flags.EnableRecoverablePageFaults.get() != -1) {
return !!DebugManager.flags.EnableRecoverablePageFaults.get();
}
return false;
}
unsigned int Drm::bindDrmContext(uint32_t drmContextId, uint32_t deviceIndex, aub_stream::EngineType engineType, bool engineInstancedDevice) {
auto engineInfo = this->engineInfo.get();
if (!engineInfo) {

View File

@@ -1,16 +0,0 @@
/*
* Copyright (C) 2020-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/os_interface/linux/drm_neo.h"
namespace NEO {
bool Drm::hasPageFaultSupport() const {
return false;
}
} // namespace NEO

View File

@@ -131,6 +131,10 @@ class DrmMock : public Drm {
}
bool hasPageFaultSupport() const override {
if (DebugManager.flags.EnableRecoverablePageFaults.get() != -1) {
return !!DebugManager.flags.EnableRecoverablePageFaults.get();
}
return pageFaultSupported;
}