drm/amd/powerplay: fix deadlock around smu_handle_task V2
authorEvan Quan <evan.quan@amd.com>
Fri, 12 Jul 2019 05:18:16 +0000 (13:18 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 17 Jul 2019 18:34:30 +0000 (13:34 -0500)
As the lock was already held on the entrance to smu_handle_task.

- V2: lock in small granularity

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c

index 193d53720d9baeca7800e376bed88d9cc2273542..397af9094a39d245333019f23fc7664c82259e85 100644 (file)
@@ -2996,13 +2996,10 @@ void amdgpu_pm_compute_clocks(struct amdgpu_device *adev)
        }
 
        if (is_support_sw_smu(adev)) {
-               struct smu_context *smu = &adev->smu;
                struct smu_dpm_context *smu_dpm = &adev->smu.smu_dpm;
-               mutex_lock(&(smu->mutex));
                smu_handle_task(&adev->smu,
                                smu_dpm->dpm_level,
                                AMD_PP_TASK_DISPLAY_CONFIG_CHANGE);
-               mutex_unlock(&(smu->mutex));
        } else {
                if (adev->powerplay.pp_funcs->dispatch_tasks) {
                        if (!amdgpu_device_has_dc_support(adev)) {