PCIe Control

PCIe Control#

AMD SMI: PCIe Control
PCIe Control

Functions

amdsmi_status_t amdsmi_set_gpu_pci_bandwidth (amdsmi_processor_handle processor_handle, uint64_t bw_bitmask)
 Control the set of allowed PCIe bandwidths that can be used. It is not supported on virtual machine guest. More...
 

Detailed Description

These functions provide some control over PCIe.

Function Documentation

◆ amdsmi_set_gpu_pci_bandwidth()

amdsmi_status_t amdsmi_set_gpu_pci_bandwidth ( amdsmi_processor_handle  processor_handle,
uint64_t  bw_bitmask 
)

Control the set of allowed PCIe bandwidths that can be used. It is not supported on virtual machine guest.

Given a processor handle processor_handle and a 64 bit bitmask bw_bitmask, this function will limit the set of allowable bandwidths. If a bit in bw_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 band_widths. 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 the value of the amdsmi_frequencies_t::num_supported field of amdsmi_pcie_bandwidth_t will be ignored.

Note
This function requires root access
Parameters
[in]processor_handlea processor handle
[in]bw_bitmaskA bitmask indicating the indices of the bandwidths that are to be enabled (1) and disabled (0). Only the lowest amdsmi_frequencies_t::num_supported (of amdsmi_pcie_bandwidth_t) bits of this mask are relevant.
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail