[SWDEV-484382] Fix VCLK/DCLK outputs for monitor, static, metric

Units were off and VCLK/DCLK outputs were not coming in
properly through amdsmi_get_clk_freq()

Now we match units sent back through rsmi_dev_gpu_clk_freq_get (MHz).

CLI now shows maximum of 2 VCLK/DCLKs otherwise shows N/A if there
is no current_freq listed.

Change-Id: I8a7b66cbb5263e8d396f8568c104e1ce3512923d
Signed-off-by: Charis Poag <Charis.Poag@amd.com>


[ROCm/amdsmi commit: 3226a1d0ea]
This commit is contained in:
Charis Poag
2024-12-20 09:59:15 -06:00
committed by Arif, Maisam
parent 9d5eada975
commit bf4bbef085
7 changed files with 128 additions and 48 deletions
@@ -3688,11 +3688,12 @@ def amdsmi_get_clk_freq(
)
)
return {
dict_ret = {
"num_supported": freq.num_supported,
"current": freq.current,
"frequency": list(freq.frequency)[: freq.num_supported],
}
return dict_ret
def amdsmi_get_soc_pstate(