Power Control

Power Control#

ROCmSMI: 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_inda device index
[in]sensor_inda 0-based sensor index. Normally, this will be 0. If a device has more than one sensor, it could be greater than 0.
[in]capa uint64_t that indicates the desired power cap, in microwatts
Return values
RSMI_STATUS_SUCCESSis returned upon successful call.
RSMI_STATUS_INVALID_ARGSthe provided arguments are not valid
RSMI_STATUS_PERMISSIONfunction 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_inda device index
[in]reservedNot currently used. Set to 0.
[in]profilea rsmi_power_profile_preset_masks_t that hold the mask of the desired new power profile
Return values
RSMI_STATUS_SUCCESSis returned upon successful call.
RSMI_STATUS_PERMISSIONfunction requires root access