diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/vi.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/vi.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c index e51070e9697a..25d620790607 100644 --- a/drivers/gpu/drm/amd/amdgpu/vi.c +++ b/drivers/gpu/drm/amd/amdgpu/vi.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include "amdgpu_vce.h" | 31 | #include "amdgpu_vce.h" |
32 | #include "amdgpu_ucode.h" | 32 | #include "amdgpu_ucode.h" |
33 | #include "atom.h" | 33 | #include "atom.h" |
34 | #include "amd_pcie.h" | ||
34 | 35 | ||
35 | #include "gmc/gmc_8_1_d.h" | 36 | #include "gmc/gmc_8_1_d.h" |
36 | #include "gmc/gmc_8_1_sh_mask.h" | 37 | #include "gmc/gmc_8_1_sh_mask.h" |
@@ -1052,9 +1053,6 @@ static int vi_set_vce_clocks(struct amdgpu_device *adev, u32 evclk, u32 ecclk) | |||
1052 | 1053 | ||
1053 | static void vi_pcie_gen3_enable(struct amdgpu_device *adev) | 1054 | static void vi_pcie_gen3_enable(struct amdgpu_device *adev) |
1054 | { | 1055 | { |
1055 | u32 mask; | ||
1056 | int ret; | ||
1057 | |||
1058 | if (pci_is_root_bus(adev->pdev->bus)) | 1056 | if (pci_is_root_bus(adev->pdev->bus)) |
1059 | return; | 1057 | return; |
1060 | 1058 | ||
@@ -1064,11 +1062,8 @@ static void vi_pcie_gen3_enable(struct amdgpu_device *adev) | |||
1064 | if (adev->flags & AMD_IS_APU) | 1062 | if (adev->flags & AMD_IS_APU) |
1065 | return; | 1063 | return; |
1066 | 1064 | ||
1067 | ret = drm_pcie_get_speed_cap_mask(adev->ddev, &mask); | 1065 | if (!(adev->pm.pcie_gen_mask & (CAIL_PCIE_LINK_SPEED_SUPPORT_GEN2 | |
1068 | if (ret != 0) | 1066 | CAIL_PCIE_LINK_SPEED_SUPPORT_GEN3))) |
1069 | return; | ||
1070 | |||
1071 | if (!(mask & (DRM_PCIE_SPEED_50 | DRM_PCIE_SPEED_80))) | ||
1072 | return; | 1067 | return; |
1073 | 1068 | ||
1074 | /* todo */ | 1069 | /* todo */ |
@@ -1473,6 +1468,8 @@ static int vi_common_early_init(void *handle) | |||
1473 | if (amdgpu_smc_load_fw && smc_enabled) | 1468 | if (amdgpu_smc_load_fw && smc_enabled) |
1474 | adev->firmware.smu_load = true; | 1469 | adev->firmware.smu_load = true; |
1475 | 1470 | ||
1471 | amdgpu_get_pcie_info(adev); | ||
1472 | |||
1476 | return 0; | 1473 | return 0; |
1477 | } | 1474 | } |
1478 | 1475 | ||