fix(sysman): Enables zesInit flow without setting ZES_ENABLE_SYSMAN
Related-To: LOCI-4458 Signed-off-by: Kulkarni, Ashwin Kumar <ashwin.kumar.kulkarni@intel.com>
This commit is contained in:
parent
51d922f5a1
commit
73b40a49dc
|
@ -5,8 +5,6 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "shared/source/os_interface/debug_env_reader.h"
|
|
||||||
|
|
||||||
#include "level_zero/source/inc/ze_intel_gpu.h"
|
#include "level_zero/source/inc/ze_intel_gpu.h"
|
||||||
#include <level_zero/ze_api.h>
|
#include <level_zero/ze_api.h>
|
||||||
#include <level_zero/ze_ddi.h>
|
#include <level_zero/ze_ddi.h>
|
||||||
|
@ -31,14 +29,6 @@ zesGetDeviceProcAddrTable(
|
||||||
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
||||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||||
|
|
||||||
NEO::EnvironmentVariableReader envReader;
|
|
||||||
bool isSysManEnabled =
|
|
||||||
envReader.getSetting("ZES_ENABLE_SYSMAN", false);
|
|
||||||
if (false == isSysManEnabled) {
|
|
||||||
*pDdiTable = {};
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
pDdiTable->pfnGetProperties = L0::zesDeviceGetProperties;
|
pDdiTable->pfnGetProperties = L0::zesDeviceGetProperties;
|
||||||
pDdiTable->pfnGetState = L0::zesDeviceGetState;
|
pDdiTable->pfnGetState = L0::zesDeviceGetState;
|
||||||
pDdiTable->pfnReset = L0::zesDeviceReset;
|
pDdiTable->pfnReset = L0::zesDeviceReset;
|
||||||
|
@ -90,13 +80,6 @@ zesGetGlobalProcAddrTable(
|
||||||
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
||||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||||
|
|
||||||
NEO::EnvironmentVariableReader envReader;
|
|
||||||
bool isSysManEnabled =
|
|
||||||
envReader.getSetting("ZES_ENABLE_SYSMAN", false);
|
|
||||||
if (false == isSysManEnabled) {
|
|
||||||
*pDdiTable = {};
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
pDdiTable->pfnInit = L0::zesInit;
|
pDdiTable->pfnInit = L0::zesInit;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -113,14 +96,6 @@ zesGetDriverProcAddrTable(
|
||||||
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
||||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||||
|
|
||||||
NEO::EnvironmentVariableReader envReader;
|
|
||||||
bool isSysManEnabled =
|
|
||||||
envReader.getSetting("ZES_ENABLE_SYSMAN", false);
|
|
||||||
if (false == isSysManEnabled) {
|
|
||||||
*pDdiTable = {};
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
pDdiTable->pfnEventListen = L0::zesDriverEventListen;
|
pDdiTable->pfnEventListen = L0::zesDriverEventListen;
|
||||||
pDdiTable->pfnEventListenEx = L0::zesDriverEventListenEx;
|
pDdiTable->pfnEventListenEx = L0::zesDriverEventListenEx;
|
||||||
pDdiTable->pfnGet = L0::zesDriverGet;
|
pDdiTable->pfnGet = L0::zesDriverGet;
|
||||||
|
@ -139,14 +114,6 @@ zesGetDiagnosticsProcAddrTable(
|
||||||
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
||||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||||
|
|
||||||
NEO::EnvironmentVariableReader envReader;
|
|
||||||
bool isSysManEnabled =
|
|
||||||
envReader.getSetting("ZES_ENABLE_SYSMAN", false);
|
|
||||||
if (false == isSysManEnabled) {
|
|
||||||
*pDdiTable = {};
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
pDdiTable->pfnGetProperties = L0::zesDiagnosticsGetProperties;
|
pDdiTable->pfnGetProperties = L0::zesDiagnosticsGetProperties;
|
||||||
pDdiTable->pfnGetTests = L0::zesDiagnosticsGetTests;
|
pDdiTable->pfnGetTests = L0::zesDiagnosticsGetTests;
|
||||||
pDdiTable->pfnRunTests = L0::zesDiagnosticsRunTests;
|
pDdiTable->pfnRunTests = L0::zesDiagnosticsRunTests;
|
||||||
|
@ -166,14 +133,6 @@ zesGetEngineProcAddrTable(
|
||||||
|
|
||||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||||
|
|
||||||
NEO::EnvironmentVariableReader envReader;
|
|
||||||
bool isSysManEnabled =
|
|
||||||
envReader.getSetting("ZES_ENABLE_SYSMAN", false);
|
|
||||||
if (false == isSysManEnabled) {
|
|
||||||
*pDdiTable = {};
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
pDdiTable->pfnGetProperties = L0::zesEngineGetProperties;
|
pDdiTable->pfnGetProperties = L0::zesEngineGetProperties;
|
||||||
pDdiTable->pfnGetActivity = L0::zesEngineGetActivity;
|
pDdiTable->pfnGetActivity = L0::zesEngineGetActivity;
|
||||||
|
|
||||||
|
@ -191,14 +150,6 @@ zesGetFabricPortProcAddrTable(
|
||||||
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
||||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||||
|
|
||||||
NEO::EnvironmentVariableReader envReader;
|
|
||||||
bool isSysManEnabled =
|
|
||||||
envReader.getSetting("ZES_ENABLE_SYSMAN", false);
|
|
||||||
if (false == isSysManEnabled) {
|
|
||||||
*pDdiTable = {};
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
pDdiTable->pfnGetProperties = L0::zesFabricPortGetProperties;
|
pDdiTable->pfnGetProperties = L0::zesFabricPortGetProperties;
|
||||||
pDdiTable->pfnGetLinkType = L0::zesFabricPortGetLinkType;
|
pDdiTable->pfnGetLinkType = L0::zesFabricPortGetLinkType;
|
||||||
pDdiTable->pfnGetConfig = L0::zesFabricPortGetConfig;
|
pDdiTable->pfnGetConfig = L0::zesFabricPortGetConfig;
|
||||||
|
@ -220,14 +171,6 @@ zesGetFanProcAddrTable(
|
||||||
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
||||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||||
|
|
||||||
NEO::EnvironmentVariableReader envReader;
|
|
||||||
bool isSysManEnabled =
|
|
||||||
envReader.getSetting("ZES_ENABLE_SYSMAN", false);
|
|
||||||
if (false == isSysManEnabled) {
|
|
||||||
*pDdiTable = {};
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
pDdiTable->pfnGetProperties = L0::zesFanGetProperties;
|
pDdiTable->pfnGetProperties = L0::zesFanGetProperties;
|
||||||
pDdiTable->pfnGetConfig = L0::zesFanGetConfig;
|
pDdiTable->pfnGetConfig = L0::zesFanGetConfig;
|
||||||
pDdiTable->pfnSetDefaultMode = L0::zesFanSetDefaultMode;
|
pDdiTable->pfnSetDefaultMode = L0::zesFanSetDefaultMode;
|
||||||
|
@ -249,14 +192,6 @@ zesGetFirmwareProcAddrTable(
|
||||||
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
||||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||||
|
|
||||||
NEO::EnvironmentVariableReader envReader;
|
|
||||||
bool isSysManEnabled =
|
|
||||||
envReader.getSetting("ZES_ENABLE_SYSMAN", false);
|
|
||||||
if (false == isSysManEnabled) {
|
|
||||||
*pDdiTable = {};
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
pDdiTable->pfnGetProperties = L0::zesFirmwareGetProperties;
|
pDdiTable->pfnGetProperties = L0::zesFirmwareGetProperties;
|
||||||
pDdiTable->pfnFlash = L0::zesFirmwareFlash;
|
pDdiTable->pfnFlash = L0::zesFirmwareFlash;
|
||||||
|
|
||||||
|
@ -275,14 +210,6 @@ zesGetFrequencyProcAddrTable(
|
||||||
|
|
||||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||||
|
|
||||||
NEO::EnvironmentVariableReader envReader;
|
|
||||||
bool isSysManEnabled =
|
|
||||||
envReader.getSetting("ZES_ENABLE_SYSMAN", false);
|
|
||||||
if (false == isSysManEnabled) {
|
|
||||||
*pDdiTable = {};
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
pDdiTable->pfnGetProperties = L0::zesFrequencyGetProperties;
|
pDdiTable->pfnGetProperties = L0::zesFrequencyGetProperties;
|
||||||
pDdiTable->pfnGetAvailableClocks = L0::zesFrequencyGetAvailableClocks;
|
pDdiTable->pfnGetAvailableClocks = L0::zesFrequencyGetAvailableClocks;
|
||||||
pDdiTable->pfnGetRange = L0::zesFrequencyGetRange;
|
pDdiTable->pfnGetRange = L0::zesFrequencyGetRange;
|
||||||
|
@ -315,14 +242,6 @@ zesGetLedProcAddrTable(
|
||||||
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
||||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||||
|
|
||||||
NEO::EnvironmentVariableReader envReader;
|
|
||||||
bool isSysManEnabled =
|
|
||||||
envReader.getSetting("ZES_ENABLE_SYSMAN", false);
|
|
||||||
if (false == isSysManEnabled) {
|
|
||||||
*pDdiTable = {};
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
pDdiTable->pfnGetProperties = L0::zesLedGetProperties;
|
pDdiTable->pfnGetProperties = L0::zesLedGetProperties;
|
||||||
pDdiTable->pfnGetState = L0::zesLedGetState;
|
pDdiTable->pfnGetState = L0::zesLedGetState;
|
||||||
pDdiTable->pfnSetState = L0::zesLedSetState;
|
pDdiTable->pfnSetState = L0::zesLedSetState;
|
||||||
|
@ -342,14 +261,6 @@ zesGetMemoryProcAddrTable(
|
||||||
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
||||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||||
|
|
||||||
NEO::EnvironmentVariableReader envReader;
|
|
||||||
bool isSysManEnabled =
|
|
||||||
envReader.getSetting("ZES_ENABLE_SYSMAN", false);
|
|
||||||
if (false == isSysManEnabled) {
|
|
||||||
*pDdiTable = {};
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
pDdiTable->pfnGetProperties = L0::zesMemoryGetProperties;
|
pDdiTable->pfnGetProperties = L0::zesMemoryGetProperties;
|
||||||
pDdiTable->pfnGetState = L0::zesMemoryGetState;
|
pDdiTable->pfnGetState = L0::zesMemoryGetState;
|
||||||
pDdiTable->pfnGetBandwidth = L0::zesMemoryGetBandwidth;
|
pDdiTable->pfnGetBandwidth = L0::zesMemoryGetBandwidth;
|
||||||
|
@ -368,14 +279,6 @@ zesGetPerformanceFactorProcAddrTable(
|
||||||
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
||||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||||
|
|
||||||
NEO::EnvironmentVariableReader envReader;
|
|
||||||
bool isSysManEnabled =
|
|
||||||
envReader.getSetting("ZES_ENABLE_SYSMAN", false);
|
|
||||||
if (false == isSysManEnabled) {
|
|
||||||
*pDdiTable = {};
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
pDdiTable->pfnGetProperties = L0::zesPerformanceFactorGetProperties;
|
pDdiTable->pfnGetProperties = L0::zesPerformanceFactorGetProperties;
|
||||||
pDdiTable->pfnGetConfig = L0::zesPerformanceFactorGetConfig;
|
pDdiTable->pfnGetConfig = L0::zesPerformanceFactorGetConfig;
|
||||||
pDdiTable->pfnSetConfig = L0::zesPerformanceFactorSetConfig;
|
pDdiTable->pfnSetConfig = L0::zesPerformanceFactorSetConfig;
|
||||||
|
@ -394,14 +297,6 @@ zesGetPowerProcAddrTable(
|
||||||
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
||||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||||
|
|
||||||
NEO::EnvironmentVariableReader envReader;
|
|
||||||
bool isSysManEnabled =
|
|
||||||
envReader.getSetting("ZES_ENABLE_SYSMAN", false);
|
|
||||||
if (false == isSysManEnabled) {
|
|
||||||
*pDdiTable = {};
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
pDdiTable->pfnGetProperties = L0::zesPowerGetProperties;
|
pDdiTable->pfnGetProperties = L0::zesPowerGetProperties;
|
||||||
pDdiTable->pfnGetEnergyCounter = L0::zesPowerGetEnergyCounter;
|
pDdiTable->pfnGetEnergyCounter = L0::zesPowerGetEnergyCounter;
|
||||||
pDdiTable->pfnGetLimits = L0::zesPowerGetLimits;
|
pDdiTable->pfnGetLimits = L0::zesPowerGetLimits;
|
||||||
|
@ -425,14 +320,6 @@ zesGetPsuProcAddrTable(
|
||||||
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
||||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||||
|
|
||||||
NEO::EnvironmentVariableReader envReader;
|
|
||||||
bool isSysManEnabled =
|
|
||||||
envReader.getSetting("ZES_ENABLE_SYSMAN", false);
|
|
||||||
if (false == isSysManEnabled) {
|
|
||||||
*pDdiTable = {};
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
pDdiTable->pfnGetProperties = L0::zesPsuGetProperties;
|
pDdiTable->pfnGetProperties = L0::zesPsuGetProperties;
|
||||||
pDdiTable->pfnGetState = L0::zesPsuGetState;
|
pDdiTable->pfnGetState = L0::zesPsuGetState;
|
||||||
|
|
||||||
|
@ -450,14 +337,6 @@ zesGetRasProcAddrTable(
|
||||||
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
||||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||||
|
|
||||||
NEO::EnvironmentVariableReader envReader;
|
|
||||||
bool isSysManEnabled =
|
|
||||||
envReader.getSetting("ZES_ENABLE_SYSMAN", false);
|
|
||||||
if (false == isSysManEnabled) {
|
|
||||||
*pDdiTable = {};
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
pDdiTable->pfnGetProperties = L0::zesRasGetProperties;
|
pDdiTable->pfnGetProperties = L0::zesRasGetProperties;
|
||||||
pDdiTable->pfnGetConfig = L0::zesRasGetConfig;
|
pDdiTable->pfnGetConfig = L0::zesRasGetConfig;
|
||||||
pDdiTable->pfnSetConfig = L0::zesRasSetConfig;
|
pDdiTable->pfnSetConfig = L0::zesRasSetConfig;
|
||||||
|
@ -477,14 +356,6 @@ zesGetSchedulerProcAddrTable(
|
||||||
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
||||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||||
|
|
||||||
NEO::EnvironmentVariableReader envReader;
|
|
||||||
bool isSysManEnabled =
|
|
||||||
envReader.getSetting("ZES_ENABLE_SYSMAN", false);
|
|
||||||
if (false == isSysManEnabled) {
|
|
||||||
*pDdiTable = {};
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
pDdiTable->pfnGetProperties = L0::zesSchedulerGetProperties;
|
pDdiTable->pfnGetProperties = L0::zesSchedulerGetProperties;
|
||||||
pDdiTable->pfnGetCurrentMode = L0::zesSchedulerGetCurrentMode;
|
pDdiTable->pfnGetCurrentMode = L0::zesSchedulerGetCurrentMode;
|
||||||
pDdiTable->pfnGetTimeoutModeProperties = L0::zesSchedulerGetTimeoutModeProperties;
|
pDdiTable->pfnGetTimeoutModeProperties = L0::zesSchedulerGetTimeoutModeProperties;
|
||||||
|
@ -508,14 +379,6 @@ zesGetStandbyProcAddrTable(
|
||||||
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
||||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||||
|
|
||||||
NEO::EnvironmentVariableReader envReader;
|
|
||||||
bool isSysManEnabled =
|
|
||||||
envReader.getSetting("ZES_ENABLE_SYSMAN", false);
|
|
||||||
if (false == isSysManEnabled) {
|
|
||||||
*pDdiTable = {};
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
pDdiTable->pfnGetProperties = L0::zesStandbyGetProperties;
|
pDdiTable->pfnGetProperties = L0::zesStandbyGetProperties;
|
||||||
pDdiTable->pfnGetMode = L0::zesStandbyGetMode;
|
pDdiTable->pfnGetMode = L0::zesStandbyGetMode;
|
||||||
pDdiTable->pfnSetMode = L0::zesStandbySetMode;
|
pDdiTable->pfnSetMode = L0::zesStandbySetMode;
|
||||||
|
@ -534,14 +397,6 @@ zesGetTemperatureProcAddrTable(
|
||||||
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
||||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||||
|
|
||||||
NEO::EnvironmentVariableReader envReader;
|
|
||||||
bool isSysManEnabled =
|
|
||||||
envReader.getSetting("ZES_ENABLE_SYSMAN", false);
|
|
||||||
if (false == isSysManEnabled) {
|
|
||||||
*pDdiTable = {};
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
pDdiTable->pfnGetProperties = L0::zesTemperatureGetProperties;
|
pDdiTable->pfnGetProperties = L0::zesTemperatureGetProperties;
|
||||||
pDdiTable->pfnGetConfig = L0::zesTemperatureGetConfig;
|
pDdiTable->pfnGetConfig = L0::zesTemperatureGetConfig;
|
||||||
pDdiTable->pfnSetConfig = L0::zesTemperatureSetConfig;
|
pDdiTable->pfnSetConfig = L0::zesTemperatureSetConfig;
|
||||||
|
@ -562,14 +417,6 @@ zesGetOverclockProcAddrTable(
|
||||||
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
|
||||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||||
|
|
||||||
NEO::EnvironmentVariableReader envReader;
|
|
||||||
bool isSysManEnabled =
|
|
||||||
envReader.getSetting("ZES_ENABLE_SYSMAN", false);
|
|
||||||
if (false == isSysManEnabled) {
|
|
||||||
*pDdiTable = {};
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
pDdiTable->pfnGetDomainProperties = L0::zesOverclockGetDomainProperties;
|
pDdiTable->pfnGetDomainProperties = L0::zesOverclockGetDomainProperties;
|
||||||
pDdiTable->pfnGetDomainVFProperties = L0::zesOverclockGetDomainVFProperties;
|
pDdiTable->pfnGetDomainVFProperties = L0::zesOverclockGetDomainVFProperties;
|
||||||
pDdiTable->pfnGetDomainControlProperties = L0::zesOverclockGetDomainControlProperties;
|
pDdiTable->pfnGetDomainControlProperties = L0::zesOverclockGetDomainControlProperties;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -23,6 +23,7 @@ namespace L0 {
|
||||||
namespace Sysman {
|
namespace Sysman {
|
||||||
_ze_driver_handle_t *GlobalSysmanDriverHandle = nullptr;
|
_ze_driver_handle_t *GlobalSysmanDriverHandle = nullptr;
|
||||||
uint32_t driverCount = 0;
|
uint32_t driverCount = 0;
|
||||||
|
bool sysmanOnlyInit = false;
|
||||||
|
|
||||||
void SysmanDriverImp::initialize(ze_result_t *result) {
|
void SysmanDriverImp::initialize(ze_result_t *result) {
|
||||||
*result = ZE_RESULT_ERROR_UNINITIALIZED;
|
*result = ZE_RESULT_ERROR_UNINITIALIZED;
|
||||||
|
@ -76,6 +77,9 @@ ze_result_t SysmanDriverImp::driverInit(zes_init_flags_t flags) {
|
||||||
ze_result_t result;
|
ze_result_t result;
|
||||||
this->initialize(&result);
|
this->initialize(&result);
|
||||||
initStatus = result;
|
initStatus = result;
|
||||||
|
if (result == ZE_RESULT_SUCCESS) {
|
||||||
|
sysmanOnlyInit = true;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return initStatus;
|
return initStatus;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@ ze_result_t driverHandleGet(uint32_t *pCount, ze_driver_handle_t *phDrivers);
|
||||||
|
|
||||||
extern uint32_t driverCount;
|
extern uint32_t driverCount;
|
||||||
extern _ze_driver_handle_t *GlobalSysmanDriverHandle;
|
extern _ze_driver_handle_t *GlobalSysmanDriverHandle;
|
||||||
|
extern bool sysmanOnlyInit;
|
||||||
|
|
||||||
} // namespace Sysman
|
} // namespace Sysman
|
||||||
} // namespace L0
|
} // namespace L0
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include "level_zero/sysman/source/linux/zes_os_sysman_driver_imp.h"
|
#include "level_zero/sysman/source/linux/zes_os_sysman_driver_imp.h"
|
||||||
#include "level_zero/sysman/source/linux/zes_os_sysman_imp.h"
|
#include "level_zero/sysman/source/linux/zes_os_sysman_imp.h"
|
||||||
#include "level_zero/sysman/source/sysman_device.h"
|
#include "level_zero/sysman/source/sysman_device.h"
|
||||||
|
#include "level_zero/sysman/source/sysman_driver.h"
|
||||||
#include "level_zero/sysman/source/sysman_driver_handle_imp.h"
|
#include "level_zero/sysman/source/sysman_driver_handle_imp.h"
|
||||||
#include "level_zero/sysman/test/unit_tests/sources/firmware_util/mock_fw_util_fixture.h"
|
#include "level_zero/sysman/test/unit_tests/sources/firmware_util/mock_fw_util_fixture.h"
|
||||||
#include "level_zero/sysman/test/unit_tests/sources/linux/mock_sysman_drm.h"
|
#include "level_zero/sysman/test/unit_tests/sources/linux/mock_sysman_drm.h"
|
||||||
|
@ -71,6 +72,8 @@ class SysmanDeviceFixture : public ::testing::Test {
|
||||||
pSysmanDevice = driverHandle->sysmanDevices[0];
|
pSysmanDevice = driverHandle->sysmanDevices[0];
|
||||||
L0::Sysman::GlobalSysmanDriver = driverHandle.get();
|
L0::Sysman::GlobalSysmanDriver = driverHandle.get();
|
||||||
|
|
||||||
|
L0::Sysman::sysmanOnlyInit = true;
|
||||||
|
|
||||||
pSysmanDeviceImp = static_cast<L0::Sysman::SysmanDeviceImp *>(pSysmanDevice);
|
pSysmanDeviceImp = static_cast<L0::Sysman::SysmanDeviceImp *>(pSysmanDevice);
|
||||||
pOsSysman = pSysmanDeviceImp->pOsSysman;
|
pOsSysman = pSysmanDeviceImp->pOsSysman;
|
||||||
pLinuxSysmanImp = static_cast<PublicLinuxSysmanImp *>(pOsSysman);
|
pLinuxSysmanImp = static_cast<PublicLinuxSysmanImp *>(pOsSysman);
|
||||||
|
@ -78,6 +81,7 @@ class SysmanDeviceFixture : public ::testing::Test {
|
||||||
}
|
}
|
||||||
void TearDown() override {
|
void TearDown() override {
|
||||||
L0::Sysman::GlobalSysmanDriver = nullptr;
|
L0::Sysman::GlobalSysmanDriver = nullptr;
|
||||||
|
L0::Sysman::sysmanOnlyInit = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
L0::Sysman::SysmanDevice *pSysmanDevice = nullptr;
|
L0::Sysman::SysmanDevice *pSysmanDevice = nullptr;
|
||||||
|
@ -119,12 +123,15 @@ class SysmanMultiDeviceFixture : public ::testing::Test {
|
||||||
driverHandle->initialize(*execEnv);
|
driverHandle->initialize(*execEnv);
|
||||||
pSysmanDevice = driverHandle->sysmanDevices[0];
|
pSysmanDevice = driverHandle->sysmanDevices[0];
|
||||||
|
|
||||||
|
L0::Sysman::sysmanOnlyInit = true;
|
||||||
|
|
||||||
pSysmanDeviceImp = static_cast<L0::Sysman::SysmanDeviceImp *>(pSysmanDevice);
|
pSysmanDeviceImp = static_cast<L0::Sysman::SysmanDeviceImp *>(pSysmanDevice);
|
||||||
pOsSysman = pSysmanDeviceImp->pOsSysman;
|
pOsSysman = pSysmanDeviceImp->pOsSysman;
|
||||||
pLinuxSysmanImp = static_cast<PublicLinuxSysmanImp *>(pOsSysman);
|
pLinuxSysmanImp = static_cast<PublicLinuxSysmanImp *>(pOsSysman);
|
||||||
pLinuxSysmanImp->pFwUtilInterface = new MockFwUtilInterface();
|
pLinuxSysmanImp->pFwUtilInterface = new MockFwUtilInterface();
|
||||||
}
|
}
|
||||||
void TearDown() override {
|
void TearDown() override {
|
||||||
|
L0::Sysman::sysmanOnlyInit = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
L0::Sysman::SysmanDevice *pSysmanDevice = nullptr;
|
L0::Sysman::SysmanDevice *pSysmanDevice = nullptr;
|
||||||
|
|
|
@ -204,6 +204,7 @@ struct SysmanDriverHandleTest : public ::testing::Test {
|
||||||
driverHandle = L0::Sysman::SysmanDriverHandle::create(*executionEnvironment, &returnValue);
|
driverHandle = L0::Sysman::SysmanDriverHandle::create(*executionEnvironment, &returnValue);
|
||||||
L0::Sysman::GlobalSysmanDriverHandle = driverHandle;
|
L0::Sysman::GlobalSysmanDriverHandle = driverHandle;
|
||||||
L0::Sysman::driverCount = 1;
|
L0::Sysman::driverCount = 1;
|
||||||
|
L0::Sysman::sysmanOnlyInit = true;
|
||||||
}
|
}
|
||||||
void TearDown() override {
|
void TearDown() override {
|
||||||
if (driverHandle) {
|
if (driverHandle) {
|
||||||
|
@ -212,6 +213,7 @@ struct SysmanDriverHandleTest : public ::testing::Test {
|
||||||
L0::Sysman::GlobalSysmanDriver = nullptr;
|
L0::Sysman::GlobalSysmanDriver = nullptr;
|
||||||
L0::Sysman::GlobalSysmanDriverHandle = nullptr;
|
L0::Sysman::GlobalSysmanDriverHandle = nullptr;
|
||||||
L0::Sysman::driverCount = 0;
|
L0::Sysman::driverCount = 0;
|
||||||
|
L0::Sysman::sysmanOnlyInit = false;
|
||||||
}
|
}
|
||||||
L0::Sysman::SysmanDriverHandle *driverHandle;
|
L0::Sysman::SysmanDriverHandle *driverHandle;
|
||||||
NEO::ExecutionEnvironment *executionEnvironment = nullptr;
|
NEO::ExecutionEnvironment *executionEnvironment = nullptr;
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
#include "shared/test/common/helpers/default_hw_info.h"
|
#include "shared/test/common/helpers/default_hw_info.h"
|
||||||
|
|
||||||
|
#include "level_zero/sysman/source/sysman_driver.h"
|
||||||
#include "level_zero/sysman/source/sysman_driver_handle_imp.h"
|
#include "level_zero/sysman/source/sysman_driver_handle_imp.h"
|
||||||
#include "level_zero/sysman/source/windows/zes_os_sysman_imp.h"
|
#include "level_zero/sysman/source/windows/zes_os_sysman_imp.h"
|
||||||
#include "level_zero/sysman/test/unit_tests/sources/firmware_util/mock_fw_util_fixture.h"
|
#include "level_zero/sysman/test/unit_tests/sources/firmware_util/mock_fw_util_fixture.h"
|
||||||
|
@ -42,6 +43,8 @@ class SysmanDeviceFixture : public ::testing::Test {
|
||||||
driverHandle->initialize(*execEnv);
|
driverHandle->initialize(*execEnv);
|
||||||
pSysmanDevice = driverHandle->sysmanDevices[0];
|
pSysmanDevice = driverHandle->sysmanDevices[0];
|
||||||
|
|
||||||
|
L0::Sysman::sysmanOnlyInit = true;
|
||||||
|
|
||||||
pSysmanDeviceImp = static_cast<L0::Sysman::SysmanDeviceImp *>(pSysmanDevice);
|
pSysmanDeviceImp = static_cast<L0::Sysman::SysmanDeviceImp *>(pSysmanDevice);
|
||||||
pOsSysman = pSysmanDeviceImp->pOsSysman;
|
pOsSysman = pSysmanDeviceImp->pOsSysman;
|
||||||
pWddmSysmanImp = static_cast<PublicWddmSysmanImp *>(pOsSysman);
|
pWddmSysmanImp = static_cast<PublicWddmSysmanImp *>(pOsSysman);
|
||||||
|
@ -49,6 +52,7 @@ class SysmanDeviceFixture : public ::testing::Test {
|
||||||
}
|
}
|
||||||
|
|
||||||
void TearDown() override {
|
void TearDown() override {
|
||||||
|
L0::Sysman::sysmanOnlyInit = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
L0::Sysman::SysmanDevice *pSysmanDevice = nullptr;
|
L0::Sysman::SysmanDevice *pSysmanDevice = nullptr;
|
||||||
|
|
Loading…
Reference in New Issue