summarylogtreecommitdiffstats
path: root/temporary-fixpoweroverdrive.patch
diff options
context:
space:
mode:
authorrigred2019-02-05 15:00:46 +0200
committerrigred2019-02-05 15:00:46 +0200
commit75b7c35b4c8f0b8cd1fee8239a6eb8aa98723c03 (patch)
tree4217d991d082a2a19ea1bcd9df68e5d6d1eae0d7 /temporary-fixpoweroverdrive.patch
parent356de4b4d5d9c3d398cac972e33570e5a88c7eb7 (diff)
downloadaur-75b7c35b4c8f0b8cd1fee8239a6eb8aa98723c03.tar.gz
rocm-smi 2.1.0
New Release with several new additions, see the upstream git for details: https://github.com/RadeonOpenCompute/ROC-smi/ Signed-off-by: Rigo Reddig <rigo.reddig@gmail.com>
Diffstat (limited to 'temporary-fixpoweroverdrive.patch')
-rw-r--r--temporary-fixpoweroverdrive.patch56
1 files changed, 0 insertions, 56 deletions
diff --git a/temporary-fixpoweroverdrive.patch b/temporary-fixpoweroverdrive.patch
deleted file mode 100644
index c720c6e317ef..000000000000
--- a/temporary-fixpoweroverdrive.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-diff --git a/rocm_smi.py b/rocm_smi.py
-index 3903b5b..b138855 100755
---- a/rocm_smi.py
-+++ b/rocm_smi.py
-@@ -1081,6 +1081,11 @@ def setPowerOverDrive(deviceList, value, autoRespond):
- return
-
- confirmOutOfSpecWarning(autoRespond)
-+
-+ # Value in Watt - stored early this way to avoid pythons float -> int -> str conversion after dividing a number
-+ strValue = value
-+ # Our Watt value converted for sysfs as microWatt
-+ value = int(value) * 1000000
-
- for device in deviceList:
- if not isDPMAvailable(device):
-@@ -1092,27 +1097,28 @@ def setPowerOverDrive(deviceList, value, autoRespond):
- continue
- power_cap_path = os.path.join(hwmon, 'power1_cap')
-
-- max_power_cap = str(int(getSysfsValue(device, 'power_cap_max')) / 1000000)
-- min_power_cap = str(int(getSysfsValue(device, 'power_cap_min')) / 1000000)
-+ # Avoid early unnecessary conversions
-+ max_power_cap = int(getSysfsValue(device, 'power_cap_max'))
-+ min_power_cap = int(getSysfsValue(device, 'power_cap_min'))
-
-- if int(value) < int(min_power_cap):
-- printLog(device, 'Unable to set Power OverDrive to less than ' + min_power_cap + 'W')
-+ if value < min_power_cap:
-+ printLog(device, 'Unable to set Power OverDrive to less than ' + str(min_power_cap / 1000000) + 'W')
- RETCODE = 1
- return
-
-- if int(value) > int(max_power_cap):
-- printLog(device, 'Unable to set Power OverDrive to more than ' + max_power_cap + 'W')
-+ if value > max_power_cap:
-+ printLog(device, 'Unable to set Power OverDrive to more than ' + str(max_power_cap / 1000000) + 'W')
- RETCODE = 1
- return;
-
-- if writeToSysfs(power_cap_path, str(int(value) * 1000000)):
-- if int(value) != 0:
-- printLog(device, 'Successfully set Power OverDrive to ' + value + 'W')
-+ if writeToSysfs(power_cap_path, str(value)):
-+ if value != 0:
-+ printLog(device, 'Successfully set Power OverDrive to ' + strValue + 'W')
- else:
- printLog(device, 'Successfully reset Power OverDrive')
- else:
-- if int(value) != 0:
-- printLog(device, 'Unable to set Power OverDrive to ' + value + 'W')
-+ if value != 0:
-+ printLog(device, 'Unable to set Power OverDrive to ' + strValue + 'W')
- else:
- printLog(device, 'Unable to reset Power OverDrive to default')
-