drm/amdgpu: Add query vram width in CGS query system info

powerplay need vram width to set default mclk optimization
settings(uphyst/downhyst/activity threshold)

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Rex Zhu 2018-02-08 15:57:10 +08:00 committed by Alex Deucher
parent 92e71b0676
commit eda9a4eb15
2 changed files with 4 additions and 0 deletions

View File

@ -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;
}

View File

@ -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,
};