Add VBIOS version get function
Also, consolidate "get version" type function tests into 1 test.
[ROCm/amdsmi commit: 021f13a68f]
Šī revīzija ir iekļauta:
@@ -993,6 +993,29 @@ rsmi_dev_power_profile_presets_get(uint32_t dv_ind, uint32_t sensor_ind,
|
||||
rsmi_status_t
|
||||
rsmi_dev_power_profile_set(uint32_t dv_ind, uint32_t sensor_ind,
|
||||
rsmi_power_profile_preset_masks profile);
|
||||
|
||||
/**
|
||||
* @brief Get the VBIOS identifer string
|
||||
*
|
||||
* @details Given a device ID @p dv_ind, and a pointer to a char buffer,
|
||||
* @p vbios, this function will write the VBIOS string (up to @p len
|
||||
* characters) for device @p dv_ind to @p vbios. The caller must ensure that
|
||||
* it is safe to write at least @p len characters to @p vbios.
|
||||
*
|
||||
* @param[in] dv_ind a device index
|
||||
*
|
||||
* @param[inout] vbios A pointer to a buffer of char's to which the VBIOS name
|
||||
* will be written
|
||||
*
|
||||
* @param[in] len The number of char's pointed to by @p vbios which can safely
|
||||
* be written to by this function.
|
||||
*
|
||||
* @retval ::RSMI_STATUS_SUCCESS is returned upon successful call.
|
||||
*
|
||||
*/
|
||||
rsmi_status_t
|
||||
rsmi_dev_vbios_version_get(uint32_t dv_ind, char *vbios, uint32_t len);
|
||||
|
||||
/**
|
||||
* @brief Get a description of a provided RSMI error status
|
||||
*
|
||||
|
||||
@@ -68,6 +68,7 @@ enum DevInfoTypes {
|
||||
kDevPowerProfileMode,
|
||||
kDevUsage,
|
||||
kDevPowerODVoltage,
|
||||
kDevVBiosVer,
|
||||
};
|
||||
|
||||
class Device {
|
||||
@@ -102,6 +103,9 @@ class Device {
|
||||
std::string path_;
|
||||
uint32_t index_;
|
||||
const RocmSMI_env_vars *env_;
|
||||
template <typename T> int openSysfsFileStream(DevInfoTypes type, T *fs,
|
||||
bool write = false);
|
||||
|
||||
int readDevInfoStr(DevInfoTypes type, std::string *retStr);
|
||||
int readDevInfoMultiLineStr(DevInfoTypes type,
|
||||
std::vector<std::string> *retVec);
|
||||
|
||||
Atsaukties uz šo jaunā problēmā
Block a user