NPS Mode Functions

NPS Mode Functions#

ROCmSMI: NPS Mode Functions
NPS Mode Functions

Functions

rsmi_status_t rsmi_dev_nps_mode_get (uint32_t dv_ind, char *nps_mode, uint32_t len)
 Retrieves the NPS mode (memory partition) for a desired device. More...
 
rsmi_status_t rsmi_dev_nps_mode_set (uint32_t dv_ind, rsmi_nps_mode_type_t nps_mode)
 Modifies a selected device's NPS mode (memory partition) setting. More...
 
rsmi_status_t rsmi_dev_nps_mode_reset (uint32_t dv_ind)
 Reverts a selected device's NPS mode setting back to its boot state. More...
 

Detailed Description

These functions are used to query the device's NPS mode (memory partition).

Function Documentation

◆ rsmi_dev_nps_mode_get()

rsmi_status_t rsmi_dev_nps_mode_get ( uint32_t  dv_ind,
char *  nps_mode,
uint32_t  len 
)

Retrieves the NPS mode (memory partition) for a desired device.

Given a device index dv_ind and a string nps_mode , and uint32 len , this function will attempt to obtain the device's nps mode string. Upon successful retreival, the obtained device's nps mode string shall be stored in the passed nps_mode char string variable.

Parameters
[in]dv_inda device index
[in,out]nps_modea pointer to a char string variable, which the device's nps mode will be written to.
[in]lenthe length of the caller provided buffer nps_mode , suggested length is 5 or greater.
Return values
RSMI_STATUS_SUCCESScall was successful
RSMI_STATUS_INVALID_ARGSthe provided arguments are not valid
RSMI_STATUS_UNEXPECTED_DATAdata provided to function is not valid
RSMI_STATUS_NOT_SUPPORTEDinstalled software or hardware does not support this function
RSMI_STATUS_INSUFFICIENT_SIZEis returned if len bytes is not large enough to hold the entire nps mode value. In this case, only len bytes will be written.

◆ rsmi_dev_nps_mode_set()

rsmi_status_t rsmi_dev_nps_mode_set ( uint32_t  dv_ind,
rsmi_nps_mode_type_t  nps_mode 
)

Modifies a selected device's NPS mode (memory partition) setting.

Given a device index dv_ind and a type of nps mode nps_mode, this function will attempt to update the selected device's nps mode setting.

Parameters
[in]dv_inda device index
[in]nps_modeusing enum rsmi_nps_mode_type_t, define what the selected device's NPS mode setting should be updated to.
Return values
RSMI_STATUS_SUCCESScall was successful
RSMI_STATUS_PERMISSIONfunction requires root access
RSMI_STATUS_INVALID_ARGSthe provided arguments are not valid
RSMI_STATUS_NOT_SUPPORTEDinstalled software or hardware does not support this function
RSMI_STATUS_AMDGPU_RESTART_ERRcould not successfully restart the amdgpu driver

◆ rsmi_dev_nps_mode_reset()

rsmi_status_t rsmi_dev_nps_mode_reset ( uint32_t  dv_ind)

Reverts a selected device's NPS mode setting back to its boot state.

Given a device index dv_ind , this function will attempt to revert its NPS mode setting back to its boot state.

Parameters
[in]dv_inda device index
Return values
RSMI_STATUS_SUCCESScall was successful
RSMI_STATUS_PERMISSIONfunction requires root access
RSMI_STATUS_NOT_SUPPORTEDinstalled software or hardware does not support this function
RSMI_STATUS_AMDGPU_RESTART_ERRcould not successfully restart the amdgpu driver