rocm_smi_lib: Fix rocm-smi --resetfans results in Permission Denied

For operations related to:
  --resetfans
  --setfan

We report 'Not supported' for these cases instead of 'Permission denied'

Code changes related to the following:
  * rocm_smi_properties
  * rocm_smi related APIs

Change-Id: I144646efc3804fabd45cc5a46351803950b4feb7
Signed-off-by: Oliveira, Daniel <daniel.oliveira@amd.com>


[ROCm/rocm_smi_lib commit: 12f395e592]
Этот коммит содержится в:
Oliveira, Daniel authored and Daniel Oliveira committed 2023-09-14 16:54:29 -04:00
1 родитель d131ac8f32
Коммит 24edb0acab
4 files changed
+43 -16

No files matched your search

+6 -2
Просмотреть файл
@@ -813,8 +813,10 @@ def resetFans(deviceList):
for device in deviceList:
sensor_ind = c_uint32(0)
ret = rocmsmi.rsmi_dev_fan_reset(device, sensor_ind)
if rsmi_ret_ok(ret, device, 'reset_fan'):
if rsmi_ret_ok(ret, device, silent=True):
printLog(device, 'Successfully reset fan speed to driver control', None)
else:
printLog(device, 'Not supported on the given system', None)
printLogSpacer()
@@ -1335,8 +1337,10 @@ def setFanSpeed(deviceList, fan):
else:
fanLevel = int(str(fan))
ret = rocmsmi.rsmi_dev_fan_speed_set(device, 0, int(fanLevel))
if rsmi_ret_ok(ret, device, 'set_fan_speed'):
if rsmi_ret_ok(ret, device, silent=True):
printLog(device, 'Successfully set fan speed to level %s' % (str(int(fanLevel))), None)
else:
printLog(device, 'Not supported on the given system', None)
printLogSpacer()