drm/amdgpu: get number of shade engine by cgs interface.
authorRex Zhu <Rex.Zhu@amd.com>
Tue, 7 Jun 2016 12:15:24 +0000 (20:15 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 7 Jul 2016 19:06:20 +0000 (15:06 -0400)
the num of shade engine was needed to
measure the activity of the graphics core
and to enable di/dt feature.

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
drivers/gpu/drm/amd/include/cgs_common.h

index 9ffdd090d9ec5bc6bf7a9d9130bd5d10009a59e8..f4130501c6249ba30a9ef077d29da842b075c173 100644 (file)
@@ -831,6 +831,9 @@ static int amdgpu_cgs_query_system_info(struct cgs_device *cgs_device,
        case CGS_SYSTEM_INFO_GFX_CU_INFO:
                sys_info->value = adev->gfx.cu_info.number;
                break;
+       case CGS_SYSTEM_INFO_GFX_SE_INFO:
+               sys_info->value = adev->gfx.config.max_shader_engines;
+               break;
        default:
                return -ENODEV;
        }
index f12c25747b9e36b38d368db26cc7e2f79a5ce277..4ea7f3dda2c087623f8e79939aae80b7bf6c15b6 100644 (file)
@@ -115,6 +115,7 @@ enum cgs_system_info_id {
        CGS_SYSTEM_INFO_CG_FLAGS,
        CGS_SYSTEM_INFO_PG_FLAGS,
        CGS_SYSTEM_INFO_GFX_CU_INFO,
+       CGS_SYSTEM_INFO_GFX_SE_INFO,
        CGS_SYSTEM_INFO_ID_MAXIMUM,
 };