Version Queries

Version Queries#

ROCmSMI: Version Queries
Version Queries

Functions

rsmi_status_t rsmi_version_get (rsmi_version_t *version)
 Get the build version information for the currently running build of RSMI. More...
 
rsmi_status_t rsmi_version_str_get (rsmi_sw_component_t component, char *ver_str, uint32_t len)
 Get the driver version string for the current system. More...
 
rsmi_status_t rsmi_dev_vbios_version_get (uint32_t dv_ind, char *vbios, uint32_t len)
 Get the VBIOS identifer string. More...
 
rsmi_status_t rsmi_dev_firmware_version_get (uint32_t dv_ind, rsmi_fw_block_t block, uint64_t *fw_version)
 Get the firmware versions for a device. More...
 
rsmi_status_t rsmi_dev_target_graphics_version_get (uint32_t dv_ind, uint64_t *gfx_version)
 Get the target graphics version for a GPU device. More...
 

Detailed Description

These functions provide version information about various subsystems.

Function Documentation

◆ rsmi_version_get()

rsmi_status_t rsmi_version_get ( rsmi_version_t version)

Get the build version information for the currently running build of RSMI.

Get the major, minor, patch and build string for RSMI build currently in use through version

Parameters
[in,out]versionA pointer to an rsmi_version_t structure that will be updated with the version information upon return.
Return values
RSMI_STATUS_SUCCESSis returned upon successful call

◆ rsmi_version_str_get()

rsmi_status_t rsmi_version_str_get ( rsmi_sw_component_t  component,
char *  ver_str,
uint32_t  len 
)

Get the driver version string for the current system.

Given a software component component, a pointer to a char buffer, ver_str, this function will write the driver version string (up to len characters) for the current system to ver_str. The caller must ensure that it is safe to write at least len characters to ver_str.

Parameters
[in]componentThe component for which the version string is being requested
[in,out]ver_strA pointer to a buffer of char's to which the version of component will be written
[in]lenthe length of the caller provided buffer name.
Return values
RSMI_STATUS_SUCCESScall was successful
RSMI_STATUS_NOT_SUPPORTEDinstalled software or hardware does not support this function with the given arguments
RSMI_STATUS_INVALID_ARGSthe provided arguments are not valid
RSMI_STATUS_INSUFFICIENT_SIZEis returned if len bytes is not large enough to hold the entire name. In this case, only len bytes will be written.

◆ rsmi_dev_vbios_version_get()

rsmi_status_t rsmi_dev_vbios_version_get ( uint32_t  dv_ind,
char *  vbios,
uint32_t  len 
)

Get the VBIOS identifer string.

Given a device ID dv_ind, and a pointer to a char buffer, vbios, this function will write the VBIOS string (up to len characters) for device dv_ind to vbios. The caller must ensure that it is safe to write at least len characters to vbios.

Parameters
[in]dv_inda device index
[in,out]vbiosA pointer to a buffer of char's to which the VBIOS name will be written If this parameter is nullptr, this function will return RSMI_STATUS_INVALID_ARGS if the function is supported with the provided, arguments and RSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.
[in]lenThe number of char's pointed to by vbios which can safely be written to by this function.
Return values
RSMI_STATUS_SUCCESScall was successful
RSMI_STATUS_NOT_SUPPORTEDinstalled software or hardware does not support this function with the given arguments
RSMI_STATUS_INVALID_ARGSthe provided arguments are not valid

◆ rsmi_dev_firmware_version_get()

rsmi_status_t rsmi_dev_firmware_version_get ( uint32_t  dv_ind,
rsmi_fw_block_t  block,
uint64_t *  fw_version 
)

Get the firmware versions for a device.

Given a device ID dv_ind, and a pointer to a uint64_t, fw_version, this function will write the FW Versions as a string (up to len characters) for device dv_ind to vbios. The caller must ensure that it is safe to write at least len characters to vbios.

Parameters
[in]dv_inda device index
[in]blockThe firmware block for which the version is being requested
[in,out]fw_versionThe version for the firmware block If this parameter is nullptr, this function will return RSMI_STATUS_INVALID_ARGS if the function is supported with the provided, arguments and RSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.
Return values
RSMI_STATUS_SUCCESScall was successful
RSMI_STATUS_NOT_SUPPORTEDinstalled software or hardware does not support this function with the given arguments
RSMI_STATUS_INVALID_ARGSthe provided arguments are not valid

◆ rsmi_dev_target_graphics_version_get()

rsmi_status_t rsmi_dev_target_graphics_version_get ( uint32_t  dv_ind,
uint64_t *  gfx_version 
)

Get the target graphics version for a GPU device.

Given a device ID dv_ind and a uint64_t pointer gfx_version, this function will write the graphics version.

Parameters
[in]dv_inda device index
[in,out]gfx_versionThe device graphics version number indicated by KFD. If this parameter is nullptr, this function will return RSMI_STATUS_INVALID_ARGS. If device does not support this value, will return RSMI_STATUS_NOT_SUPPORTED and a maximum UINT64 value as gfx_version.
Return values
RSMI_STATUS_SUCCESScall was successful
RSMI_STATUS_NOT_SUPPORTEDinstalled software or hardware does not support this function with the given arguments
RSMI_STATUS_INVALID_ARGSthe provided arguments are not valid