diff options
Diffstat (limited to 'common/recipes-kernel/linux/files/0190-drm-amdgpu-dpm-ci-switch-over-to-the-common-pcie-cap.patch')
-rw-r--r-- | common/recipes-kernel/linux/files/0190-drm-amdgpu-dpm-ci-switch-over-to-the-common-pcie-cap.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/files/0190-drm-amdgpu-dpm-ci-switch-over-to-the-common-pcie-cap.patch b/common/recipes-kernel/linux/files/0190-drm-amdgpu-dpm-ci-switch-over-to-the-common-pcie-cap.patch new file mode 100644 index 00000000..d3fe1d24 --- /dev/null +++ b/common/recipes-kernel/linux/files/0190-drm-amdgpu-dpm-ci-switch-over-to-the-common-pcie-cap.patch @@ -0,0 +1,53 @@ +From 43d93cc05437d218136f7a0f824c014d165c30ca Mon Sep 17 00:00:00 2001 +From: Alex Deucher <alexander.deucher@amd.com> +Date: Thu, 4 Feb 2016 10:44:04 -0500 +Subject: [PATCH 0190/1110] drm/amdgpu/dpm/ci: switch over to the common pcie + caps interface + +We already query this at driver init, so use that info. Also +handles virtualization cases. + +Reviewed-by: monk liu <monk.liu@amd.com> +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 11 +++++------ + 1 file changed, 5 insertions(+), 6 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c +index 8b4731d..474ca02 100644 +--- a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c ++++ b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c +@@ -31,6 +31,7 @@ + #include "ci_dpm.h" + #include "gfx_v7_0.h" + #include "atom.h" ++#include "amd_pcie.h" + #include <linux/seq_file.h> + + #include "smu/smu_7_0_1_d.h" +@@ -5835,18 +5836,16 @@ static int ci_dpm_init(struct amdgpu_device *adev) + u8 frev, crev; + struct ci_power_info *pi; + int ret; +- u32 mask; + + pi = kzalloc(sizeof(struct ci_power_info), GFP_KERNEL); + if (pi == NULL) + return -ENOMEM; + adev->pm.dpm.priv = pi; + +- ret = drm_pcie_get_speed_cap_mask(adev->ddev, &mask); +- if (ret) +- pi->sys_pcie_mask = 0; +- else +- pi->sys_pcie_mask = mask; ++ pi->sys_pcie_mask = ++ (adev->pm.pcie_gen_mask & CAIL_PCIE_LINK_SPEED_SUPPORT_MASK) >> ++ CAIL_PCIE_LINK_SPEED_SUPPORT_SHIFT; ++ + pi->force_pcie_gen = AMDGPU_PCIE_GEN_INVALID; + + pi->pcie_gen_performance.max = AMDGPU_PCIE_GEN1; +-- +2.7.4 + |