PCIe Control

PCIe Control#

AMD SMI: PCIe Control
PCIe Control

Functions

amdsmi_status_t amdsmi_dev_set_pci_bandwidth (amdsmi_device_handle device_handle, uint64_t bw_bitmask)
 Control the set of allowed PCIe bandwidths that can be used. More...
 

Detailed Description

These functions provide some control over PCIe.

Function Documentation

◆ amdsmi_dev_set_pci_bandwidth()

amdsmi_status_t amdsmi_dev_set_pci_bandwidth ( amdsmi_device_handle  device_handle,
uint64_t  bw_bitmask 
)

Control the set of allowed PCIe bandwidths that can be used.

Given a device handle device_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_dev_get_gpu_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]device_handlea device 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