summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
diff options
context:
space:
mode:
authorRex Zhu2018-06-05 05:46:35 +0200
committerAlex Deucher2018-07-05 23:38:49 +0200
commit9134c6d7f288f902d932e7cf57fab2f49e8ad70b (patch)
tree48592372b204ffe526d897b993bbd83f78fe8adb /drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
parentdrm/amd/pp: Add powergate_gfx backend function on Raven (diff)
downloadkernel-qcow2-linux-9134c6d7f288f902d932e7cf57fab2f49e8ad70b.tar.gz
kernel-qcow2-linux-9134c6d7f288f902d932e7cf57fab2f49e8ad70b.tar.xz
kernel-qcow2-linux-9134c6d7f288f902d932e7cf57fab2f49e8ad70b.zip
drm/amdgpu: Add gfx_off support in smu through pp_set_powergating_by_smu
we can take gfx off feature as gfx power gate. gfx off feature is also controled by smu. so add gfx_off support in pp_set_powergating_by_smu. Reviewed-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index a69153435ea7..ac46eabe3bcd 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -3714,6 +3714,10 @@ static int gfx_v9_0_set_powergating_state(void *handle,
/* update mgcg state */
gfx_v9_0_update_gfx_mg_power_gating(adev, enable);
+
+ /* set gfx off through smu */
+ if (enable && adev->powerplay.pp_funcs->set_powergating_by_smu)
+ amdgpu_dpm_set_powergating_by_smu(adev, AMD_IP_BLOCK_TYPE_GFX, true);
break;
default:
break;