mirror of
https://github.com/fumiama/gozel.git
synced 2026-06-05 08:20:24 +08:00
796 lines
45 KiB
Go
796 lines
45 KiB
Go
// 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"
|
|
)
|
|
|
|
// ZesFreqDomain (zes_freq_domain_t) Frequency domains.
|
|
type ZesFreqDomain uintptr
|
|
|
|
const (
|
|
ZES_FREQ_DOMAIN_GPU ZesFreqDomain = 0 // ZES_FREQ_DOMAIN_GPU GPU Core Domain.
|
|
ZES_FREQ_DOMAIN_MEMORY ZesFreqDomain = 1 // ZES_FREQ_DOMAIN_MEMORY Local Memory Domain.
|
|
ZES_FREQ_DOMAIN_MEDIA ZesFreqDomain = 2 // ZES_FREQ_DOMAIN_MEDIA GPU Media Domain.
|
|
ZES_FREQ_DOMAIN_FORCE_UINT32 ZesFreqDomain = 0x7fffffff // ZES_FREQ_DOMAIN_FORCE_UINT32 Value marking end of ZES_FREQ_DOMAIN_* ENUMs
|
|
|
|
)
|
|
|
|
// ZesFreqProperties (zes_freq_properties_t) Frequency properties
|
|
// /
|
|
// / @details
|
|
// / - Indicates if this frequency domain can be overclocked (if true,
|
|
// / functions such as ::zesFrequencyOcSetFrequencyTarget() are supported).
|
|
// / - The min/max hardware frequencies are specified for non-overclock
|
|
// / configurations. For overclock configurations, use
|
|
// / ::zesFrequencyOcGetFrequencyTarget() to determine the maximum
|
|
// / frequency that can be requested.
|
|
type ZesFreqProperties 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 ZesFreqDomain // Type [out] The hardware block that this frequency domain controls (GPU, memory, ...)
|
|
Onsubdevice ZeBool // Onsubdevice [out] True if this 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
|
|
Cancontrol ZeBool // Cancontrol [out] Indicates if software can control the frequency of this domain assuming the user has permissions
|
|
Isthrottleeventsupported ZeBool // Isthrottleeventsupported [out] Indicates if software can register to receive event ::ZES_EVENT_TYPE_FLAG_FREQ_THROTTLED
|
|
Min float64 // Min [out] The minimum hardware clock frequency in units of MHz.
|
|
Max float64 // Max [out] The maximum non-overclock hardware clock frequency in units of MHz.
|
|
|
|
}
|
|
|
|
// ZesFreqRange (zes_freq_range_t) Frequency range between which the hardware can operate.
|
|
// /
|
|
// / @details
|
|
// / - When setting limits, they will be clamped to the hardware limits.
|
|
// / - When setting limits, ensure that the max frequency is greater than or
|
|
// / equal to the min frequency specified.
|
|
// / - When setting limits to return to factory settings, specify -1 for both
|
|
// / the min and max limit.
|
|
type ZesFreqRange struct {
|
|
Min float64 // Min [in,out] The min frequency in MHz below which hardware frequency management will not request frequencies. On input, setting to 0 will permit the frequency to go down to the hardware minimum while setting to -1 will return the min frequency limit to the factory value (can be larger than the hardware min). On output, a negative value indicates that no external minimum frequency limit is in effect.
|
|
Max float64 // Max [in,out] The max frequency in MHz above which hardware frequency management will not request frequencies. On input, setting to 0 or a very big number will permit the frequency to go all the way up to the hardware maximum while setting to -1 will return the max frequency to the factory value (which can be less than the hardware max). On output, a negative number indicates that no external maximum frequency limit is in effect.
|
|
|
|
}
|
|
|
|
// ZesFreqThrottleReasonFlags (zes_freq_throttle_reason_flags_t) Frequency throttle reasons
|
|
type ZesFreqThrottleReasonFlags uint32
|
|
|
|
const (
|
|
ZES_FREQ_THROTTLE_REASON_FLAG_AVE_PWR_CAP ZesFreqThrottleReasonFlags = /* ZE_BIT(0) */ (1 << 0) // ZES_FREQ_THROTTLE_REASON_FLAG_AVE_PWR_CAP frequency throttled due to average power excursion (PL1)
|
|
ZES_FREQ_THROTTLE_REASON_FLAG_BURST_PWR_CAP ZesFreqThrottleReasonFlags = /* ZE_BIT(1) */ (1 << 1) // ZES_FREQ_THROTTLE_REASON_FLAG_BURST_PWR_CAP frequency throttled due to burst power excursion (PL2)
|
|
ZES_FREQ_THROTTLE_REASON_FLAG_CURRENT_LIMIT ZesFreqThrottleReasonFlags = /* ZE_BIT(2) */ (1 << 2) // ZES_FREQ_THROTTLE_REASON_FLAG_CURRENT_LIMIT frequency throttled due to current excursion (PL4)
|
|
ZES_FREQ_THROTTLE_REASON_FLAG_THERMAL_LIMIT ZesFreqThrottleReasonFlags = /* ZE_BIT(3) */ (1 << 3) // ZES_FREQ_THROTTLE_REASON_FLAG_THERMAL_LIMIT frequency throttled due to thermal excursion (T > TjMax)
|
|
ZES_FREQ_THROTTLE_REASON_FLAG_PSU_ALERT ZesFreqThrottleReasonFlags = /* ZE_BIT(4) */ (1 << 4) // ZES_FREQ_THROTTLE_REASON_FLAG_PSU_ALERT frequency throttled due to power supply assertion
|
|
ZES_FREQ_THROTTLE_REASON_FLAG_SW_RANGE ZesFreqThrottleReasonFlags = /* ZE_BIT(5) */ (1 << 5) // ZES_FREQ_THROTTLE_REASON_FLAG_SW_RANGE frequency throttled due to software supplied frequency range
|
|
ZES_FREQ_THROTTLE_REASON_FLAG_HW_RANGE ZesFreqThrottleReasonFlags = /* ZE_BIT(6) */ (1 << 6) // ZES_FREQ_THROTTLE_REASON_FLAG_HW_RANGE frequency throttled due to a sub block that has a lower frequency
|
|
|
|
///< range when it receives clocks
|
|
|
|
ZES_FREQ_THROTTLE_REASON_FLAG_VOLTAGE ZesFreqThrottleReasonFlags = /* ZE_BIT(7) */ (1 << 7) // ZES_FREQ_THROTTLE_REASON_FLAG_VOLTAGE frequency throttled due to voltage excursion
|
|
ZES_FREQ_THROTTLE_REASON_FLAG_THERMAL ZesFreqThrottleReasonFlags = /* ZE_BIT(8) */ (1 << 8) // ZES_FREQ_THROTTLE_REASON_FLAG_THERMAL frequency throttled due to thermal conditions
|
|
ZES_FREQ_THROTTLE_REASON_FLAG_POWER ZesFreqThrottleReasonFlags = /* ZE_BIT(9) */ (1 << 9) // ZES_FREQ_THROTTLE_REASON_FLAG_POWER frequency throttled due to power constraints
|
|
ZES_FREQ_THROTTLE_REASON_FLAG_FORCE_UINT32 ZesFreqThrottleReasonFlags = 0x7fffffff // ZES_FREQ_THROTTLE_REASON_FLAG_FORCE_UINT32 Value marking end of ZES_FREQ_THROTTLE_REASON_FLAG_* ENUMs
|
|
|
|
)
|
|
|
|
// ZesFreqState (zes_freq_state_t) Frequency state
|
|
type ZesFreqState struct {
|
|
Stype ZesStructureType // Stype [in] type of this structure
|
|
Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
|
|
Currentvoltage float64 // Currentvoltage [out] Current voltage in Volts. A negative value indicates that this property is not known.
|
|
Request float64 // Request [out] The current frequency request in MHz. A negative value indicates that this property is not known.
|
|
Tdp float64 // Tdp [out] The maximum frequency in MHz supported under the current TDP conditions. This fluctuates dynamically based on the power and thermal limits of the part. A negative value indicates that this property is not known.
|
|
Efficient float64 // Efficient [out] The efficient minimum frequency in MHz. A negative value indicates that this property is not known.
|
|
Actual float64 // Actual [out] The resolved frequency in MHz. A negative value indicates that this property is not known.
|
|
Throttlereasons ZesFreqThrottleReasonFlags // Throttlereasons [out] The reasons that the frequency is being limited by the hardware. Returns 0 (frequency not throttled) or a combination of ::zes_freq_throttle_reason_flag_t.
|
|
|
|
}
|
|
|
|
// ZesFreqThrottleTime (zes_freq_throttle_time_t) Frequency throttle time snapshot
|
|
// /
|
|
// / @details
|
|
// / - Percent time throttled is calculated by taking two snapshots (s1, s2)
|
|
// / and using the equation: %throttled = (s2.throttleTime -
|
|
// / s1.throttleTime) / (s2.timestamp - s1.timestamp)
|
|
type ZesFreqThrottleTime struct {
|
|
Throttletime uint64 // Throttletime [out] The monotonic counter of time in microseconds that the frequency has been limited by the hardware.
|
|
Timestamp uint64 // Timestamp [out] Microsecond timestamp when throttleTime was captured. This timestamp should only be used to calculate delta time between snapshots of this structure. Never take the delta of this timestamp with the timestamp from a different structure since they are not guaranteed to have the same base. The absolute value of the timestamp is only valid during within the application and may be different on the next execution.
|
|
|
|
}
|
|
|
|
// ZesOcMode (zes_oc_mode_t) Overclocking modes
|
|
// /
|
|
// / @details
|
|
// / - [DEPRECATED] No longer supported.
|
|
type ZesOcMode uintptr
|
|
|
|
const (
|
|
ZES_OC_MODE_OFF ZesOcMode = 0 // ZES_OC_MODE_OFF Overclocking if off - hardware is running using factory default
|
|
|
|
///< voltages/frequencies.
|
|
|
|
ZES_OC_MODE_OVERRIDE ZesOcMode = 1 // ZES_OC_MODE_OVERRIDE Overclock override mode - In this mode, a fixed user-supplied voltage
|
|
|
|
///< is applied independent of the frequency request. The maximum permitted
|
|
///< frequency can also be increased. This mode disables INTERPOLATIVE and
|
|
///< FIXED modes.
|
|
|
|
ZES_OC_MODE_INTERPOLATIVE ZesOcMode = 2 // ZES_OC_MODE_INTERPOLATIVE Overclock interpolative mode - In this mode, the voltage/frequency
|
|
|
|
///< curve can be extended with a new voltage/frequency point that will be
|
|
///< interpolated. The existing voltage/frequency points can also be offset
|
|
///< (up or down) by a fixed voltage. This mode disables FIXED and OVERRIDE
|
|
///< modes.
|
|
|
|
ZES_OC_MODE_FIXED ZesOcMode = 3 // ZES_OC_MODE_FIXED Overclocking fixed Mode - In this mode, hardware will disable most
|
|
|
|
///< frequency throttling and lock the frequency and voltage at the
|
|
///< specified overclock values. This mode disables OVERRIDE and
|
|
///< INTERPOLATIVE modes. This mode can damage the part, most of the
|
|
///< protections are disabled on this mode.
|
|
|
|
ZES_OC_MODE_FORCE_UINT32 ZesOcMode = 0x7fffffff // ZES_OC_MODE_FORCE_UINT32 Value marking end of ZES_OC_MODE_* ENUMs
|
|
|
|
)
|
|
|
|
// ZesOcCapabilities (zes_oc_capabilities_t) Overclocking properties
|
|
// /
|
|
// / @details
|
|
// / - Provides all the overclocking capabilities and properties supported by
|
|
// / the device for the frequency domain.
|
|
// / - [DEPRECATED] No longer supported.
|
|
type ZesOcCapabilities struct {
|
|
Stype ZesStructureType // Stype [in] type of this structure
|
|
Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
|
|
Isocsupported ZeBool // Isocsupported [out] Indicates if any overclocking features are supported on this frequency domain.
|
|
Maxfactorydefaultfrequency float64 // Maxfactorydefaultfrequency [out] Factory default non-overclock maximum frequency in Mhz.
|
|
Maxfactorydefaultvoltage float64 // Maxfactorydefaultvoltage [out] Factory default voltage used for the non-overclock maximum frequency in MHz.
|
|
Maxocfrequency float64 // Maxocfrequency [out] Maximum hardware overclocking frequency limit in Mhz.
|
|
Minocvoltageoffset float64 // Minocvoltageoffset [out] The minimum voltage offset that can be applied to the voltage/frequency curve. Note that this number can be negative.
|
|
Maxocvoltageoffset float64 // Maxocvoltageoffset [out] The maximum voltage offset that can be applied to the voltage/frequency curve.
|
|
Maxocvoltage float64 // Maxocvoltage [out] The maximum overclock voltage that hardware supports.
|
|
Istjmaxsupported ZeBool // Istjmaxsupported [out] Indicates if the maximum temperature limit (TjMax) can be changed for this frequency domain.
|
|
Isiccmaxsupported ZeBool // Isiccmaxsupported [out] Indicates if the maximum current (IccMax) can be changed for this frequency domain.
|
|
Ishighvoltmodecapable ZeBool // Ishighvoltmodecapable [out] Indicates if this frequency domains supports a feature to set very high voltages.
|
|
Ishighvoltmodeenabled ZeBool // Ishighvoltmodeenabled [out] Indicates if very high voltages are permitted on this frequency domain.
|
|
Isextendedmodesupported ZeBool // Isextendedmodesupported [out] Indicates if the extended overclocking features are supported. If this is supported, increments are on 1 Mhz basis.
|
|
Isfixedmodesupported ZeBool // Isfixedmodesupported [out] Indicates if the fixed mode is supported. In this mode, hardware will disable most frequency throttling and lock the frequency and voltage at the specified overclock values.
|
|
|
|
}
|
|
|
|
// ZesDeviceEnumFrequencyDomains Get handle of frequency domains
|
|
// /
|
|
// / @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 ZesDeviceEnumFrequencyDomains(
|
|
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.
|
|
phFrequency *ZesFreqHandle, // phFrequency [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]("zesDeviceEnumFrequencyDomains", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phFrequency)))
|
|
}
|
|
|
|
// ZesFrequencyGetProperties Get frequency properties - available frequencies
|
|
// /
|
|
// / @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 == hFrequency`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == pProperties`
|
|
func ZesFrequencyGetProperties(
|
|
hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component.
|
|
pProperties *ZesFreqProperties, // pProperties [in,out] The frequency properties for the specified domain.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zesFrequencyGetProperties", uintptr(hFrequency), uintptr(unsafe.Pointer(pProperties)))
|
|
}
|
|
|
|
// ZesFrequencyGetAvailableClocks Get available non-overclocked hardware clock frequencies for the
|
|
// / frequency domain
|
|
// /
|
|
// / @details
|
|
// / - The list of available frequencies is returned in order of slowest to
|
|
// / fastest.
|
|
// / - 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 == hFrequency`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == pCount`
|
|
func ZesFrequencyGetAvailableClocks(
|
|
hFrequency ZesFreqHandle, // hFrequency [in] Sysman handle of the device.
|
|
pCount *uint32, // pCount [in,out] pointer to the number of frequencies. if count is zero, then the driver shall update the value with the total number of frequencies that are available. if count is greater than the number of frequencies that are available, then the driver shall update the value with the correct number of frequencies.
|
|
phFrequency *float64, // phFrequency [in,out][optional][range(0, *pCount)] array of frequencies in units of MHz and sorted from slowest to fastest. if count is less than the number of frequencies that are available, then the driver shall only retrieve that number of frequencies.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zesFrequencyGetAvailableClocks", uintptr(hFrequency), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phFrequency)))
|
|
}
|
|
|
|
// ZesFrequencyGetRange Get current frequency limits
|
|
// /
|
|
// / @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 == hFrequency`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == pLimits`
|
|
func ZesFrequencyGetRange(
|
|
hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component.
|
|
pLimits *ZesFreqRange, // pLimits [in,out] The range between which the hardware can operate for the specified domain.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zesFrequencyGetRange", uintptr(hFrequency), uintptr(unsafe.Pointer(pLimits)))
|
|
}
|
|
|
|
// ZesFrequencySetRange Set frequency range between which the hardware can operate.
|
|
// /
|
|
// / @details
|
|
// / - The application may call this function with the frequency range min
|
|
// / and max values set to `-1` to request the frequency be (re)set to the
|
|
// / default values.
|
|
// / - 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 == hFrequency`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == pLimits`
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / + User does not have permissions to make these modifications.
|
|
func ZesFrequencySetRange(
|
|
hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component.
|
|
pLimits *ZesFreqRange, // pLimits [in] The limits between which the hardware can operate for the specified domain.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zesFrequencySetRange", uintptr(hFrequency), uintptr(unsafe.Pointer(pLimits)))
|
|
}
|
|
|
|
// ZesFrequencyGetState Get current frequency state - frequency request, actual frequency, TDP
|
|
// / limits
|
|
// /
|
|
// / @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 == hFrequency`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == pState`
|
|
func ZesFrequencyGetState(
|
|
hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component.
|
|
pState *ZesFreqState, // pState [in,out] Frequency state for the specified domain.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zesFrequencyGetState", uintptr(hFrequency), uintptr(unsafe.Pointer(pState)))
|
|
}
|
|
|
|
// ZesFrequencyGetThrottleTime Get frequency throttle time
|
|
// /
|
|
// / @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 == hFrequency`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == pThrottleTime`
|
|
func ZesFrequencyGetThrottleTime(
|
|
hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component.
|
|
pThrottleTime *ZesFreqThrottleTime, // pThrottleTime [in,out] Will contain a snapshot of the throttle time counters for the specified domain.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zesFrequencyGetThrottleTime", uintptr(hFrequency), uintptr(unsafe.Pointer(pThrottleTime)))
|
|
}
|
|
|
|
// ZesFrequencyOcGetCapabilities Get the overclocking capabilities.
|
|
// /
|
|
// / @details
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// / - [DEPRECATED] No longer supported.
|
|
// /
|
|
// / @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 == hFrequency`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == pOcCapabilities`
|
|
func ZesFrequencyOcGetCapabilities(
|
|
hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component.
|
|
pOcCapabilities *ZesOcCapabilities, // pOcCapabilities [in,out] Pointer to the capabilities structure.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zesFrequencyOcGetCapabilities", uintptr(hFrequency), uintptr(unsafe.Pointer(pOcCapabilities)))
|
|
}
|
|
|
|
// ZesFrequencyOcGetFrequencyTarget Get the current overclocking frequency target, if extended moded is
|
|
// / supported, will returned in 1 Mhz granularity.
|
|
// /
|
|
// / @details
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// / - [DEPRECATED] No longer supported.
|
|
// /
|
|
// / @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_DEPENDENCY_UNAVAILABLE
|
|
// / - ::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 == hFrequency`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == pCurrentOcFrequency`
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t).
|
|
// / + The specified voltage and/or frequency overclock settings exceed the hardware values (see the `maxOcFrequency`, `maxOcVoltage`, `minOcVoltageOffset` and `maxOcVoltageOffset` members of ::zes_oc_capabilities_t).
|
|
// / + Requested voltage overclock is very high but the `isHighVoltModeEnabled` member of ::zes_oc_capabilities_t is not enabled for the device.
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / + Overclocking feature is locked on this frequency domain.
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / + User does not have permissions to make these modifications.
|
|
func ZesFrequencyOcGetFrequencyTarget(
|
|
hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component.
|
|
pCurrentOcFrequency *float64, // pCurrentOcFrequency [out] Overclocking Frequency in MHz, if extended moded is supported, will returned in 1 Mhz granularity, else, in multiples of 50 Mhz. This cannot be greater than the `maxOcFrequency` member of ::zes_oc_capabilities_t.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zesFrequencyOcGetFrequencyTarget", uintptr(hFrequency), uintptr(unsafe.Pointer(pCurrentOcFrequency)))
|
|
}
|
|
|
|
// ZesFrequencyOcSetFrequencyTarget Set the current overclocking frequency target, if extended moded is
|
|
// / supported, can be set in 1 Mhz granularity.
|
|
// /
|
|
// / @details
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// / - [DEPRECATED] No longer supported.
|
|
// /
|
|
// / @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_DEPENDENCY_UNAVAILABLE
|
|
// / - ::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 == hFrequency`
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t).
|
|
// / + The specified voltage and/or frequency overclock settings exceed the hardware values (see the `maxOcFrequency`, `maxOcVoltage`, `minOcVoltageOffset` and `maxOcVoltageOffset` members of ::zes_oc_capabilities_t).
|
|
// / + Requested voltage overclock is very high but the `isHighVoltModeEnabled` member of ::zes_oc_capabilities_t is not enabled for the device.
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / + Overclocking feature is locked on this frequency domain.
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / + User does not have permissions to make these modifications.
|
|
func ZesFrequencyOcSetFrequencyTarget(
|
|
hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component.
|
|
CurrentOcFrequency float64, // CurrentOcFrequency [in] Overclocking Frequency in MHz, if extended moded is supported, it could be set in 1 Mhz granularity, else, in multiples of 50 Mhz. This cannot be greater than the `maxOcFrequency` member of ::zes_oc_capabilities_t.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zesFrequencyOcSetFrequencyTarget", uintptr(hFrequency), uintptr(CurrentOcFrequency))
|
|
}
|
|
|
|
// ZesFrequencyOcGetVoltageTarget Get the current overclocking voltage settings.
|
|
// /
|
|
// / @details
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// / - [DEPRECATED] No longer supported.
|
|
// /
|
|
// / @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_DEPENDENCY_UNAVAILABLE
|
|
// / - ::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 == hFrequency`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == pCurrentVoltageTarget`
|
|
// / + `nullptr == pCurrentVoltageOffset`
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t).
|
|
// / + The specified voltage and/or frequency overclock settings exceed the hardware values (see the `maxOcFrequency`, `maxOcVoltage`, `minOcVoltageOffset` and `maxOcVoltageOffset` members of ::zes_oc_capabilities_t).
|
|
// / + Requested voltage overclock is very high but the `isHighVoltModeEnabled` member of ::zes_oc_capabilities_t is not enabled for the device.
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / + Overclocking feature is locked on this frequency domain.
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / + User does not have permissions to make these modifications.
|
|
func ZesFrequencyOcGetVoltageTarget(
|
|
hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component.
|
|
pCurrentVoltageTarget *float64, // pCurrentVoltageTarget [out] Overclock voltage in Volts. This cannot be greater than the `maxOcVoltage` member of ::zes_oc_capabilities_t.
|
|
pCurrentVoltageOffset *float64, // pCurrentVoltageOffset [out] This voltage offset is applied to all points on the voltage/frequency curve, including the new overclock voltageTarget. Valid range is between the `minOcVoltageOffset` and `maxOcVoltageOffset` members of ::zes_oc_capabilities_t.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zesFrequencyOcGetVoltageTarget", uintptr(hFrequency), uintptr(unsafe.Pointer(pCurrentVoltageTarget)), uintptr(unsafe.Pointer(pCurrentVoltageOffset)))
|
|
}
|
|
|
|
// ZesFrequencyOcSetVoltageTarget Set the current overclocking voltage settings.
|
|
// /
|
|
// / @details
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// / - [DEPRECATED] No longer supported.
|
|
// /
|
|
// / @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_DEPENDENCY_UNAVAILABLE
|
|
// / - ::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 == hFrequency`
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t).
|
|
// / + The specified voltage and/or frequency overclock settings exceed the hardware values (see the `maxOcFrequency`, `maxOcVoltage`, `minOcVoltageOffset` and `maxOcVoltageOffset` members of ::zes_oc_capabilities_t).
|
|
// / + Requested voltage overclock is very high but the `isHighVoltModeEnabled` member of ::zes_oc_capabilities_t is not enabled for the device.
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / + Overclocking feature is locked on this frequency domain.
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / + User does not have permissions to make these modifications.
|
|
func ZesFrequencyOcSetVoltageTarget(
|
|
hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component.
|
|
CurrentVoltageTarget float64, // CurrentVoltageTarget [in] Overclock voltage in Volts. This cannot be greater than the `maxOcVoltage` member of ::zes_oc_capabilities_t.
|
|
CurrentVoltageOffset float64, // CurrentVoltageOffset [in] This voltage offset is applied to all points on the voltage/frequency curve, include the new overclock voltageTarget. Valid range is between the `minOcVoltageOffset` and `maxOcVoltageOffset` members of ::zes_oc_capabilities_t.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zesFrequencyOcSetVoltageTarget", uintptr(hFrequency), uintptr(CurrentVoltageTarget), uintptr(CurrentVoltageOffset))
|
|
}
|
|
|
|
// ZesFrequencyOcSetMode Set the current overclocking mode.
|
|
// /
|
|
// / @details
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// / - [DEPRECATED] No longer supported.
|
|
// /
|
|
// / @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_DEPENDENCY_UNAVAILABLE
|
|
// / - ::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 == hFrequency`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
|
|
// / + `::ZES_OC_MODE_FIXED < CurrentOcMode`
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t).
|
|
// / + The specified voltage and/or frequency overclock settings exceed the hardware values (see the `maxOcFrequency`, `maxOcVoltage`, `minOcVoltageOffset` and `maxOcVoltageOffset` members of ::zes_oc_capabilities_t).
|
|
// / + Requested voltage overclock is very high but the `isHighVoltModeEnabled` member of ::zes_oc_capabilities_t is not enabled for the device.
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / + Overclocking feature is locked on this frequency domain.
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / + User does not have permissions to make these modifications.
|
|
func ZesFrequencyOcSetMode(
|
|
hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component.
|
|
CurrentOcMode ZesOcMode, // CurrentOcMode [in] Current Overclocking Mode ::zes_oc_mode_t.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zesFrequencyOcSetMode", uintptr(hFrequency), uintptr(CurrentOcMode))
|
|
}
|
|
|
|
// ZesFrequencyOcGetMode Get the current overclocking mode.
|
|
// /
|
|
// / @details
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// / - [DEPRECATED] No longer supported.
|
|
// /
|
|
// / @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_DEPENDENCY_UNAVAILABLE
|
|
// / - ::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 == hFrequency`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == pCurrentOcMode`
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t).
|
|
// / + The specified voltage and/or frequency overclock settings exceed the hardware values (see the `maxOcFrequency`, `maxOcVoltage`, `minOcVoltageOffset` and `maxOcVoltageOffset` members of ::zes_oc_capabilities_t).
|
|
// / + Requested voltage overclock is very high but the `isHighVoltModeEnabled` member of ::zes_oc_capabilities_t is not enabled for the device.
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / + Overclocking feature is locked on this frequency domain.
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / + User does not have permissions to make these modifications.
|
|
func ZesFrequencyOcGetMode(
|
|
hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component.
|
|
pCurrentOcMode *ZesOcMode, // pCurrentOcMode [out] Current Overclocking Mode ::zes_oc_mode_t.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zesFrequencyOcGetMode", uintptr(hFrequency), uintptr(unsafe.Pointer(pCurrentOcMode)))
|
|
}
|
|
|
|
// ZesFrequencyOcGetIccMax Get the maximum current limit setting.
|
|
// /
|
|
// / @details
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// / - [DEPRECATED] No longer supported.
|
|
// /
|
|
// / @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_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 == hFrequency`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == pOcIccMax`
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t).
|
|
// / + Capability the `isIccMaxSupported` member of ::zes_oc_capabilities_t is false for this frequency domain.
|
|
func ZesFrequencyOcGetIccMax(
|
|
hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component.
|
|
pOcIccMax *float64, // pOcIccMax [in,out] Will contain the maximum current limit in Amperes on successful return.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zesFrequencyOcGetIccMax", uintptr(hFrequency), uintptr(unsafe.Pointer(pOcIccMax)))
|
|
}
|
|
|
|
// ZesFrequencyOcSetIccMax Change the maximum current limit setting.
|
|
// /
|
|
// / @details
|
|
// / - Setting ocIccMax to 0.0 will return the value to the factory default.
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// / - [DEPRECATED] No longer supported.
|
|
// /
|
|
// / @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_DEPENDENCY_UNAVAILABLE
|
|
// / - ::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 == hFrequency`
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t).
|
|
// / + The `isIccMaxSupported` member of ::zes_oc_capabilities_t is false for this frequency domain.
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / + Overclocking feature is locked on this frequency domain.
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / + The specified current limit is too low or too high.
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / + User does not have permissions to make these modifications.
|
|
func ZesFrequencyOcSetIccMax(
|
|
hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component.
|
|
ocIccMax float64, // ocIccMax [in] The new maximum current limit in Amperes.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zesFrequencyOcSetIccMax", uintptr(hFrequency), uintptr(ocIccMax))
|
|
}
|
|
|
|
// ZesFrequencyOcGetTjMax Get the maximum temperature limit setting.
|
|
// /
|
|
// / @details
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// / - [DEPRECATED] No longer supported.
|
|
// /
|
|
// / @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_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 == hFrequency`
|
|
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
|
// / + `nullptr == pOcTjMax`
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t).
|
|
func ZesFrequencyOcGetTjMax(
|
|
hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component.
|
|
pOcTjMax *float64, // pOcTjMax [in,out] Will contain the maximum temperature limit in degrees Celsius on successful return.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zesFrequencyOcGetTjMax", uintptr(hFrequency), uintptr(unsafe.Pointer(pOcTjMax)))
|
|
}
|
|
|
|
// ZesFrequencyOcSetTjMax Change the maximum temperature limit setting.
|
|
// /
|
|
// / @details
|
|
// / - Setting ocTjMax to 0.0 will return the value to the factory default.
|
|
// / - The application may call this function from simultaneous threads.
|
|
// / - The implementation of this function should be lock-free.
|
|
// / - [DEPRECATED] No longer supported.
|
|
// /
|
|
// / @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_DEPENDENCY_UNAVAILABLE
|
|
// / - ::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 == hFrequency`
|
|
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
|
// / + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t).
|
|
// / + The `isTjMaxSupported` member of ::zes_oc_capabilities_t is false for this frequency domain.
|
|
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
|
|
// / + Overclocking feature is locked on this frequency domain.
|
|
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
|
|
// / + The specified temperature limit is too high.
|
|
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
|
|
// / + User does not have permissions to make these modifications.
|
|
func ZesFrequencyOcSetTjMax(
|
|
hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component.
|
|
ocTjMax float64, // ocTjMax [in] The new maximum temperature limit in degrees Celsius.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zesFrequencyOcSetTjMax", uintptr(hFrequency), uintptr(ocTjMax))
|
|
}
|