drm/amd/display: Grab dc_lock before detecting link
authorWayne Lin <Wayne.Lin@amd.com>
Tue, 31 May 2022 09:46:24 +0000 (17:46 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 13 Jul 2022 15:25:17 +0000 (11:25 -0400)
commit15c735e7990fdabb466a3341b6b2dfefd987127e
tree475ae30c83f972ad12ea39349ca90650ff05a689
parent3d4de925356177dad0fb5869d1ea537cfa033009
drm/amd/display: Grab dc_lock before detecting link

[Why & How]
There is chance we change dc state while calling dc_link_detect().
As the result of that, grab the dm.dc_lock before detecting link.

Reviewed-by: Hersen Wu <hersen.wu@amd.com>
Acked-by: Solomon Chiu <solomon.chiu@amd.com>
Signed-off-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
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c