aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
diff options
context:
space:
mode:
authorHuang Rui <ray.huang@amd.com>2016-07-12 01:54:05 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-07-29 14:37:12 -0400
commit09fc7eff7eed0b9f4d7353fa902b1f1a779cc990 (patch)
treec2270d0f59fb92e286fbc259e7565347ca1c74f0 /drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
parente595d7f03b48f5f311c9289c070a2a14636ad362 (diff)
drm/amdgpu: add query device id and revision id into system info entry at CGS
This patch adds device id and revision into system info entry at CGS, it's able to get PCI device id and revision id from amdgpu, it might get more info in future. PCI device id will be also used on powerplay part at current. Suggested-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Huang Rui <ray.huang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@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.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
index 347f458d3c31..bc0440f7a31d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
@@ -810,7 +810,7 @@ static int amdgpu_cgs_get_firmware_info(struct cgs_device *cgs_device,
810} 810}
811 811
812static int amdgpu_cgs_query_system_info(struct cgs_device *cgs_device, 812static int amdgpu_cgs_query_system_info(struct cgs_device *cgs_device,
813 struct cgs_system_info *sys_info) 813 struct cgs_system_info *sys_info)
814{ 814{
815 CGS_FUNC_ADEV; 815 CGS_FUNC_ADEV;
816 816
@@ -830,6 +830,12 @@ static int amdgpu_cgs_query_system_info(struct cgs_device *cgs_device,
830 case CGS_SYSTEM_INFO_PCIE_MLW: 830 case CGS_SYSTEM_INFO_PCIE_MLW:
831 sys_info->value = adev->pm.pcie_mlw_mask; 831 sys_info->value = adev->pm.pcie_mlw_mask;
832 break; 832 break;
833 case CGS_SYSTEM_INFO_PCIE_DEV:
834 sys_info->value = adev->pdev->device;
835 break;
836 case CGS_SYSTEM_INFO_PCIE_REV:
837 sys_info->value = adev->pdev->revision;
838 break;
833 case CGS_SYSTEM_INFO_CG_FLAGS: 839 case CGS_SYSTEM_INFO_CG_FLAGS:
834 sys_info->value = adev->cg_flags; 840 sys_info->value = adev->cg_flags;
835 break; 841 break;