[SWDEV-391036 + SWDEV-392933] Fixes for VoltRead and ComputePart.
Updates:
* VoltRead - needed to properly send out RSMI_STATUS_NOT_SUPPORTED
when device does not have voltage hwmon files
* ComputePart. - test failure was likely caused due to EvtNotif
causing conflicts (unknown exactly why). Test passes when
moving it ahead of the event notifier. Both API calls may have
a system resource issue, TBD.
* rocm_smi_example - now indicates when an API call
returns RSMI_STATUS_NOT_SUPPORTED or
RSMI_STATUS_NOT_YET_IMPLEMENTED. Allows example to fully complete
on systems which may not provide support for all API calls.
Change-Id: I520b8584e078d412414e8e5797c664220a7e823a
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
This commit is contained in:
+7
-2
@@ -2351,8 +2351,13 @@ rsmi_dev_volt_metric_get(uint32_t dv_ind, rsmi_voltage_type_t sensor_type,
|
||||
|
||||
// getVoltSensorIndex will throw an out of range exception if sensor_type is
|
||||
// not found
|
||||
uint32_t sensor_index =
|
||||
m->getVoltSensorIndex(sensor_type);
|
||||
uint32_t sensor_index;
|
||||
try {
|
||||
sensor_index =
|
||||
m->getVoltSensorIndex(sensor_type);
|
||||
} catch (...) {
|
||||
return RSMI_STATUS_NOT_SUPPORTED;
|
||||
}
|
||||
CHK_API_SUPPORT_ONLY(voltage, metric, sensor_index)
|
||||
|
||||
ret = get_dev_mon_value(mon_type, dv_ind, sensor_index, voltage);
|
||||
|
||||
Reference in New Issue
Block a user