提交 bacec898 编写于 作者: E Eric Huang 提交者: Alex Deucher

drm/amd/amdgpu: add query GFX cu info in CGS query system info

Needed for per CU powergating.
Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
Acked-by: NChristian König <christian.koenig@amd.com>
Signed-off-by: NEric Huang <JinHuiEric.Huang@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 8fe3d333
......@@ -791,6 +791,7 @@ static int amdgpu_cgs_query_system_info(struct cgs_device *cgs_device,
struct cgs_system_info *sys_info)
{
CGS_FUNC_ADEV;
struct amdgpu_cu_info cu_info;
if (NULL == sys_info)
return -ENODEV;
......@@ -814,6 +815,10 @@ static int amdgpu_cgs_query_system_info(struct cgs_device *cgs_device,
case CGS_SYSTEM_INFO_PG_FLAGS:
sys_info->value = adev->pg_flags;
break;
case CGS_SYSTEM_INFO_GFX_CU_INFO:
amdgpu_asic_get_cu_info(adev, &cu_info);
sys_info->value = cu_info.number;
break;
default:
return -ENODEV;
}
......
......@@ -114,6 +114,7 @@ enum cgs_system_info_id {
CGS_SYSTEM_INFO_PCIE_MLW,
CGS_SYSTEM_INFO_CG_FLAGS,
CGS_SYSTEM_INFO_PG_FLAGS,
CGS_SYSTEM_INFO_GFX_CU_INFO,
CGS_SYSTEM_INFO_ID_MAXIMUM,
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册