aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/5062-drm-amgpu-acp-Implement-set_powergating_state-for-ac.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/5062-drm-amgpu-acp-Implement-set_powergating_state-for-ac.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/5062-drm-amgpu-acp-Implement-set_powergating_state-for-ac.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/5062-drm-amgpu-acp-Implement-set_powergating_state-for-ac.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/5062-drm-amgpu-acp-Implement-set_powergating_state-for-ac.patch
new file mode 100644
index 00000000..c21db8ec
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/5062-drm-amgpu-acp-Implement-set_powergating_state-for-ac.patch
@@ -0,0 +1,36 @@
+From b5dc477245fe4370865a867d205f964a78400910 Mon Sep 17 00:00:00 2001
+From: Rex Zhu <Rex.Zhu@amd.com>
+Date: Sun, 29 Jul 2018 18:53:02 +0800
+Subject: [PATCH 5062/5725] drm/amgpu/acp: Implement set_powergating_state for
+ acp
+
+so driver can powergate acp block after asic initialized
+to save power.
+
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
+index b8228a2..0527bfb 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
+@@ -512,6 +512,12 @@ static int acp_set_clockgating_state(void *handle,
+ static int acp_set_powergating_state(void *handle,
+ enum amd_powergating_state state)
+ {
++ struct amdgpu_device *adev = (struct amdgpu_device *)handle;
++ bool enable = state == AMD_PG_STATE_GATE ? true : false;
++
++ if (adev->powerplay.pp_funcs->set_powergating_by_smu)
++ amdgpu_dpm_set_powergating_by_smu(adev, AMD_IP_BLOCK_TYPE_ACP, enable);
++
+ return 0;
+ }
+
+--
+2.7.4
+