Updated interface & wrapper to work with ras_feature

Change-Id: Iadd8c5e736f4dad2662dda2c9587454f00197474
Signed-off-by: Maisam Arif <maisarif@amd.com>


[ROCm/amdsmi commit: f0e6f34bfe]
This commit is contained in:
Maisam Arif
2023-10-12 17:45:48 -05:00
committed by Maisam Arif
parent b9073f2bf7
commit 1c23b45a38
2 changed files with 31 additions and 9 deletions
@@ -863,14 +863,22 @@ def amdsmi_get_gpu_ras_feature_info(
raise AmdSmiParameterException(
processor_handle, amdsmi_wrapper.amdsmi_processor_handle
)
# Dummy data waiting on population
ras_info = {"eeprom_version": "N/A",
"parity_schema" : "N/A",
"single_bit_schema" : "N/A",
"double_bit_schema" : "N/A",
"poison_schema" : "N/A"}
return ras_info
ras_feature = amdsmi_wrapper.amdsmi_ras_feature_t()
_check_res(
amdsmi_wrapper.amdsmi_get_gpu_ras_feature_info(
processor_handle, ctypes.byref(ras_feature)
)
)
return {
"eeprom_version": ras_feature.ras_eeprom_version,
"parity_schema" : bool(ras_feature.ecc_correction_schema_flags & 1),
"single_bit_schema" : bool(ras_feature.ecc_correction_schema_flags & 2),
"double_bit_schema" : bool(ras_feature.ecc_correction_schema_flags & 4),
"poison_schema" : bool(ras_feature.ecc_correction_schema_flags & 8)
}
def amdsmi_get_gpu_ras_block_features_enabled(