mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
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:
committed by
sys_ocldev
parent
92ce66bee8
commit
7bc405a9b3
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user