Clock, Power and Performance Control

Clock, Power and Performance Control#

AMD SMI: Clock, Power and Performance Control
Clock, Power and Performance Control

Functions

amdsmi_status_t amdsmi_set_gpu_perf_level (amdsmi_processor_handle processor_handle, amdsmi_dev_perf_level_t perf_lvl)
 Set the PowerPlay performance level associated with the device with provided processor handle with the provided value. It is not supported on virtual machine guest. More...
 
amdsmi_status_t amdsmi_set_gpu_overdrive_level (amdsmi_processor_handle processor_handle, uint32_t od)
 Set the overdrive percent associated with the device with provided processor handle with the provided value. See details for WARNING. It is not supported on virtual machine guest. More...
 
amdsmi_status_t amdsmi_set_clk_freq (amdsmi_processor_handle processor_handle, amdsmi_clk_type_t clk_type, uint64_t freq_bitmask)
 Control the set of allowed frequencies that can be used for the specified clock. It is not supported on virtual machine guest. More...
 
amdsmi_status_t amdsmi_get_dpm_policy (amdsmi_processor_handle processor_handle, amdsmi_dpm_policy_t *policy)
 Get the dpm policy for the processor. More...
 
amdsmi_status_t amdsmi_set_dpm_policy (amdsmi_processor_handle processor_handle, uint32_t policy_id)
 Set the dpm policy for the processor. More...
 

Detailed Description

These functions provide control over clock frequencies, power and performance.

Function Documentation

◆ amdsmi_set_gpu_perf_level()

amdsmi_status_t amdsmi_set_gpu_perf_level ( amdsmi_processor_handle  processor_handle,
amdsmi_dev_perf_level_t  perf_lvl 
)

Set the PowerPlay performance level associated with the device with provided processor handle with the provided value. It is not supported on virtual machine guest.

Platform:
gpu_bm_linux

Given a processor handle processor_handle and an amdsmi_dev_perf_level_t perf_level, this function will set the PowerPlay performance level for the device to the value perf_lvl.

Note
This function requires root access
Parameters
[in]processor_handlea processor handle
[in]perf_lvlthe value to which the performance level should be set
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail

◆ amdsmi_set_gpu_overdrive_level()

amdsmi_status_t amdsmi_set_gpu_overdrive_level ( amdsmi_processor_handle  processor_handle,
uint32_t  od 
)

Set the overdrive percent associated with the device with provided processor handle with the provided value. See details for WARNING. It is not supported on virtual machine guest.

Platform:
gpu_bm_linux

Given a processor handle processor_handle and an overdrive level od, this function will set the overdrive level for the device to the value od. The overdrive level is an integer value between 0 and 20, inclusive, which represents the overdrive percentage; e.g., a value of 5 specifies an overclocking of 5%.

The overdrive level is specific to the gpu system clock.

The overdrive level is the percentage above the maximum Performance Level to which overclocking will be limited. The overclocking percentage does not apply to clock speeds other than the maximum. This percentage is limited to 20%.

******WARNING****** Operating your AMD GPU outside of official AMD specifications or outside of factory settings, including but not limited to the conducting of overclocking (including use of this overclocking software, even if such software has been directly or indirectly provided by AMD or otherwise affiliated in any way with AMD), may cause damage to your AMD GPU, system components and/or result in system failure, as well as cause other problems. DAMAGES CAUSED BY USE OF YOUR AMD GPU OUTSIDE OF OFFICIAL AMD SPECIFICATIONS OR OUTSIDE OF FACTORY SETTINGS ARE NOT COVERED UNDER ANY AMD PRODUCT WARRANTY AND MAY NOT BE COVERED BY YOUR BOARD OR SYSTEM MANUFACTURER'S WARRANTY. Please use this utility with caution.

Parameters
[in]processor_handlea processor handle
[in]odthe value to which the overdrive level should be set
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail

◆ amdsmi_set_clk_freq()

amdsmi_status_t amdsmi_set_clk_freq ( amdsmi_processor_handle  processor_handle,
amdsmi_clk_type_t  clk_type,
uint64_t  freq_bitmask 
)

Control the set of allowed frequencies that can be used for the specified clock. It is not supported on virtual machine guest.

Platform:
gpu_bm_linux

Given a processor handle processor_handle, a clock type clk_type, and a 64 bit bitmask freq_bitmask, this function will limit the set of allowable frequencies. If a bit in freq_bitmask has a value of 1, then the frequency (as ordered in an amdsmi_frequencies_t returned by amdsmi_get_clk_freq()) corresponding to that bit index will be allowed.

This function will change the performance level to AMDSMI_DEV_PERF_LEVEL_MANUAL in order to modify the set of allowable frequencies. Caller will need to set to AMDSMI_DEV_PERF_LEVEL_AUTO in order to get back to default state.

All bits with indices greater than or equal to amdsmi_frequencies_t::num_supported will be ignored.

Note
This function requires root access
Parameters
[in]processor_handlea processor handle
[in]clk_typethe type of clock for which the set of frequencies will be modified
[in]freq_bitmaskA bitmask indicating the indices of the frequencies that are to be enabled (1) and disabled (0). Only the lowest amdsmi_frequencies_t.num_supported bits of this mask are relevant.
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail

◆ amdsmi_get_dpm_policy()

amdsmi_status_t amdsmi_get_dpm_policy ( amdsmi_processor_handle  processor_handle,
amdsmi_dpm_policy_t policy 
)

Get the dpm policy for the processor.

Platform:

gpu_bm_linux

guest_1vf

Given a processor handle processor_handle, this function will write current dpm policy settings to policy. All the processors at the same socket will have the same policy.

Parameters
[in]processor_handlea processor handle
[in,out]policythe dpm policy for this processor. If this parameter is nullptr, this function will return AMDSMI_STATUS_INVAL
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail

◆ amdsmi_set_dpm_policy()

amdsmi_status_t amdsmi_set_dpm_policy ( amdsmi_processor_handle  processor_handle,
uint32_t  policy_id 
)

Set the dpm policy for the processor.

Platform:

gpu_bm_linux

guest_1vf

Given a processor handle processor_handle and a dpm policy policy_id, this function will set the dpm policy for this processor. All the processors at the same socket will be set to the same policy.

Note
This function requires root access
Parameters
[in]processor_handlea processor handle
[in]policy_idthe dpm policy id to set. The id is the id in amdsmi_dpm_policy_entry_t, which can be obtained by calling amdsmi_get_dpm_policy()
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail