Sysman zesPowerGetProperties() implementation.

Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
This commit is contained in:
Vilvaraj, T J Vivek
2020-11-19 17:15:15 +05:30
committed by Compute-Runtime-Automation
parent 14f92cc7a1
commit 53b1dded2f
6 changed files with 19 additions and 4 deletions

View File

@@ -7,8 +7,8 @@
if(SUPPORT_DG1)
set(L0_SRCS_TOOLS_SYSMAN_POWER_LINUX
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/dg1/os_power_imp.cpp
${CMAKE_CURRENT_SOURCE_DIR}/dg1/os_power_imp.h
${CMAKE_CURRENT_SOURCE_DIR}/dg1${BRANCH_DIR_SUFFIX}/os_power_imp.cpp
${CMAKE_CURRENT_SOURCE_DIR}/dg1${BRANCH_DIR_SUFFIX}/os_power_imp.h
)
else()
set(L0_SRCS_TOOLS_SYSMAN_POWER_LINUX

View File

@@ -13,6 +13,7 @@
namespace L0 {
const bool LinuxPowerImp::canControl = true;
const std::string LinuxPowerImp::hwmonDir("device/hwmon");
const std::string LinuxPowerImp::i915("i915");
const std::string LinuxPowerImp::sustainedPowerLimitEnabled("power1_max_enable");
@@ -30,6 +31,8 @@ void powerGetTimestamp(uint64_t &timestamp) {
ze_result_t LinuxPowerImp::getProperties(zes_power_properties_t *pProperties) {
pProperties->onSubdevice = false;
pProperties->subdeviceId = 0;
pProperties->canControl = canControl;
pProperties->isEnergyThresholdSupported = false;
return ZE_RESULT_SUCCESS;
}

View File

@@ -42,6 +42,7 @@ class LinuxPowerImp : public OsPower, NEO::NonCopyableOrMovableClass {
static const std::string burstPowerLimitEnabled;
static const std::string burstPowerLimit;
static const std::string energyCounterNode;
static const bool canControl;
ze_result_t getErrorCode(ze_result_t result) {
if (result == ZE_RESULT_ERROR_NOT_AVAILABLE) {