// Code generated by cmd/gen. DO NOT EDIT. /* * * Copyright (C) 2019-2025 Intel Corporation * * SPDX-License-Identifier: MIT * * @file zes_api.h * @version v1.15-r1.15.31 * */ package gozel import ( "unsafe" "github.com/fumiama/gozel/internal/zecall" ) // ZesStandbyType (zes_standby_type_t) Standby hardware components type ZesStandbyType uintptr const ( ZES_STANDBY_TYPE_GLOBAL ZesStandbyType = 0 // ZES_STANDBY_TYPE_GLOBAL Control the overall standby policy of the device/sub-device ZES_STANDBY_TYPE_FORCE_UINT32 ZesStandbyType = 0x7fffffff // ZES_STANDBY_TYPE_FORCE_UINT32 Value marking end of ZES_STANDBY_TYPE_* ENUMs ) // ZesStandbyProperties (zes_standby_properties_t) Standby hardware component properties type ZesStandbyProperties struct { Stype ZesStructureType // Stype [in] type of this structure Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). Type ZesStandbyType // Type [out] Which standby hardware component this controls Onsubdevice ZeBool // Onsubdevice [out] True if the resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device } // ZesStandbyPromoMode (zes_standby_promo_mode_t) Standby promotion modes type ZesStandbyPromoMode uintptr const ( ZES_STANDBY_PROMO_MODE_DEFAULT ZesStandbyPromoMode = 0 // ZES_STANDBY_PROMO_MODE_DEFAULT Best compromise between performance and energy savings. ZES_STANDBY_PROMO_MODE_NEVER ZesStandbyPromoMode = 1 // ZES_STANDBY_PROMO_MODE_NEVER The device/component will never shutdown. This can improve performance ///< but uses more energy. ZES_STANDBY_PROMO_MODE_FORCE_UINT32 ZesStandbyPromoMode = 0x7fffffff // ZES_STANDBY_PROMO_MODE_FORCE_UINT32 Value marking end of ZES_STANDBY_PROMO_MODE_* ENUMs ) // ZesDeviceEnumStandbyDomains Get handle of standby controls // / // / @details // / - The application may call this function from simultaneous threads. // / - The implementation of this function should be lock-free. // / // / @returns // / - ::ZE_RESULT_SUCCESS // / - ::ZE_RESULT_ERROR_UNINITIALIZED // / - ::ZE_RESULT_ERROR_DEVICE_LOST // / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY // / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY // / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT // / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE // / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE // / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS // / - ::ZE_RESULT_ERROR_NOT_AVAILABLE // / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET // / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE // / - ::ZE_RESULT_ERROR_UNKNOWN // / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE // / + `nullptr == hDevice` // / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER // / + `nullptr == pCount` func ZesDeviceEnumStandbyDomains( hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. phStandby *ZesStandbyHandle, // phStandby [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceEnumStandbyDomains", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phStandby))) } // ZesStandbyGetProperties Get standby hardware component properties // / // / @details // / - The application may call this function from simultaneous threads. // / - The implementation of this function should be lock-free. // / // / @returns // / - ::ZE_RESULT_SUCCESS // / - ::ZE_RESULT_ERROR_UNINITIALIZED // / - ::ZE_RESULT_ERROR_DEVICE_LOST // / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY // / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY // / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT // / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE // / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE // / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS // / - ::ZE_RESULT_ERROR_NOT_AVAILABLE // / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET // / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE // / - ::ZE_RESULT_ERROR_UNKNOWN // / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE // / + `nullptr == hStandby` // / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER // / + `nullptr == pProperties` func ZesStandbyGetProperties( hStandby ZesStandbyHandle, // hStandby [in] Handle for the component. pProperties *ZesStandbyProperties, // pProperties [in,out] Will contain the standby hardware properties. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesStandbyGetProperties", uintptr(hStandby), uintptr(unsafe.Pointer(pProperties))) } // ZesStandbyGetMode Get the current standby promotion mode // / // / @details // / - The application may call this function from simultaneous threads. // / - The implementation of this function should be lock-free. // / // / @returns // / - ::ZE_RESULT_SUCCESS // / - ::ZE_RESULT_ERROR_UNINITIALIZED // / - ::ZE_RESULT_ERROR_DEVICE_LOST // / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY // / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY // / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT // / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE // / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE // / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS // / - ::ZE_RESULT_ERROR_NOT_AVAILABLE // / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET // / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE // / - ::ZE_RESULT_ERROR_UNKNOWN // / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE // / + `nullptr == hStandby` // / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER // / + `nullptr == pMode` func ZesStandbyGetMode( hStandby ZesStandbyHandle, // hStandby [in] Handle for the component. pMode *ZesStandbyPromoMode, // pMode [in,out] Will contain the current standby mode. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesStandbyGetMode", uintptr(hStandby), uintptr(unsafe.Pointer(pMode))) } // ZesStandbySetMode Set standby promotion mode // / // / @details // / - The application may call this function from simultaneous threads. // / - The implementation of this function should be lock-free. // / // / @returns // / - ::ZE_RESULT_SUCCESS // / - ::ZE_RESULT_ERROR_UNINITIALIZED // / - ::ZE_RESULT_ERROR_DEVICE_LOST // / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY // / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY // / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT // / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE // / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE // / - ::ZE_RESULT_ERROR_NOT_AVAILABLE // / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET // / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE // / - ::ZE_RESULT_ERROR_UNKNOWN // / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE // / + `nullptr == hStandby` // / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION // / + `::ZES_STANDBY_PROMO_MODE_NEVER < mode` // / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION // / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS // / + User does not have permissions to make these modifications. func ZesStandbySetMode( hStandby ZesStandbyHandle, // hStandby [in] Handle for the component. mode ZesStandbyPromoMode, // mode [in] New standby mode. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesStandbySetMode", uintptr(hStandby), uintptr(mode)) }