drm/amd/powerplay: check for invalid profile_exit setting
Subsystems (2)
PATCH 1/1 drm/amd/powerplay: check for invalid profile_exit setting
profile_exit performance level setting is valid only when current mode is in profile mode.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +10 -0
@@ -404,6 +404,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) {
Signature · 6 lines
2.21.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): [email protected]
Zhou1, Tao
Reviewed-by Tao ZhouQuoted 42 lines
-----Original Message-----
From: Evan Quan <[email protected]>
Sent: 2019年5月5日 11:20
To: [email protected]
Cc: Zhou1, Tao <[email protected]>; Quan, Evan <[email protected]>
Subject: [PATCH] drm/amd/powerplay: check for invalidprofile_exitsetting
profile_exitperformance level setting is valid only when current mode is in profile mode.Change-Id I6940102d38dbb7a4b0233fce5277e1704672d8f4Signed-off-by Evan Quan <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 10 ++++++++++ 1 file changed, 10 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +1
-0@@ -404,6 +404,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 */
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +1
-0+ if (!(current_level &(
AMD_DPM_FORCED_LEVEL_PROFILE_STANDARD|drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +8
-1+ 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) { --
Quoted 1 line
2.21.0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx