[090/138] drm/amd/powerplay: implement sysfs of pp_force_state for sw-smu

Submitted by Huang, Ray on Jan. 25, 2019, 10:24 a.m.

Details

Message ID 1548411945-12396-91-git-send-email-ray.huang@amd.com
State New
Headers show
Series "The new SW SMU driver of amdgpu" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Huang, Ray Jan. 25, 2019, 10:24 a.m.
From: Kevin Wang <Kevin1.Wang@amd.com>

the SMU v11 doesn’t support pp_force_state so far, so we didn’t implement
it.

Signed-off-by: Kevin Wang <Kevin1.Wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index 5468b8d..2c12a80 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -450,6 +450,8 @@  static ssize_t amdgpu_set_pp_force_state(struct device *dev,
 					AMD_PP_TASK_ENABLE_USER_STATE, &state);
 			adev->pp_force_state_enabled = true;
 		}
+	} else if (is_support_sw_smu(adev)) {
+		adev->pp_force_state_enabled = false;
 	}
 fail:
 	return count;