Skip to content

Commit

Permalink
Update 1267mhz voltages
Browse files Browse the repository at this point in the history
  • Loading branch information
CatcherITGF committed Jul 22, 2024
1 parent 616792d commit 8dc9b0f
Showing 1 changed file with 69 additions and 57 deletions.
126 changes: 69 additions & 57 deletions Sources/Tools/GPU Volt/gpu_volt_mariko.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Copyright (C) 2012-2014 NVIDIA Corporation. All rights reserved.
#
# Copyright (C) 2023 hanai3Bi
# Copyright 2023 hanai3Bi
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
Expand All @@ -16,66 +14,77 @@

import math



gpu_dvfs_table_0 = [
[ 610000, 0 , 0 , 0 , 0 , 0 ],
[ 610000, 0 , 0 , 0 , 0 , 0 ],
[ 610000, 0 , 0 , 0 , 0 , 0 ],
[ 610000, 0 , 0 , 0 , 0 , 0 ],
[ 610000, 0 , 0 , 0 , 0 , 0 ],
[ 610000, 0 , 0 , 0 , 0 , 0 ],
[ 801688, -10900, -163, 298, -10599, 162 ],
[ 824214, -5743, -452, 238, -6325, 81 ],
[ 848830, -3903, -552, 119, -4030, -2 ],
[ 891575, -4409, -584, 0, -2849, 39 ],
[ 940071, -5367, -602, -60, -63, -93 ],
[ 986765, -6637, -614, -179, 1905, -13 ],
[ 1098475, -13529, -497, -179, 3626, 9 ],
[ 1163644, -12688, -648, 0, 1077, 40 ],
[ 1204812, -9908, -830, 0, 1469, 110 ],
[ 1277303, -11675, -859, 0, 3722, 313 ],
[ 1335531, -12567, -867, 0, 3681, 559 ]
[ 500000, 0 , 0 , 0 , 0 , 0 ],
[ 500000, 0 , 0 , 0 , 0 , 0 ],
[ 500000, 0 , 0 , 0 , 0 , 0 ],
[ 500000, 0 , 0 , 0 , 0 , 0 ],
[ 500000, 0 , 0 , 0 , 0 , 0 ],
[ 500000, 0 , 0 , 0 , 0 , 0 ],
[ 500000, 0 , 0 , 0 , 0 , 0 ],
[ 500000, 0 , 0 , 0 , 0 , 0 ],
[ 838712, -7304, -552, 119, -3750, -2 ],
[ 880210, -7955, -584, 0, -2849, 39 ],
[ 926398, -8892, -602, -60, -384, -93 ],
[ 970060, -10108, -614, -179, 1508, -13 ],
[ 1065665, -16075, -497, -179, 3213, 9 ],
[ 1132576, -16093, -648, 0, 1077, 40 ],
[ 1180029, -14534, -830, 0, 1469, 110 ],
[ 1248293, -16383, -859, 0, 3722, 313 ],
[ 1286399, -17475, -867, 0, 3681, 559 ],
[ 1306399, -17475, -867, 0, 3681, 559 ]
]




gpu_dvfs_table_1 = [
[ 590000, 0 , 0 , 0 , 0 , 0 ],
[ 590000, 0 , 0 , 0 , 0 , 0 ],
[ 590000, 0 , 0 , 0 , 0 , 0 ],
[ 590000, 0 , 0 , 0 , 0 , 0 ],
[ 590000, 0 , 0 , 0 , 0 , 0 ],
[ 795089, -11096, -163, 298, -10421, 162 ],
[ 795089, -11096, -163, 298, -10421, 162 ],
[ 820606, -6285, -452, 238, -6182, 81 ],
[ 846289, -4565, -552, 119, -3958, -2 ],
[ 888720, -5110, -584, 0, -2849, 39 ],
[ 936634, -6089, -602, -60, -99, -93 ],
[ 982562, -7373, -614, -179, 1797, -13 ],
[ 1090179, -14125, -497, -179, 3518, 9 ],
[ 1155798, -13465, -648, 0, 1077, 40 ],
[ 1198568, -10904, -830, 0, 1469, 110 ],
[ 1269988, -12707, -859, 0, 3722, 313 ],
[ 1308155, -13694, -867, 0, 3681, 559 ]
]
gpu_dvfs_table_2 = [
[ 590000, 0 , 0 , 0 , 0 , 0 ],
[ 590000, 0 , 0 , 0 , 0 , 0 ],
[ 590000, 0 , 0 , 0 , 0 , 0 ],
[ 590000, 0 , 0 , 0 , 0 , 0 ],
[ 590000, 0 , 0 , 0 , 0 , 0 ],
[ 590000, 0 , 0 , 0 , 0 , 0 ],
[ 590000, 0 , 0 , 0 , 0 , 0 ],
[ 590000, 0 , 0 , 0 , 0 , 0 ],
[ 500000, 0 , 0 , 0 , 0 , 0 ],
[ 500000, 0 , 0 , 0 , 0 , 0 ],
[ 500000, 0 , 0 , 0 , 0 , 0 ],
[ 500000, 0 , 0 , 0 , 0 , 0 ],
[ 500000, 0 , 0 , 0 , 0 , 0 ],
[ 500000, 0 , 0 , 0 , 0 , 0 ],
[ 500000, 0 , 0 , 0 , 0 , 0 ],
[ 500000, 0 , 0 , 0 , 0 , 0 ],
[ 838712, -7304, -552, 119, -3750, -2 ],
[ 880210, -7955, -584, 0, -2849, 39 ],
[ 926398, -8892, -602, -60, -384, -93 ],
[ 970060, -10108, -614, -179, 1508, -13 ],
[ 1065665, -16075, -497, -179, 3213, 9 ],
[ 1132576, -16093, -648, 0, 1077, 40 ],
[ 1180029, -14534, -830, 0, 1469, 110 ],
[ 1248293, -16383, -859, 0, 3722, 313 ],
[ 1286399, -17475, -867, 0, 3681, 559 ]
[ 1218293, -16383, -859, 0, 3722, 313 ],
[ 1246399, -17475, -867, 0, 3681, 559 ],
[ 1266399, -17475, -867, 0, 3681, 559 ]
]


