SWDEV-463399: amdsmi_get_gpu_vram_info() adds bit-width
Driver info `amdgpu_gpu_info.vram_bit_width` is exposed through amdsmi_get_gpu_vram_info(). Code changes related to the following: * API * CLI * Unit tests * Examples Change-Id: I8abd8db7a603078b2b1c008b2685cecf35caf3d2 Signed-off-by: Oliveira, Daniel <daniel.oliveira@amd.com>
This commit is contained in:
committed by
Maisam Arif
szülő
af3670d758
commit
893f13ab98
@@ -303,6 +303,20 @@ int main() {
|
||||
printf("\tRevisionID: 0x%x\n", asic_info.rev_id);
|
||||
printf("\tAsic serial: 0x%s\n\n", asic_info.asic_serial);
|
||||
|
||||
// Get VRAM info
|
||||
amdsmi_vram_info_t vram_info = {};
|
||||
ret = amdsmi_get_gpu_vram_info(processor_handles[j], &vram_info);
|
||||
if (ret != amdsmi_status_t::AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
CHK_AMDSMI_RET(ret)
|
||||
printf(" Output of amdsmi_get_gpu_vram_info:\n");
|
||||
printf("\tVRAM Size: 0x%lx (%ld) \n", vram_info.vram_size, vram_info.vram_size);
|
||||
printf("\tBIT Width: 0x%x (%d) \n\n", vram_info.vram_bit_width, vram_info.vram_bit_width);
|
||||
}
|
||||
else {
|
||||
printf("\t**amdsmi_get_gpu_vram_info() not supported on this system.\n");
|
||||
}
|
||||
|
||||
|
||||
// Get VBIOS info
|
||||
amdsmi_vbios_info_t vbios_info = {};
|
||||
ret = amdsmi_get_gpu_vbios_info(processor_handles[j], &vbios_info);
|
||||
|
||||
Reference in New Issue
Block a user