]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/amdgpu/cgs: add sys info query for pcie gen and link width
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 12 Nov 2015 01:35:32 +0000 (20:35 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 21 Dec 2015 21:42:32 +0000 (16:42 -0500)
Needed by powerplay to properly handle pcie dpm switching.

Reviewed-by: Jammy Zhou <Jammy.Zhou@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 a611401a29d5bd9aa5c57ef0d979d415a14e1263..6fa0feac27f8d6ba87bec22f49196d80f840c387 100644 (file)
@@ -754,6 +754,12 @@ static int amdgpu_cgs_query_system_info(void *cgs_device,
        case CGS_SYSTEM_INFO_ADAPTER_BDF_ID:
                sys_info->value = adev->pdev->devfn | (adev->pdev->bus->number << 8);
                break;
+       case CGS_SYSTEM_INFO_PCIE_GEN_INFO:
+               sys_info->value = adev->pm.pcie_gen_mask;
+               break;
+       case CGS_SYSTEM_INFO_PCIE_MLW:
+               sys_info->value = adev->pm.pcie_mlw_mask;
+               break;
        default:
                return -ENODEV;
        }
index 2bbffd1191bd8d18bae079cb986d30ba89ffc66d..03affb348f6935169e8d10618719053e847c25c7 100644 (file)
@@ -107,6 +107,8 @@ enum cgs_ucode_id {
 
 enum cgs_system_info_id {
        CGS_SYSTEM_INFO_ADAPTER_BDF_ID = 1,
+       CGS_SYSTEM_INFO_PCIE_GEN_INFO,
+       CGS_SYSTEM_INFO_PCIE_MLW,
        CGS_SYSTEM_INFO_ID_MAXIMUM,
 };