The Memory Partition Functions#
Functions | |
rsmi_status_t | rsmi_dev_memory_partition_get (uint32_t dv_ind, char *memory_partition, uint32_t len) |
Retrieves the current memory partition for a desired device. More... | |
rsmi_status_t | rsmi_dev_memory_partition_set (uint32_t dv_ind, rsmi_memory_partition_type_t memory_partition) |
Modifies a selected device's current memory partition setting. More... | |
rsmi_status_t | rsmi_dev_memory_partition_reset (uint32_t dv_ind) |
Reverts a selected device's memory partition setting back to its boot state. More... | |
Detailed Description
These functions are used to query and set the device's current memory partition.
Function Documentation
◆ rsmi_dev_memory_partition_get()
rsmi_status_t rsmi_dev_memory_partition_get | ( | uint32_t | dv_ind, |
char * | memory_partition, | ||
uint32_t | len | ||
) |
Retrieves the current memory partition for a desired device.
Given a device index dv_ind
and a string memory_partition
, and uint32 len
, this function will attempt to obtain the device's memory partition string. Upon successful retreival, the obtained device's memory partition string shall be stored in the passed memory_partition
char string variable.
- Parameters
-
[in] dv_ind a device index [in,out] memory_partition a pointer to a char string variable, which the device's memory partition will be written to. [in] len the length of the caller provided buffer memory_partition
, suggested length is 5 or greater.
- Return values
-
RSMI_STATUS_SUCCESS call was successful RSMI_STATUS_INVALID_ARGS the provided arguments are not valid RSMI_STATUS_UNEXPECTED_DATA data provided to function is not valid RSMI_STATUS_NOT_SUPPORTED installed software or hardware does not support this function RSMI_STATUS_INSUFFICIENT_SIZE is returned if len
bytes is not large enough to hold the entire memory partition value. In this case, onlylen
bytes will be written.
◆ rsmi_dev_memory_partition_set()
rsmi_status_t rsmi_dev_memory_partition_set | ( | uint32_t | dv_ind, |
rsmi_memory_partition_type_t | memory_partition | ||
) |
Modifies a selected device's current memory partition setting.
Given a device index dv_ind
and a type of memory partition memory_partition
, this function will attempt to update the selected device's memory partition setting.
- Parameters
-
[in] dv_ind a device index [in] memory_partition using enum rsmi_memory_partition_type_t, define what the selected device's current mode setting should be updated to.
- Return values
-
RSMI_STATUS_SUCCESS call was successful RSMI_STATUS_PERMISSION function requires root access RSMI_STATUS_INVALID_ARGS the provided arguments are not valid RSMI_STATUS_NOT_SUPPORTED installed software or hardware does not support this function RSMI_STATUS_AMDGPU_RESTART_ERR could not successfully restart the amdgpu driver RSMI_STATUS_BUSY A resource or mutex could not be acquired because it is already being used - device is busy
◆ rsmi_dev_memory_partition_reset()
rsmi_status_t rsmi_dev_memory_partition_reset | ( | uint32_t | dv_ind | ) |
Reverts a selected device's memory partition setting back to its boot state.
Given a device index dv_ind
, this function will attempt to revert its current memory partition setting back to its boot state.
- Parameters
-
[in] dv_ind a device index
- Return values
-
RSMI_STATUS_SUCCESS call was successful RSMI_STATUS_PERMISSION function requires root access RSMI_STATUS_NOT_SUPPORTED installed software or hardware does not support this function RSMI_STATUS_AMDGPU_RESTART_ERR could not successfully restart the amdgpu driver RSMI_STATUS_BUSY A resource or mutex could not be acquired because it is already being used - device is busy