mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Disable context creation when NEO_L0_SYSMAN_NO_CONTEXT_MODE is set
Related-To: LOCI-4031 Signed-off-by: Kulkarni, Ashwin Kumar <ashwin.kumar.kulkarni@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9c0ad71700
commit
ae566a42d8
@@ -25,6 +25,7 @@
|
||||
#include "shared/source/helpers/string.h"
|
||||
#include "shared/source/helpers/windows/gmm_callbacks.h"
|
||||
#include "shared/source/memory_manager/gfx_partition.h"
|
||||
#include "shared/source/os_interface/debug_env_reader.h"
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
#include "shared/source/os_interface/sys_calls_common.h"
|
||||
#include "shared/source/os_interface/windows/driver_info_windows.h"
|
||||
@@ -958,19 +959,22 @@ bool Wddm::createContext(OsContextWin &osContext) {
|
||||
}
|
||||
createContext.hDevice = device;
|
||||
|
||||
status = getGdi()->createContext(&createContext);
|
||||
osContext.setWddmContextHandle(createContext.hContext);
|
||||
NEO::EnvironmentVariableReader envReader;
|
||||
bool sysmanDisableContextCreationFlag = envReader.getSetting("NEO_L0_SYSMAN_NO_CONTEXT_MODE", false);
|
||||
if (!sysmanDisableContextCreationFlag) {
|
||||
status = getGdi()->createContext(&createContext);
|
||||
osContext.setWddmContextHandle(createContext.hContext);
|
||||
|
||||
PRINT_DEBUG_STRING(DebugManager.flags.PrintDebugMessages.get(), stdout,
|
||||
"\nCreated Wddm context. Status: :%lu, engine: %u, contextId: %u, deviceBitfield: %lu \n",
|
||||
status, osContext.getEngineType(), osContext.getContextId(), osContext.getDeviceBitfield().to_ulong());
|
||||
PRINT_DEBUG_STRING(DebugManager.flags.PrintDebugMessages.get(), stdout,
|
||||
"\nCreated Wddm context. Status: :%lu, engine: %u, contextId: %u, deviceBitfield: %lu \n",
|
||||
status, osContext.getEngineType(), osContext.getContextId(), osContext.getDeviceBitfield().to_ulong());
|
||||
|
||||
if (status != STATUS_SUCCESS) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (osContext.isLowPriority()) {
|
||||
return setLowPriorityContextParam(osContext.getWddmContextHandle());
|
||||
if (status != STATUS_SUCCESS) {
|
||||
return false;
|
||||
}
|
||||
if (osContext.isLowPriority()) {
|
||||
return setLowPriorityContextParam(osContext.getWddmContextHandle());
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user