Power Control#
Power Control
Functions | |
rsmi_status_t | rsmi_dev_power_cap_set (uint32_t dv_ind, uint32_t sensor_ind, uint64_t cap) |
Set the power cap value. More... | |
rsmi_status_t | rsmi_dev_power_profile_set (uint32_t dv_ind, uint32_t reserved, rsmi_power_profile_preset_masks_t profile) |
Set the power profile. More... | |
Detailed Description
These functions provide ways to control power usage.
Function Documentation
◆ rsmi_dev_power_cap_set()
rsmi_status_t rsmi_dev_power_cap_set | ( | uint32_t | dv_ind, |
uint32_t | sensor_ind, | ||
uint64_t | cap | ||
) |
Set the power cap value.
This function will set the power cap to the provided value cap
. cap
must be between the minimum and maximum power cap values set by the system, which can be obtained from rsmi_dev_power_cap_range_get.
- Parameters
-
[in] dv_ind a device index [in] sensor_ind a 0-based sensor index. Normally, this will be 0. If a device has more than one sensor, it could be greater than 0. [in] cap a uint64_t that indicates the desired power cap, in microwatts
- Return values
-
RSMI_STATUS_SUCCESS is returned upon successful call. RSMI_STATUS_INVALID_ARGS the provided arguments are not valid RSMI_STATUS_PERMISSION function requires root access
◆ rsmi_dev_power_profile_set()
rsmi_status_t rsmi_dev_power_profile_set | ( | uint32_t | dv_ind, |
uint32_t | reserved, | ||
rsmi_power_profile_preset_masks_t | profile | ||
) |
Set the power profile.
Given a device index dv_ind
and a profile
, this function will attempt to set the current profile to the provided profile. The provided profile must be one of the currently supported profiles, as indicated by a call to rsmi_dev_power_profile_presets_get()
- Parameters
-
[in] dv_ind a device index [in] reserved Not currently used. Set to 0. [in] profile a rsmi_power_profile_preset_masks_t that hold the mask of the desired new power profile
- Return values
-
RSMI_STATUS_SUCCESS is returned upon successful call. RSMI_STATUS_PERMISSION function requires root access