aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/1060-drm-amdgpu-add-powerplay-support-for-CI-asics.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/1060-drm-amdgpu-add-powerplay-support-for-CI-asics.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/1060-drm-amdgpu-add-powerplay-support-for-CI-asics.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/1060-drm-amdgpu-add-powerplay-support-for-CI-asics.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/1060-drm-amdgpu-add-powerplay-support-for-CI-asics.patch
new file mode 100644
index 00000000..01e785cf
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/1060-drm-amdgpu-add-powerplay-support-for-CI-asics.patch
@@ -0,0 +1,46 @@
+From d48b77de7c63846e17168eb918c06c37354cc7d6 Mon Sep 17 00:00:00 2001
+From: Rex Zhu <Rex.Zhu@amd.com>
+Date: Tue, 12 Sep 2017 13:37:40 +0800
+Subject: [PATCH 1060/4131] drm/amdgpu: add powerplay support for CI asics
+
+currently, for CI asics,
+use dpm by default, amdgpu.dpm=-1.
+when set amdgpu.dpm=1, enable powplay.
+when set amdgpu.dpm=0, disable both dpm and powerplay.
+
+when powerplay is stable on CI asics, ci_dpm will
+be removed.
+
+Change-Id: Ia82638324a637d72ab48124bcc56973b9fc53e4e
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c
+index 5cd5b8e..2d2f0960 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c
+@@ -93,8 +93,16 @@ static int amdgpu_pp_early_init(void *handle)
+ #ifdef CONFIG_DRM_AMDGPU_CIK
+ case CHIP_BONAIRE:
+ case CHIP_HAWAII:
+- amd_pp->ip_funcs = &ci_dpm_ip_funcs;
+- amd_pp->pp_funcs = &ci_dpm_funcs;
++ if (amdgpu_dpm == -1) {
++ amd_pp->ip_funcs = &ci_dpm_ip_funcs;
++ amd_pp->pp_funcs = &ci_dpm_funcs;
++ } else {
++ adev->pp_enabled = true;
++ if (amdgpu_create_pp_handle(adev))
++ return -EINVAL;
++ amd_pp->ip_funcs = &pp_ip_funcs;
++ amd_pp->pp_funcs = &pp_dpm_funcs;
++ }
+ break;
+ case CHIP_KABINI:
+ case CHIP_MULLINS:
+--
+2.7.4
+