gpu_dvfs_table_2 = [
[ 500000, 0 , 0 , 0 , 0 , 0 ], #76800
[ 500000, 0 , 0 , 0 , 0 , 0 ], #153600
[ 500000, 0 , 0 , 0 , 0 , 0 ], #230400
[ 500000, 0 , 0 , 0 , 0 , 0 ], #307200
[ 500000, 0 , 0 , 0 , 0 , 0 ], #384000
[ 500000, 0 , 0 , 0 , 0 , 0 ], #460800
[ 500000, 0 , 0 , 0 , 0 , 0 ], #537600
[ 500000, 0 , 0 , 0 , 0 , 0 ], #614400
[ 838712, -7304, -552, 119, -3750, -2 ], #691200
[ 880210, -7955, -584, 0, -2849, 39 ], #768000
[ 926398, -8892, -602, -60, -384, -93 ], #844800
[ 970060, -10108, -614, -179, 1508, -13 ], #921600
[ 1060665, -16075, -497, -179, 3213, 9 ], #998400
[ 1117576, -16093, -648, 0, 1077, 40 ], #1075200
[ 1094475, -12688, -648, 0, 1077, 40 ], #1152000
[ 1124475, -12688, -648, 0, 1077, 40 ], #1228800
[ 1142060, -12688, -648, 0, 1077, 40 ], #1267200
[ 1163644, -12688, -648, 0, 1077, 40 ] #1305600
]

gpu_freq_table = [76800, 153600, 230400, 307200, 384000, 460800, 537600, 614400, 691200, 768000, 844800, 921600, 998400, 1075200, 1152000, 1228800, 1267200]

gpu_freq_table = [76800, 153600, 230400, 307200, 384000, 460800, 537600, 614400, 691200, 768000, 844800, 921600, 998400, 1075200, 1152000, 1228800, 1267200, 1305600]

temp_list = [-25, 20, 30, 50, 70, 90]

Expand Down Expand Up @@ -112,20 +121,23 @@ def tegra_round_cvb_voltage(mv: int, v_scale: int):
gpu_dvfs_table = gpu_dvfs_table_2

offset = int(input("Enter gpu offset: "))
for i in range(17):

vmin = int(input("Enter gpu vmin: "))

for i in range(18):
gpu_dvfs_table[i][0] -= offset*1000

print("\t\t", end="")

for entry in range(17):
for entry in range(18):
print(int(gpu_freq_table[entry]/1000), "\t", end="")
print()


thermal_floor = [ [ 0 for i in range(17) ] for j in range(7) ]
thermal_floor = [ [ 0 for i in range(18) ] for j in range(7) ]

#build thermal floor
for entry in range(17):
for entry in range(18):
mv = div_round_closest(gpu_dvfs_table[entry][2] * speedo , 100)
mv = div_round_closest( (mv + gpu_dvfs_table[entry][1]) * speedo , 100) + gpu_dvfs_table[entry][0]

Expand All @@ -139,7 +151,7 @@ def tegra_round_cvb_voltage(mv: int, v_scale: int):

thermal_floor[temp][entry] = int(final_volt)

for i in range(17):
for i in range(18):
thermal_floor[0][i] = 800


Expand All @@ -149,9 +161,9 @@ def tegra_round_cvb_voltage(mv: int, v_scale: int):
else:
print(">", temp_list[temp], "°C\t\t", end="")

for entry in range(17):
for entry in range(18):
mv = max(thermal_floor[temp][entry], thermal_floor[temp+1][entry])
vmin = 610 if table == 0 else 590
#vmin = 610 if table == 0 else 610
final_volt = max(mv, vmin)
print(final_volt, "\t", end="")
print()
Expand Down

0 comments on commit 8dc9b0f

Please sign in to comment.