[SWDEV-484382] Added fclk and socclk to amd-smi metric -c

Signed-off-by: gabrpham <Gabriel.Pham@amd.com>
Change-Id: Ie7e19c757b05455693c0d26eeb5e8b6c1e238375
This commit is contained in:
gabrpham
2024-12-04 13:54:20 -06:00
committed by Gabriel Pham
parent 5f9c2db6f3
commit fe290a2056
4 changed files with 101 additions and 1 deletions
+7
View File
@@ -2217,6 +2217,13 @@ amdsmi_get_clock_info(amdsmi_processor_handle processor_handle, amdsmi_clk_type_
case AMDSMI_CLK_TYPE_DCLK1:
info->clk = metrics.current_dclk1;
break;
case AMDSMI_CLK_TYPE_SOC:
info->clk = metrics.current_socclk;
break;
// fclk/df not supported by gpu metrics so providing default value which cannot be contrued to be valid
case AMDSMI_CLK_TYPE_DF:
info->clk = UINT32_MAX;
break;
default:
return AMDSMI_STATUS_INVAL;
}
+6
View File
@@ -275,6 +275,12 @@ amdsmi_status_t smi_amdgpu_get_ranges(amd::smi::AMDSmiGPUDevice* device, amdsmi_
case AMDSMI_CLK_TYPE_DCLK1:
fullpath += "/pp_dpm_dclk1";
break;
case AMDSMI_CLK_TYPE_SOC:
fullpath += "/pp_dpm_socclk";
break;
case AMDSMI_CLK_TYPE_DF:
fullpath += "/pp_dpm_fclk";
break;
default:
return AMDSMI_STATUS_INVAL;
}