mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 06:23:01 +08:00
Sysman zesPowerGetProperties() implementation.
Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
14f92cc7a1
commit
53b1dded2f
@@ -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
|
||||
|
||||
@@ -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 ×tamp) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user