drm/amd/powerplay: implement sysfs of pp_force_state for sw-smu
authorKevin Wang <Kevin1.Wang@amd.com>
Thu, 17 Jan 2019 05:46:08 +0000 (13:46 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Mar 2019 20:03:58 +0000 (15:03 -0500)
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>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c

index 569f7be61b53005dc967119c077a68d52c456093..896dcac33656fd07155dea88a3d480143c27524b 100644 (file)
@@ -429,6 +429,8 @@ static ssize_t amdgpu_set_pp_force_state(struct device *dev,
 
        if (strlen(buf) == 1)
                adev->pp_force_state_enabled = false;
+       else if (is_support_sw_smu(adev))
+               adev->pp_force_state_enabled = false;
        else if (adev->powerplay.pp_funcs->dispatch_tasks &&
                        adev->powerplay.pp_funcs->get_pp_num_states) {
                struct pp_states_info data;