提交 0a17af37 编写于 作者: A Alex Deucher

drm/radeon: disable force performance state when thermal state is active

If the thermal state is active, we are in the lowest performance level
to cool down the chip.  Don't let the user force it higher.
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 ab70b1dd
...@@ -508,17 +508,21 @@ static ssize_t radeon_set_dpm_forced_performance_level(struct device *dev, ...@@ -508,17 +508,21 @@ static ssize_t radeon_set_dpm_forced_performance_level(struct device *dev,
} else if (strncmp("auto", buf, strlen("auto")) == 0) { } else if (strncmp("auto", buf, strlen("auto")) == 0) {
level = RADEON_DPM_FORCED_LEVEL_AUTO; level = RADEON_DPM_FORCED_LEVEL_AUTO;
} else { } else {
mutex_unlock(&rdev->pm.mutex);
count = -EINVAL; count = -EINVAL;
goto fail; goto fail;
} }
if (rdev->asic->dpm.force_performance_level) { if (rdev->asic->dpm.force_performance_level) {
if (rdev->pm.dpm.thermal_active) {
count = -EINVAL;
goto fail;
}
ret = radeon_dpm_force_performance_level(rdev, level); ret = radeon_dpm_force_performance_level(rdev, level);
if (ret) if (ret)
count = -EINVAL; count = -EINVAL;
} }
mutex_unlock(&rdev->pm.mutex);
fail: fail:
mutex_unlock(&rdev->pm.mutex);
return count; return count;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册