diff options
| author | Sean Paul <[email protected]> | 2019-05-22 20:08:21 +0000 |
|---|---|---|
| committer | Sean Paul <[email protected]> | 2019-05-22 20:08:21 +0000 |
| commit | 374ed5429346a021c8e2d26fafce14c5b15dedd0 (patch) | |
| tree | 70739e93443494993197cc11f41c0fd0a0f3aac0 /drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | |
| parent | video/hdmi: Add Unpack function for DRM infoframe (diff) | |
| parent | Linux 5.2-rc1 (diff) | |
| download | kernel-374ed5429346a021c8e2d26fafce14c5b15dedd0.tar.gz kernel-374ed5429346a021c8e2d26fafce14c5b15dedd0.zip | |
Merge drm/drm-next into drm-misc-next
Backmerging 5.2-rc1 to -misc-next for robher
Signed-off-by: Sean Paul <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index 95144e49c7f9..34471dbaa872 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c @@ -342,6 +342,16 @@ static ssize_t amdgpu_set_dpm_forced_performance_level(struct device *dev, if (current_level == level) return count; + /* profile_exit setting is valid only when current mode is in profile mode */ + if (!(current_level & (AMD_DPM_FORCED_LEVEL_PROFILE_STANDARD | + AMD_DPM_FORCED_LEVEL_PROFILE_MIN_SCLK | + AMD_DPM_FORCED_LEVEL_PROFILE_MIN_MCLK | + AMD_DPM_FORCED_LEVEL_PROFILE_PEAK)) && + (level == AMD_DPM_FORCED_LEVEL_PROFILE_EXIT)) { + pr_err("Currently not in any profile mode!\n"); + return -EINVAL; + } + if (is_support_sw_smu(adev)) { mutex_lock(&adev->pm.mutex); if (adev->pm.dpm.thermal_active) { |
