diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2016-05-03 16:25:53 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-05-11 12:31:21 -0400 |
commit | 7dae69a2905c34a97678645c8e4c95095f5390b8 (patch) | |
tree | c60bebc39578bf13cd64989775e9dc9e71819a3a /drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | |
parent | edf600dac65eecb6c8bcf21fa986db30ee21a2ac (diff) |
drm/amdgpu: fetch cu_info once at init
Fetch this info once at init and just store the results
for future requests.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c index 490464e39322..199f76baf22c 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | |||
@@ -793,7 +793,6 @@ static int amdgpu_cgs_query_system_info(struct cgs_device *cgs_device, | |||
793 | struct cgs_system_info *sys_info) | 793 | struct cgs_system_info *sys_info) |
794 | { | 794 | { |
795 | CGS_FUNC_ADEV; | 795 | CGS_FUNC_ADEV; |
796 | struct amdgpu_cu_info cu_info; | ||
797 | 796 | ||
798 | if (NULL == sys_info) | 797 | if (NULL == sys_info) |
799 | return -ENODEV; | 798 | return -ENODEV; |
@@ -818,8 +817,7 @@ static int amdgpu_cgs_query_system_info(struct cgs_device *cgs_device, | |||
818 | sys_info->value = adev->pg_flags; | 817 | sys_info->value = adev->pg_flags; |
819 | break; | 818 | break; |
820 | case CGS_SYSTEM_INFO_GFX_CU_INFO: | 819 | case CGS_SYSTEM_INFO_GFX_CU_INFO: |
821 | amdgpu_asic_get_cu_info(adev, &cu_info); | 820 | sys_info->value = adev->gfx.cu_info.number; |
822 | sys_info->value = cu_info.number; | ||
823 | break; | 821 | break; |
824 | default: | 822 | default: |
825 | return -ENODEV; | 823 | return -ENODEV; |