drm/amd/pm: fix the deadlock observed on performance_level setting
authorEvan Quan <evan.quan@amd.com>
Tue, 25 Jan 2022 08:09:00 +0000 (16:09 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Jan 2022 20:48:22 +0000 (15:48 -0500)
commit75513bf5d72cd1a81401866642f4a8052b2d4420
tree333d67380200cc370548fd401a02ebf199bfa887
parentf4e2a66dae996b4fa2cc21b1904798ad1dc83049
drm/amd/pm: fix the deadlock observed on performance_level setting

The sub-routine(amdgpu_gfx_off_ctrl) tried to obtain the lock
adev->pm.mutex which was actually hold by amdgpu_dpm_force_performance_level.
A deadlock happened then.

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/amdgpu_dpm.c