PCIe Control

PCIe Control#

ROCmSMI: PCIe Control
PCIe Control

Functions

rsmi_status_t rsmi_dev_pci_bandwidth_set (uint32_t dv_ind, 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

◆ rsmi_dev_pci_bandwidth_set()

rsmi_status_t rsmi_dev_pci_bandwidth_set ( uint32_t  dv_ind,
uint64_t  bw_bitmask 
)

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

Given a device index dv_ind 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 rsmi_frequencies_t returned by rsmi_dev_gpu_clk_freq_get()) corresponding to that bit index will be allowed.

This function will change the performance level to RSMI_DEV_PERF_LEVEL_MANUAL in order to modify the set of allowable band_widths. Caller will need to set to RSMI_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 rsmi_frequencies_t::num_supported field of rsmi_pcie_bandwidth_t will be ignored.

Parameters
[in]dv_inda device index
[in]bw_bitmaskA bitmask indicating the indices of the bandwidths that are to be enabled (1) and disabled (0). Only the lowest rsmi_frequencies_t::num_supported (of rsmi_pcie_bandwidth_t) bits of this mask are relevant.
Return values
RSMI_STATUS_SUCCESScall was successful
RSMI_STATUS_PERMISSIONfunction requires root access