提交 cf8b92a7 编写于 作者: R Roman Li 提交者: Alex Deucher

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: NLang Yu <Lang.Yu@amd.com>
Signed-off-by: NRoman Li <Roman.Li@amd.com>
Reviewed-by: NQingqing Zhuo <Qingqing.Zhuo@amd.com>
Acked-by: NWayne Lin <Wayne.Lin@amd.com>
Tested-by: NDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 2e4ec251
......@@ -2726,13 +2726,15 @@ static void handle_hpd_rx_irq(void *param)
}
}
mutex_lock(&adev->dm.dc_lock);
if (!amdgpu_in_reset(adev))
mutex_lock(&adev->dm.dc_lock);
#ifdef CONFIG_DRM_AMD_DC_HDCP
result = dc_link_handle_hpd_rx_irq(dc_link, &hpd_irq_data, NULL);
#else
result = dc_link_handle_hpd_rx_irq(dc_link, NULL, NULL);
#endif
mutex_unlock(&adev->dm.dc_lock);
if (!amdgpu_in_reset(adev))
mutex_unlock(&adev->dm.dc_lock);
out:
if (result && !is_mst_root_connector) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册