From: Kevin Wang Date: Thu, 17 Jan 2019 05:46:08 +0000 (+0800) Subject: drm/amd/powerplay: implement sysfs of pp_force_state for sw-smu X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=0b53f9add0d8dbd3c8d44f78c0d847fcc1251883;p=openwrt%2Fstaging%2Fblogic.git drm/amd/powerplay: implement sysfs of pp_force_state for sw-smu the SMU v11 doesn’t support pp_force_state so far, so we didn’t implement it. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Acked-by: Alex Deucher Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index 569f7be61b53..896dcac33656 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c @@ -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;