aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
diff options
context:
space:
mode:
authorChengming Gui <Jack.Gui@amd.com>2019-01-04 04:42:09 -0500
committerAlex Deucher <alexander.deucher@amd.com>2019-03-19 16:03:59 -0400
commit8554e67d6e22b0bc3ba213b87a0b6e1ae0fd838c (patch)
tree7ac0b6f6f3e2330765c1ab7daf601ff32eda1b57 /drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
parentad88f0517b239a08b148fbd300de103e8f7a78ef (diff)
drm/amd/powerplay: implement power_dpm_state sys interface for SMU11
Add functions to get/set dpm state for SMU11. Signed-off-by: Chengming Gui <Jack.Gui@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Kevin Wang <kevin.wang@amd.com> Reviewd-by: Evan Quan <evan.quan@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index 7fe0330ca319..f36e86b11880 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -144,7 +144,9 @@ static ssize_t amdgpu_get_dpm_state(struct device *dev,
144 struct amdgpu_device *adev = ddev->dev_private; 144 struct amdgpu_device *adev = ddev->dev_private;
145 enum amd_pm_state_type pm; 145 enum amd_pm_state_type pm;
146 146
147 if (adev->powerplay.pp_funcs->get_current_power_state) 147 if (adev->smu.ppt_funcs->get_current_power_state)
148 pm = amdgpu_smu_get_current_power_state(adev);
149 else if (adev->powerplay.pp_funcs->get_current_power_state)
148 pm = amdgpu_dpm_get_current_power_state(adev); 150 pm = amdgpu_dpm_get_current_power_state(adev);
149 else 151 else
150 pm = adev->pm.dpm.user_state; 152 pm = adev->pm.dpm.user_state;