Add rsmi_dev_target_graphics_version_get
Updates:
- [API] rsmi_dev_target_graphics_version_get, takes
reported value from KFD -> parses into human-readable
values. If device does not support, returns MAX UINT64
value and RSMI_STATUS_NOT_SUPPORTED.
Otherwise, puts into base10 format removing
extra 0's + putting in correct format. If user
provides nullptr, returning RSMI_STATUS_INVALID_ARGS.
- [Test/Example] sys_info_read updated to include
new rsmi_dev_target_graphics_version_get tests
Change-Id: I50f94e06b8733a5dec2eb08f284b44927f36abcd
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
This commit is contained in:
@@ -3169,6 +3169,29 @@ rsmi_status_t
|
||||
rsmi_dev_firmware_version_get(uint32_t dv_ind, rsmi_fw_block_t block,
|
||||
uint64_t *fw_version);
|
||||
|
||||
/**
|
||||
* @brief Get the graphics version for a GPU device
|
||||
*
|
||||
* @details Given a device ID @p dv_ind and a uint64_t pointer
|
||||
* @p gfx_version, this function will write the graphics version.
|
||||
*
|
||||
* @param[in] dv_ind a device index
|
||||
*
|
||||
* @param[inout] gfx_version The 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
|
||||
* @p gfx_version.
|
||||
*
|
||||
* @retval ::RSMI_STATUS_SUCCESS call was successful
|
||||
* @retval ::RSMI_STATUS_NOT_SUPPORTED installed software or hardware does not
|
||||
* support this function with the given arguments
|
||||
* @retval ::RSMI_STATUS_INVALID_ARGS the provided arguments are not valid
|
||||
*
|
||||
*/
|
||||
rsmi_status_t rsmi_dev_target_graphics_version_get(uint32_t dv_ind,
|
||||
uint64_t *gfx_version);
|
||||
|
||||
/** @} */ // end of VersQuer
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
@@ -123,6 +123,8 @@ std::string print_rsmi_od_volt_freq_regions(uint32_t num_regions,
|
||||
bool is_sudo_user();
|
||||
rsmi_status_t rsmi_get_gfx_target_version(uint32_t dv_ind,
|
||||
std::string *gfx_version);
|
||||
std::string removeString(const std::string origStr,
|
||||
const std::string &removeMe);
|
||||
template <typename T>
|
||||
std::string print_int_as_hex(T i, bool showHexNotation = true) {
|
||||
std::stringstream ss;
|
||||
|
||||
Reference in New Issue
Block a user