[SWDEV-509287] Fixed metric command issue with min_clk and deep sleep (#131)

Improved deep sleep detection

Change-Id: I4179084da6c2849275957adb7b57797846a0f748
Signed-off-by: gabrpham <Gabriel.Pham@amd.com>
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Co-authored-by: Maisam Arif <Maisam.Arif@amd.com>

[ROCm/amdsmi commit: 71a8f35a7d]
This commit is contained in:
Pham, Gabriel
2025-02-26 03:00:04 -06:00
committed by GitHub
parent da2d61bdd9
commit d2116cf24e
2 changed files with 23 additions and 41 deletions
@@ -310,6 +310,11 @@ amdsmi_status_t smi_amdgpu_get_ranges(amd::smi::AMDSmiGPUDevice* device, amdsmi_
return AMDSMI_STATUS_NO_DATA;
}
} else {
// skip this line if it contains a * which indicates the current level
const char *current_indicator = strstr(line.c_str(), "*");
if (current_indicator != nullptr){
continue;
}
if (sscanf(line.c_str(), "%u: %d%c", &dpm_level, &freq, str) <= 2){
ranges.close();
return AMDSMI_STATUS_IO;