Added new clock types
Also added missing error code strings and improved test output messages
This commit is contained in:
@@ -85,7 +85,7 @@ typedef enum {
|
||||
RSMI_STATUS_INVALID_ARGS, //!< Passed in arguments are not valid
|
||||
RSMI_STATUS_NOT_SUPPORTED, //!< The requested information or
|
||||
//!< action is not available for the
|
||||
//!< given input
|
||||
//!< given input, on the given system
|
||||
RSMI_STATUS_FILE_ERROR, //!< Problem accessing a file. This
|
||||
//!< may because the operation is not
|
||||
//!< supported by the Linux kernel
|
||||
@@ -147,9 +147,16 @@ typedef rsmi_dev_perf_level_t rsmi_dev_perf_level;
|
||||
typedef enum {
|
||||
RSMI_CLK_TYPE_SYS = 0x0, //!< System clock
|
||||
RSMI_CLK_TYPE_FIRST = RSMI_CLK_TYPE_SYS,
|
||||
|
||||
RSMI_CLK_TYPE_DF, //!< Data Fabric clock (for ASICs
|
||||
//!< running on a separate clock)
|
||||
RSMI_CLK_TYPE_DCEF, //!< Display Controller Engine clock
|
||||
RSMI_CLK_TYPE_SOC, //!< SOC clock
|
||||
RSMI_CLK_TYPE_MEM, //!< Memory clock
|
||||
RSMI_CLK_TYPE_LAST = RSMI_CLK_TYPE_MEM
|
||||
|
||||
// Add new clocks to the end (not in the middle) and update
|
||||
// RSMI_CLK_TYPE_LAST
|
||||
RSMI_CLK_TYPE_LAST = RSMI_CLK_TYPE_MEM,
|
||||
RSMI_CLK_INVALID = 0xFFFFFFFF
|
||||
} rsmi_clk_type_t;
|
||||
/// \cond Ignore in docs.
|
||||
typedef rsmi_clk_type_t rsmi_clk_type;
|
||||
|
||||
@@ -50,10 +50,11 @@
|
||||
std::cout << "*****" << __FUNCTION__ << std::endl; \
|
||||
std::cout << "*****Opening file: " << (FN) << std::endl; \
|
||||
if ((WR_STR) != nullptr) { \
|
||||
std::cout << "***** for writing. Writing: \"" << *(WR_STR) << "\""; \
|
||||
std::cout << "***** for writing. Writing: \"" << (WR_STR) << "\""; \
|
||||
} else { std::cout << "***** for reading.";} \
|
||||
std::cout << std::endl; \
|
||||
std::cout << " at " << __FILE__ << ":" << __LINE__ << std::endl;\
|
||||
std::cout << " at " << __FILE__ << ":" << std::dec << __LINE__ << \
|
||||
std::endl;\
|
||||
}
|
||||
|
||||
// Add different debug filters here, as powers of 2; e.g, 1, 2, 4, 8, ...
|
||||
|
||||
@@ -65,6 +65,9 @@ enum DevInfoTypes {
|
||||
kDevSubSysVendorID,
|
||||
kDevGPUMClk,
|
||||
kDevGPUSClk,
|
||||
kDevDCEFClk,
|
||||
kDevFClk,
|
||||
kDevSOCClk,
|
||||
kDevPCIEClk,
|
||||
kDevPowerProfileMode,
|
||||
kDevUsage,
|
||||
@@ -113,7 +116,7 @@ class Device {
|
||||
uint32_t index_;
|
||||
const RocmSMI_env_vars *env_;
|
||||
template <typename T> int openSysfsFileStream(DevInfoTypes type, T *fs,
|
||||
bool write = false);
|
||||
const char *str = nullptr);
|
||||
|
||||
int readDevInfoStr(DevInfoTypes type, std::string *retStr);
|
||||
int readDevInfoMultiLineStr(DevInfoTypes type,
|
||||
|
||||
Reference in New Issue
Block a user