mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-07 21:27:04 +08:00
Add StandbySetMode support
Added mode setting support for standby if required permission is available Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
bb51681bbb
commit
d3d2e153f2
@@ -6,7 +6,7 @@
|
||||
|
||||
set(L0_SRCS_TOOLS_SYSMAN_STANDBY_LINUX
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/os_standby_imp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/os_standby_imp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/os_standby_imp.h
|
||||
)
|
||||
|
||||
|
||||
@@ -47,12 +47,17 @@ ze_result_t LinuxStandbyImp::getMode(zes_standby_promo_mode_t &mode) {
|
||||
}
|
||||
|
||||
ze_result_t LinuxStandbyImp::setMode(zes_standby_promo_mode_t mode) {
|
||||
// standbyModeFile is not writable.
|
||||
// Mode cannot be set from L0.
|
||||
// To set the mode, user must reload
|
||||
// the i915 module and set module parameter
|
||||
// enable_rc6 appropriately.
|
||||
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
||||
ze_result_t result = ZE_RESULT_ERROR_UNKNOWN;
|
||||
if (ZES_STANDBY_PROMO_MODE_DEFAULT == mode) {
|
||||
result = pSysfsAccess->write(standbyModeFile, standbyModeDefault);
|
||||
} else {
|
||||
result = pSysfsAccess->write(standbyModeFile, standbyModeNever);
|
||||
}
|
||||
|
||||
if (ZE_RESULT_ERROR_NOT_AVAILABLE == result) {
|
||||
result = ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
LinuxStandbyImp::LinuxStandbyImp(OsSysman *pOsSysman, ze_bool_t onSubdevice, uint32_t subdeviceId) : isSubdevice(onSubdevice), subdeviceId(subdeviceId) {
|
||||
|
||||
Reference in New Issue
Block a user