drm/amdgpu: fix bug return invalid value to sysfs.
authorRex Zhu <Rex.Zhu@amd.com>
Mon, 9 Jan 2017 07:18:01 +0000 (15:18 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 27 Jan 2017 16:13:11 +0000 (11:13 -0500)
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-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 f251d0f4ea6a5edc8a79e4039e73a2f109d3e81f..9abd8f6705c007b0ce74118eb7053c0c502ffacb 100644 (file)
@@ -184,7 +184,7 @@ static ssize_t amdgpu_set_dpm_forced_performance_level(struct device *dev,
        }
 
        if (current_level == level)
-               return 0;
+               return count;
 
        if (level == AMD_DPM_FORCED_LEVEL_PROFILING)
                amdgpu_set_clockgating_state(adev, AMD_IP_BLOCK_TYPE_GFX,