drm/amd/display: fix potential gpu reset deadlock
authorRoman Li <Roman.Li@amd.com>
Mon, 19 Apr 2021 15:47:00 +0000 (11:47 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 10 May 2021 22:06:44 +0000 (18:06 -0400)
commitcf8b92a75646735136053ce51107bfa8cfc23191
tree355f3c1e24fe1b30507dbaa3fc97b15274eeb111
parent2e4ec251628f6d43c1df5351d744b1aed4583ae4
drm/amd/display: fix potential gpu reset deadlock

[Why]
In gpu reset dc_lock acquired in dm_suspend().
Asynchronously handle_hpd_rx_irq can also be called
through amdgpu_dm_irq_suspend->flush_work, which also
tries to acquire dc_lock. That causes a deadlock.

[How]
Check if amdgpu executing reset before acquiring dc_lock.

Signed-off-by: Lang Yu <Lang.Yu@amd.com>
Signed-off-by: Roman Li <Roman.Li@amd.com>
Reviewed-by: Qingqing Zhuo <Qingqing.Zhuo@amd.com>
Acked-by: Wayne Lin <Wayne.Lin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c