diff options
| author | Evan Quan <[email protected]> | 2020-06-09 06:57:06 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2020-07-10 21:42:22 +0000 |
| commit | c98f31d17cc8a4e9484c75c24efdb50c700daf00 (patch) | |
| tree | b40614c1f52a77ea14bdb0c2f8c0273d084f0a5f /drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | |
| parent | drm/amd/powerplay: put setting hard limit common code in smu_v11_0.c (diff) | |
| download | kernel-c98f31d17cc8a4e9484c75c24efdb50c700daf00.tar.gz kernel-c98f31d17cc8a4e9484c75c24efdb50c700daf00.zip | |
drm/amd/powerplay: revise calling chain on setting soft limit
This helps to maintain clear code layers and drop unnecessary
parameter.
Signed-off-by: Evan Quan <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c index aeada7c9fbea..fb89204c0070 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c @@ -1464,7 +1464,9 @@ static int amdgpu_debugfs_sclk_set(void *data, u64 val) ret = smu_get_dpm_freq_range(&adev->smu, SMU_SCLK, &min_freq, &max_freq, true); if (ret || val > max_freq || val < min_freq) return -EINVAL; - ret = smu_set_soft_freq_range(&adev->smu, SMU_SCLK, (uint32_t)val, (uint32_t)val, true); + ret = smu_set_soft_freq_range(&adev->smu, SMU_SCLK, (uint32_t)val, (uint32_t)val); + } else { + return 0; } pm_runtime_mark_last_busy(adev->ddev->dev); |
