drm/amdgpu: add support for getting sub_device id and
authorRex Zhu <Rex.Zhu@amd.com>
Mon, 22 Aug 2016 12:48:13 +0000 (20:48 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 25 Aug 2016 16:23:00 +0000 (12:23 -0400)
sub_vendor_id in cgs interface.

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 bc0440f7a31d3be5018c6eacb01c5a719dcc8db6..040993c998d41f2fc71383bdd43e75a2c5f634db 100644 (file)
@@ -848,6 +848,12 @@ static int amdgpu_cgs_query_system_info(struct cgs_device *cgs_device,
        case CGS_SYSTEM_INFO_GFX_SE_INFO:
                sys_info->value = adev->gfx.config.max_shader_engines;
                break;
+       case CGS_SYSTEM_INFO_PCIE_SUB_SYS_ID:
+               sys_info->value = adev->pdev->subsystem_device;
+               break;
+       case CGS_SYSTEM_INFO_PCIE_SUB_SYS_VENDOR_ID:
+               sys_info->value = adev->pdev->subsystem_vendor;
+               break;
        default:
                return -ENODEV;
        }
index b86aba9d019fbe7bf00f22c798d0c8bd50cdcf29..6aa8938fd826f4510c71329c54f78a88fd5a913b 100644 (file)
@@ -119,6 +119,8 @@ enum cgs_system_info_id {
        CGS_SYSTEM_INFO_PG_FLAGS,
        CGS_SYSTEM_INFO_GFX_CU_INFO,
        CGS_SYSTEM_INFO_GFX_SE_INFO,
+       CGS_SYSTEM_INFO_PCIE_SUB_SYS_ID,
+       CGS_SYSTEM_INFO_PCIE_SUB_SYS_VENDOR_ID,
        CGS_SYSTEM_INFO_ID_MAXIMUM,
 };