Update sysman standby APIs to support latest spec.

Change-Id: I7a605c538432b2117ba968f155e4665078abc94f
Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
This commit is contained in:
Vilvaraj, T J Vivek
2020-07-15 00:06:12 +05:30
committed by sys_ocldev
parent 92ce66bee8
commit 7bc405a9b3
19 changed files with 332 additions and 230 deletions

View File

@@ -26,16 +26,33 @@ ze_result_t StandbyImp::standbySetMode(const zet_standby_promo_mode_t mode) {
return pOsStandby->setMode(mode);
}
ze_result_t StandbyImp::standbyGetProperties(zes_standby_properties_t *pProperties) {
*pProperties = zesStandbyProperties;
return ZE_RESULT_SUCCESS;
}
ze_result_t StandbyImp::standbyGetMode(zes_standby_promo_mode_t *pMode) {
return pOsStandby->getMode(*pMode);
}
ze_result_t StandbyImp::standbySetMode(const zes_standby_promo_mode_t mode) {
return pOsStandby->setMode(mode);
}
void StandbyImp::init() {
standbyProperties.type = ZET_STANDBY_TYPE_GLOBAL; // Currently the only defined type
standbyProperties.onSubdevice = false;
standbyProperties.subdeviceId = 0;
zesStandbyProperties.type = ZES_STANDBY_TYPE_GLOBAL;
zesStandbyProperties.onSubdevice = false;
zesStandbyProperties.subdeviceId = 0;
zesStandbyProperties.pNext = nullptr;
this->isStandbyEnabled = pOsStandby->isStandbySupported();
}
StandbyImp::StandbyImp(OsSysman *pOsSysman) {
pOsStandby = OsStandby::create(pOsSysman);
UNRECOVERABLE_IF(nullptr == pOsStandby);
init();
}