Handled unkown vram type out of bounds error

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


[ROCm/amdsmi commit: ee80c2cac4]
This commit is contained in:
Maisam Arif
2024-01-24 02:05:01 -06:00
committed by Maisam Arif
parent f2587543e8
commit 56f96b613e
+4
View File
@@ -742,6 +742,10 @@ amdsmi_status_t amdsmi_get_gpu_vram_info(
}
}
// if vram type is greater than the max enum set it to unknown
if (info->vram_type > VRAM_TYPE__MAX)
info->vram_type = VRAM_TYPE_UNKNOWN;
// map the vendor name to enum
char brand[256];
r = rsmi_wrapper(rsmi_dev_vram_vendor_get, processor_handle, brand, 255);