diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c index dc3360b16bda600cb71755ca8f621c6d7ca0d4f9..72c9a7e2c373a610d75594eae948c3a6cbcbe356 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c @@ -905,6 +905,9 @@ static int amdgpu_cgs_query_system_info(struct cgs_device *cgs_device, case CGS_SYSTEM_INFO_PCIE_BUS_DEVFN: sys_info->value = adev->pdev->devfn; break; + case CGS_SYSTEM_INFO_VRAM_WIDTH: + sys_info->value = adev->gmc.vram_width; + break; default: return -ENODEV; } diff --git a/drivers/gpu/drm/amd/include/cgs_common.h b/drivers/gpu/drm/amd/include/cgs_common.h index f5c73970ab886d8ce9445789f6df835608e0e068..98cf4cebff17ced74d652b3942ad357fb4c6d2d9 100644 --- a/drivers/gpu/drm/amd/include/cgs_common.h +++ b/drivers/gpu/drm/amd/include/cgs_common.h @@ -101,6 +101,7 @@ enum cgs_system_info_id { CGS_SYSTEM_INFO_PCIE_SUB_SYS_ID, CGS_SYSTEM_INFO_PCIE_SUB_SYS_VENDOR_ID, CGS_SYSTEM_INFO_PCIE_BUS_DEVFN, + CGS_SYSTEM_INFO_VRAM_WIDTH, CGS_SYSTEM_INFO_ID_MAXIMUM, };