Commit f68ccf43 authored by Evan Quan's avatar Evan Quan Committed by Alex Deucher

drm/amd/powerplay: fix deadlock around smu_handle_task V2

As the lock was already held on the entrance to smu_handle_task.

- V2: lock in small granularity
Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
Reviewed-by: default avatarKevin Wang <kevin1.wang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 7ef65bbd
...@@ -2996,13 +2996,10 @@ void amdgpu_pm_compute_clocks(struct amdgpu_device *adev) ...@@ -2996,13 +2996,10 @@ void amdgpu_pm_compute_clocks(struct amdgpu_device *adev)
} }
if (is_support_sw_smu(adev)) { if (is_support_sw_smu(adev)) {
struct smu_context *smu = &adev->smu;
struct smu_dpm_context *smu_dpm = &adev->smu.smu_dpm; struct smu_dpm_context *smu_dpm = &adev->smu.smu_dpm;
mutex_lock(&(smu->mutex));
smu_handle_task(&adev->smu, smu_handle_task(&adev->smu,
smu_dpm->dpm_level, smu_dpm->dpm_level,
AMD_PP_TASK_DISPLAY_CONFIG_CHANGE); AMD_PP_TASK_DISPLAY_CONFIG_CHANGE);
mutex_unlock(&(smu->mutex));
} else { } else {
if (adev->powerplay.pp_funcs->dispatch_tasks) { if (adev->powerplay.pp_funcs->dispatch_tasks) {
if (!amdgpu_device_has_dc_support(adev)) { if (!amdgpu_device_has_dc_support(adev)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment