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:
1 parent
af3670d758
commit
893f13ab98
7 files changed
+36
-5
No files matched your search
@@ -55,6 +55,7 @@
|
||||
#include <set>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <limits>
|
||||
#include <xf86drm.h>
|
||||
#include "amd_smi/amdsmi.h"
|
||||
#include "amd_smi/impl/fdinfo.h"
|
||||
@@ -799,6 +800,7 @@ amdsmi_status_t amdsmi_get_gpu_vram_info(
|
||||
info->vram_type = AMDSMI_VRAM_TYPE_UNKNOWN;
|
||||
info->vram_size = 0;
|
||||
info->vram_vendor = AMDSMI_VRAM_VENDOR__PLACEHOLDER0;
|
||||
info->vram_bit_width = std::numeric_limits<decltype(info->vram_bit_width)>::max();
|
||||
|
||||
// Only can read vram type from libdrm
|
||||
if (gpu_device->check_if_drm_is_supported()) {
|
||||
@@ -808,6 +810,7 @@ amdsmi_status_t amdsmi_get_gpu_vram_info(
|
||||
sizeof(struct drm_amdgpu_info_device), &dev_info);
|
||||
if (r == AMDSMI_STATUS_SUCCESS) {
|
||||
info->vram_type = amd::smi::vram_type_value(dev_info.vram_type);
|
||||
info->vram_bit_width = dev_info.vram_bit_width;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user